Bug 608672 - pulp repo sync errors out for rhel channels
Summary: pulp repo sync errors out for rhel channels
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
: ---
Assignee: Pradeep Kilambi
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: verified-to-close
TreeView+ depends on / blocked
 
Reported: 2010-06-28 12:52 UTC by Preethi Thomas
Modified: 2011-08-16 14:02 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-08-16 14:02:34 UTC
Embargoed:


Attachments (Terms of Use)

Description Preethi Thomas 2010-06-28 12:52:14 UTC
Description of problem:


[root@preethi pulp]# pulp repo create --label=rhel-i386-server-5 --name=rhel-i386-server-5 --arch=i386 --feed=rhn:satellite.rhn.redhat.com/rhel-i386-server-5
 Successfully created Repo [ rhel-i386-server-5 ] with feed [ {'url': 'satellite.rhn.redhat.com/rhel-i386-server-5', 'type': 'rhn', 'supported_types': ['yum', 'local', 'rhn']} ]
[root@preethi pulp]# pulp repo sync --label=rhel-i386-server-5
Sync Status:: error
Error : TypeError: cannot marshal None unless allow_none is enabled

[root@preethi pulp]# rpm -qa |grep pulp
pulp-tools-0.0.28-1.git.44.1668a5d.fc13.noarch
pulp-0.0.28-1.git.44.1668a5d.fc13.noarch
[root@preethi pulp]#

Comment 1 wes hayutin 2010-06-28 13:08:19 UTC
[root@localhost pulp]# git show
commit 1668a5de9e6d87f7a518fecab47ce7b6cb27d198



[root@localhost httpd]# pulp repo create --label=TAKE3rhel-i386-server-5 --name=rhel-i386-server-5 --arch=i386 --feed=rhn:satellite.rhn.redhat.com/rhel-i386-server-5
 Successfully created Repo [ TAKE3rhel-i386-server-5 ] with feed [ {'url': 'satellite.rhn.redhat.com/rhel-i386-server-5', 'type': 'rhn', 'supported_types': ['yum', 'local', 'rhn']} ]

Comment 2 Preethi Thomas 2010-06-28 13:48:42 UTC
[root@preethi pulp]# cp /root/pulp/src/crontab.py /usr/lib/python2.6/site-packages/pulp-0.0.6-py2.6.egg/pulp/agent.py   agent.pyc  api/
cp: target `api/' is not a directory
[root@preethi pulp]# cp /root/pulp/src/crontab.py /usr/lib/python2.6/site-packages/pulp-0.0.6-py2.6.egg/pulp/api/
[root@preethi pulp]# /etc/init.d/httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
                                                           [  OK  ]
[root@preethi pulp]# pulp repo sync --label=rhel-i386-server-5Sync Status:: error
Error : TypeError: cannot marshal None unless allow_none is enabled

Comment 3 Preethi Thomas 2010-06-28 14:47:39 UTC
V

Comment 4 Preethi Thomas 2010-06-28 14:48:58 UTC
verified
working after  copying the systemid & entitlement files.

Comment 5 Preethi Thomas 2010-09-22 13:45:49 UTC
reopening this seems to be failing now


[root@preethi rhn]# rpm -qa |grep pulp
pulp-client-0.0.65-1.fc13.noarch
pulp-common-0.0.65-1.fc13.noarch
pulp-0.0.65-1.fc13.noarch
[root@preethi rhn]# rpm -qa |grep grinder
grinder-0.0.61-1.fc13.noarch


[root@preethi rhn]# pulp-admin -u admin -p admin repo sync --id=rhel-i386-server-5
Task created with ID:: 00618d54-c651-11df-a0e0-002564a85a58
Sync Status:: error
Error : TypeError: cannot marshal None unless allow_none is enabled



And from the log

2010-09-22 09:37:29,400 [ERROR][Dummy-3] check_admin_cert() @ role_check.py:177 - ID in admin certificate for user [admin] was incorrect
2010-09-22 09:37:29,495 [ERROR][Dummy-3] check_admin_cert() @ role_check.py:177 - ID in admin certificate for user [admin] was incorrect
2010-09-22 09:37:29,594 [INFO][Thread-4] sync() @ repo_sync.py:452 - Synchronizing from RHN. Host [http://satellite.rhn.redhat.com], Channel [rhel-i386-server-5]
2010-09-22 09:37:29,595 [ERROR][Thread-4] run() @ task.py:144 - Task id:8b9290ba-c64e-11df-87eb-002564a85a58, method_name:_sync:
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/tasking/task.py", line 127, in run
    result = self.callable(*self.args, **self.kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/server/api/repo.py", line 635, in _sync
    sync_packages, sync_errataids = repo_sync.sync(repo, repo_source, progress_callback)
  File "/usr/lib/python2.6/site-packages/pulp/server/api/repo_sync.py", line 69, in sync
    repo_dir = synchronizer.sync(repo, repo_source, progress_callback)
  File "/usr/lib/python2.6/site-packages/pulp/server/api/repo_sync.py", line 461, in sync
    s.syncPackages(channel, savePath=dest_dir, callback=progress_callback)
  File "/usr/lib/python2.6/site-packages/grinder/RHNSync.py", line 366, in syncPackages
    packages = satDump.getChannelPackages(self.systemid, channelLabel)
  File "/usr/lib/python2.6/site-packages/grinder/SatDumpClient.py", line 105, in getChannelPackages
    dom = self.client.dump.channels(systemId, [channelLabel])
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1483, in __request
    allow_none=self.__allow_none)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1132, in dumps
    data = m.dumps(params)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 677, in dumps
    dump(v, write)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 699, in __dump
    f(self, value, write)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 703, in dump_nil
    raise TypeError, "cannot marshal None unless allow_none is enabled"
TypeError: cannot marshal None unless allow_none is enabled

2010-09-22 09:37:34,668 [ERROR][MainThread] check_admin_cert() @ role_check.py:177 - ID in admin certificate for user [admin] was incorrect
2010-09-22 09:37:34,827 [ERROR][Dummy-3] check_admin_cert() @ role_check.py:177 - ID in admin certificate for user [admin] was incorrect

Comment 6 John Matthews 2010-09-24 13:07:34 UTC
Issue was systemID was not readable, permission problem.

Will change grinder to throw an exception when it can't read the systemID

Comment 7 John Matthews 2010-09-24 14:34:20 UTC
Fix included in grinder-0.0.63-1

Commit is here:

http://git.fedorahosted.org/git/?p=grinder.git;a=commit;h=7ed2d9b4a5bd7ae6added285afd388ce7057d232


Test 'systemid' and 'entitlement-cert.xml' not being readable.

1) As a non-root user run a chmod 600 on a systemid or entitlement-cert.xml
2) Run a grinder operation, list channels or sync a channel

Examples:


$ sudo chmod 600 /etc/sysconfig/rhn/systemid
$ grinder rhn -L
grinder.RHNSync: ERROR    Unable to read systemid from /etc/sysconfig/rhn/systemid
Problem with systemid


$ sudo chmod 666 /etc/sysconfig/rhn/entitlement-cert.xml
$ grinder rhn -L
grinder.RHNSync: ERROR    Unable to read cert from /etc/sysconfig/rhn/entitlement-cert.xml
Problem with satellite certificate

Comment 8 Preethi Thomas 2010-09-28 15:54:44 UTC
repoening as the error on pulp-admin repo sync if the systemid does not have the right permission is as follows. It would help to have a more user friendly error.

[root@preethi ~]# pulp-admin repo sync --id=rhel-i386-server-5 -F
Sync for repo rhel-i386-server-5 started
you can safely CTRL+C this current command and it will continue
[                                                     ] 0%
Sync: Error
Traceback (most recent call last):
  File "/usr/bin/pulp-admin", line 30, in <module>
    pulpcli.PulpCore().main()
  File "/usr/lib/python2.6/site-packages/pulp/client/pulpcli.py", line 108, in main
    cmd.main()
  File "/usr/lib/python2.6/site-packages/pulp/client/core/basecore.py", line 151, in main
    self._do_core()
  File "/usr/lib/python2.6/site-packages/pulp/client/core/core_repo.py", line 162, in _do_core
    self._sync()
  File "/usr/lib/python2.6/site-packages/pulp/client/core/core_repo.py", line 351, in _sync
    systemExit("Error : %s" % se)
  File "/usr/lib/python2.6/site-packages/pulp/client/core/basecore.py", line 50, in system_exit
    assert isinstance(msgs, (basestring, list, tuple))
AssertionError
[root@preethi ~]# 



And from the log

2010-09-28 12:03:23,380 [INFO][Thread-20] sync() @ repo_sync.py:462 - Synchronizing from RHN. Host [http://satellite.rhn.redhat.com], Channel [rhel-i386-server-5]
2010-09-28 12:03:23,434 [ERROR][Thread-20] failed() @ task.py:205 - Task id:ea246c1c-cb19-11df-b818-002564a85a58, method_name:_sync:
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/tasking/task.py", line 129, in run
    result = self.callable(*self.args, **self.kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/server/api/repo.py", line 737, in _sync
    sync_packages, sync_errataids = repo_sync.sync(repo, repo_source, progress_callback)
  File "/usr/lib/python2.6/site-packages/pulp/server/api/repo_sync.py", line 70, in sync
    repo_dir = synchronizer.sync(repo, repo_source, progress_callback)
  File "/usr/lib/python2.6/site-packages/pulp/server/api/repo_sync.py", line 471, in sync
    s.syncPackages(channel, savePath=dest_dir, callback=progress_callback)
  File "/usr/lib/python2.6/site-packages/grinder/RHNSync.py", line 370, in syncPackages
    self.init()
  File "/usr/lib/python2.6/site-packages/grinder/RHNSync.py", line 91, in init
    raise BadSystemIdException()
BadSystemIdException: Unable to authenticate systemid, please ensure your system is registered to RHN

Comment 9 Pradeep Kilambi 2011-01-04 18:25:53 UTC
commit 322ba7184127e1344f77fdd46991725d53ebf5fc
Author: Pradeep Kilambi <pkilambi>
Date:   Tue Jan 4 13:25:09 2011 -0500

$ sudo chmod 600 /etc/sysconfig/rhn/systemid

$ sudo pulp-admin repo sync --id=rhntest -F
Sync for repository rhntest started
You can safely CTRL+C this current command and it will continue
[                                                     ] 0%
Sync: Error
BadCertificateException: Unable to read certificate

Comment 10 Jay Dobies 2011-01-05 19:45:24 UTC
Fixed in 0.120.

Comment 11 Preethi Thomas 2011-01-06 21:42:09 UTC
verified

[root@pulp-f13 ~]# rpm -q pulp
pulp-0.0.121-1.fc13.noarch


[root@pulp-f13 ~]# pulp-admin repo sync --id=rhel-i386-server-5 -F
Sync for repository rhel-i386-server-5 started
You can safely CTRL+C this current command and it will continue
[                                                     ] 0%
Sync: Error
BadCertificateException: Unable to read certificate

Comment 12 Preethi Thomas 2011-08-16 14:02:34 UTC
Closing with Community Release 15

pulp-0.0.223-4.


Note You need to log in before you can comment on or make changes to this bug.