[Spacewalk-list] spacewalk 2.2 importing config files are failed

Uğur Engin mail at ugurengin.com
Sat Oct 18 00:04:09 UTC 2014


Hi,

I think that fixed related problem after the set  "True" value instead of
"allow_none" declared in function below.

Client side:

/usr/lib64/python2.6/xmlrpclib.py

def _*init*_(self, encoding=None, allow_none=0):
self.memo = {}
self.data = None
self.encoding = encoding
*self.allow_none = True*

dispatch = {}

Now all created files upload to spacewalk server without set the seliux
context !

Perhaps there may be others ways to fix this.

On Sat, Oct 18, 2014 at 2:30 AM, Uğur Engin <mail at ugurengin.com> wrote:

>
>
> Hi Tomas,
>
> Even though i tried both of them (webui and rhncfg-manager ),they cannot
> work as properly.
>
> Version:
> rpm -qf /usr/bin/rhncfg-manager
> rhncfg-management-5.10.73-1.el6.noarch
>
> Actually i found something that can be help us to resolve this cause, so
> if a file has no set selinux context  it cannot upload to spacewalk server.
>
> For example;
>
> I created a file under the etc (like this /etc/file.txt )then try to
> upload sw server,but is returning the same error message.However when i set
> related selinux context to this file then everything works normally !
>
> chcon -v unconfined_u:object_r:etc_t:s0 /etc/file.txt
>
> changing security context of `/etc/file.txt'
>
> rhncfg-manager add -c filechannel /etc/file.txt
> Using server name spacewalk.example.local
> Pushing to channel filechannel:
> Local file /etc/file.txt -> remote file /etc/file.txt
>
> It seems that if there is no set selinux context on a file, it doesn't
> work properly.
>
> example:
> ll -Z /etc/resolv.conf
> -rw-r--r-- root root ?                                /etc/resolv.conf
>
> Thus some server has no selinux mechanism, so i need to upload all files
> without set to selinux context.
>
> What do you think about that ?
>
>
> ---------- Forwarded message ----------
> From: Tomas Lestach <tlestach at redhat.com>
> Date: Fri, Oct 17, 2014 at 2:24 PM
> Subject: Re: spacewalk 2.2 importing config files are failed
> To: Uğur Engin <mail at ugurengin.com>
>
>
> > Hi Tomas,
>
> > As if wrote on mailing list when i try to import some config file
> > from client, so i am getting the following error message.
>
> Ok, how did you try the import the config files? Using rhncfg-manager?
> How? What options did you use? What did the tool write?
> What version of the tool do you use? Does the upload work with another
> version?
>
> Does any other file upload work? What's special on that file? Can you
> attach the file (if it's special)?
>
>
> When I try to upload a config file to my Spacewalk server, it works nice:
> # rhncfg-manager add -c tml-config /etc/rc.d/rc
> Using server name <my-spacewalk-server>
> Pushing to channel tml-config:
> Local file /etc/rc.d/rc -> remote file /etc/rc.d/rc
>
> The file has following permissions:
> # ll -Z /etc/rc.d/rc
> -rwxr-xr-x. root root system_u:object_r:initrc_exec_t:s0 /etc/rc.d/rc
>
> I'm using:
> # rpm -qf `which rhncfg-manager`
> rhncfg-management-5.10.55-11.el6sat.noarch
>
> So, something's different on your setup and we need to find out, what it
> is to fix it.
> So, please, reply to your original post on spacewalk-list with more
> information and we
> try to reproduce your problem on our machines.
>
>
> Regards,
> --
> Tomas Lestach
> Red Hat Satellite Engineering, Red Hat
>
>
> > XML-RPC error while talking to
> > https://spacewalk.magnetdigital.local/CONFIG-MANAGEMENT : cannot
> > marshal None unless allow_none is enabled
> >
> > This failing is occured when certain file was importing from client
> > side !
> >
> > Error:
> > Fatal error in Python code occurred [[6]]
> >
> > Log details:
> >
> > Client Side: (with rhn_check)
> >
> > D: rpcServer: Calling XMLRPC up2date.login
> > D: writeCachedLogin() invoked
> > D: Wrote pickled loginInfo at 1411740455.82 with expiration of
> > 1411744055.82 seconds.
> > successfully retrieved authentication token from up2date server
> > D: logininfo:{'X-RHN-Server-Id': 1000010070,
> > 'X-RHN-Auth-Server-Time': '1411740455.82', 'X-RHN-Auth':
> > 'FcuDYwtb6ExqolBbzQlV1kHDG/
> > ZKOK2SVFx/VEpUISA=', 'X-RHN-Auth-Channels':
> > [['centos6.5-x86_64-base', '20140926010000', '1', '1'],
> > ['centos6.5-x86_64-update', '20140926040229', '0', '1'],
> > ['centos6.5-x86_64-extras', '20140926013000', '0', '1'],
> > ['centos6-x86_64-epel', '20140926053000', '0', '1'],
> > ['centos6-x86_64-example-special', '20140918114511', '0', '1'],
> > ['centos6-x86_64-spacewalk', '20140926023000', '0', '1']],
> > 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset': '3600.0'}
> > D: handle_action{'action': "<?xml
> >
> version='1.0'?>\n<methodCall>\n<methodName>configfiles.upload</methodName>\n<params>\n<param>\n<value><int>2707</int></value>\n</param>\n<param>\n<value><array><data>\n<value><string>/etc/enginx.txt</string></value>\n</data></array></value>\n</param>\n</params>\n</methodCall>\n",
> > 'version': 2, 'id': 2707}
> > D: handle_action actionid = 2707, version = 2
> > D: do_call configfiles.upload(2707,
> > ['/etc/enginx.txt']){'cache_only': None}
> > XML-RPC error while talking to
> > https://spacewalk.exampledigital.local/CONFIG-MANAGEMENT : cannot
> > marshal None unless allow_none is enabled
> > D: Sending back response((6,), 'Fatal error in Python code occurred',
> > {})
> >
> >
> > Server Side: (rhn_server_xmlrpc.log)
> >
> > 2014/09/26 17:12:57 +03:00 62539 192.168.132.116 :
> > xmlrpc/queue.get(1000010179, 2, 'checkins enabled')
> > 2014/09/26 17:12:57 +03:00 63721 192.168.132.116 :
> > xmlrpc/up2date.login(1000010179,)
> > 2014/09/26 17:12:57 +03:00 62521 192.168.132.116 :
> > xmlrpc/up2date.listChannels(1000010179,)
> > 2014/09/26 17:13:07 +03:00 62527 192.168.132.116 :
> > xmlrpc/registration.welcome_message('lang: None',)
> > 2014/09/26 17:13:07 +03:00 62539 192.168.132.116 :
> > xmlrpc/registration.update_packages(1000010179, 'packages: 391')
> > 2014/09/26 17:13:08 +03:00 63721 192.168.132.116 :
> > xmlrpc/registration.welcome_message('lang: None',)
> >
> >
> > Is there any solution or patch to fix this problem !
> >
> > Thanks in advance.
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20141018/42865077/attachment.htm>


More information about the Spacewalk-list mailing list