Bug 1020415

Summary: first time sync of rhel6-4 sync from cdn seems to be failing
Product: [Retired] Pulp Reporter: Preethi Thomas <pthomas>
Component: rpm-supportAssignee: Michael Hrivnak <mhrivnak>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: high Docs Contact:
Priority: urgent    
Version: MasterCC: mhrivnak
Target Milestone: ---   
Target Release: 2.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-09 14:30:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Preethi Thomas 2013-10-17 15:47:51 UTC
Description of problem:
The first time you sync rhel6-4 repo from cdn, it fails. But if you sync the same repo again the error seems to go away.

Version-Release number of selected component (if applicable):
[root@qe-blade-10 ~]# rpm -qa pulp-server
pulp-server-2.3.0-0.22.beta.fc19.noarch
[root@qe-blade-10 ~]# 


How reproducible:


Steps to Reproduce:
1. create a rhel6-4 cdn repo
2. Run the sync
3.

Actual results:
[root@qe-blade-10 ~]# pulp-admin rpm repo create --repo-id rhel6-4 --feed https://cdn.redhat.com/content/dist/rhel/rhui/server/6/6.4/x86_64/os/ --feed-ca-cert CDN/cdn.redhat.com-chain.crt --feed-cert CDN/1359391926_4512.crt  --feed-key CDN/1359391926_4512.key --proxy-host http://pulp-proxy.usersys.redhat.com --proxy-port 3128
Successfully created repository [rhel6-4]

[root@qe-blade-10 ~]# pulp-admin rpm repo sync run --repo-id rhel6-4
+----------------------------------------------------------------------+
                   Synchronizing Repository [rhel6-4]
+----------------------------------------------------------------------+

This command may be exited by pressing ctrl+c without affecting the actual
operation on the server.

Downloading metadata...
[\]
... completed

Downloading repository content...
[==================================================] 100%
RPMs:       11029/11029 items
Delta RPMs: 0/0 items

... completed

Individual package errors encountered during sync:

An unexpected error has occurred. More information can be found in the client
log file ~/.pulp/admin.log.

[root@qe-blade-10 ~]# 


from pulp.log 
[root@qe-blade-10 ~]# 

2013-10-17 11:37:48,809 pulp.plugins.pulp_rpm.yum_plugin.updateinfo:ERROR: Error writing updateinfo.xml to path /var/lib/pulp/working/repos/rhel6-4/distributors/yum_distributor/updateinfo.xml: 'ascii' codec can't decode byte 0xc3 in position 1200: ordinal not in range(128)

Expected results:


Additional info:

Comment 1 Michael Hrivnak 2013-10-17 19:03:14 UTC
2013-10-17 15:02:20,582 pulp.plugins.pulp_rpm.yum_plugin.updateinfo:ERROR: Error writing updateinfo.xml to path /var/lib/pulp/working/repos/rhel6-4/distributors/yum_distributor/updateinfo.xml: 'ascii' codec can't decode byte 0xc3 in position 1200: ordinal not in range(128)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp_rpm/yum_plugin/updateinfo.py", line 189, in updateinfo
    updateinfo_xml = um.xml(fileobj=f)
  File "/usr/lib/python2.7/site-packages/yum/update_md.py", line 594, in xml
    fileobj.write(notice.xml())
  File "/usr/lib/python2.7/site-packages/pulp_rpm/yum_plugin/updateinfo.py", line 44, in remove_extra_pkglist_closing_tag
    orig_xml = YUM_UPDATE_MD_UPDATE_NOTICE_ORIG_XML_METHOD(self)
  File "/usr/lib/python2.7/site-packages/yum/update_md.py", line 396, in xml
    to_xml(pkg['filename']))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1200: ordinal not in range(128)

Comment 2 Michael Hrivnak 2013-10-18 15:27:10 UTC
https://github.com/pulp/pulp_rpm/pull/358

Comment 3 Jeff Ortel 2013-10-19 00:42:58 UTC
build: 2.3.0-0.23.beta

Comment 4 Preethi Thomas 2013-10-21 12:01:38 UTC
verified
[root@qe-blade-03 ~]# rpm -qa |grep pulp-server
pulp-server-2.3.0-0.23.beta.fc19.noarch
[root@qe-blade-03 ~]# 

No error on syncing

2013-10-20 23:45:43,582 pulp.plugins.pulp_rpm.yum_plugin.updateinfo:INFO: updateinfo.xml generated and written to file /var/lib/pulp/working/repos/rhel64-os/distributors/yum_distributor/updateinfo.xml
2013-10-20 23:48:08,682 pulp.plugins.pulp_rpm.yum_plugin.metadata:INFO: Modifying repo for updateinfo metadata
2013-10-20 23:48:09,021 pulp.plugins.pulp_rpm.yum_plugin.metadata:INFO: modifyrepo with /var/lib/pulp/working/repos/rhel64-os/distributors/yum_distributor/updateinfo.xml on /var/lib/pulp/working/repos/rhel64-os/distributors/yum_distributor/repodata finished
[root@qe-blade-03 ~]#

Comment 5 Preethi Thomas 2013-12-09 14:30:30 UTC
Pulp 2.3 released.