Bug 700916

Summary: repo sync on el5 returns syntax error
Product: [Retired] Pulp Reporter: dgao
Component: z_otherAssignee: Pradeep Kilambi <pkilambi>
Status: CLOSED CURRENTRELEASE QA Contact: dgao
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: pthomas, skarmark
Target Milestone: ---Keywords: Triaged
Target Release: Sprint 25   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-16 12:07:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 647488    

Description dgao 2011-04-29 19:29:58 UTC
pulp-admin repo create --id=foo --feed=yum:http://10.16.76.78/pub/updates/

[root@pulp-qe-rhel5 ~]# pulp-admin repo sync --id=foo -F
Sync for repository foo started
Sync: Error

Item Details: 
Rpms: 7/7
SyntaxError: not well-formed (invalid token): line 1, column 0

[root@pulp-qe-rhel5 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 5.6 (Tikanga)
[root@pulp-qe-rhel5 ~]# 

pulp.log

2011-04-29 15:24:25,967 [ERROR][Thread-7] @ task.py:385 - Task id:4ab9931e-7296-11e0-9861-54520018f654, method_name:_sync:
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/pulp/server/tasking/task.py", line 335, in run
    result = self.callable(*self.args, **self.kwargs)
  File "/usr/lib/python2.4/site-packages/pulp/server/api/repo.py", line 1507, in _sync
    threads)
  File "/usr/lib/python2.4/site-packages/pulp/server/api/repo_sync.py", line 149, in sync
    return synchronizer.add_packages_from_dir(repo_dir, repo, skip_dict)
  File "/usr/lib/python2.4/site-packages/pulp/server/api/repo_sync.py", line 248, in add_packages_from_dir
    added_errataids = self.sync_updateinfo_data(updateinfo_xml_path, repo)
  File "/usr/lib/python2.4/site-packages/pulp/server/api/repo_sync.py", line 384, in sync_updateinfo_data
    errata = updateinfo.get_errata(updateinfo_xml_path)
  File "/usr/lib/python2.4/site-packages/pulp/server/updateinfo.py", line 70, in get_errata
    uinfos = get_update_notices(path_to_updateinfo)
  File "/usr/lib/python2.4/site-packages/pulp/server/updateinfo.py", line 55, in get_update_notices
    um.add(path_to_updateinfo)
  File "/usr/lib/python2.4/site-packages/yum/update_md.py", line 424, in add
    for event, elem in iterparse(infile):
  File "<string>", line 64, in __iter__
SyntaxError: not well-formed (invalid token): line 1, column 0

Comment 1 Pradeep Kilambi 2011-06-16 21:43:42 UTC
The issue is with modifyrepo and how it stacks .gz when we run it. We now use a newer version of createrepo in pulp repo for el5..pulp now requires this version of createrepo.

with newer createrepo
# rpm -q createrepo
createrepo-0.9.8-3

# pulp-admin repo sync -F --id=foobar
Sync for repository foobar started
Sync: Finished
0/7 new items downloaded
7/7 existing items processed

Item Details: 
Rpms: 7/7

Comment 2 Jeff Ortel 2011-06-17 21:10:13 UTC
build: 0.192

Comment 3 dgao 2011-06-21 21:51:38 UTC
[root@pulp-qe-rhel5 ~]# pulp-admin repo create --id=foo --feed=http://10.16.76.78/pub/updates/
Successfully created repository [ foo ]

[root@pulp-qe-rhel5 ~]# pulp-admin repo sync --id=foo -F
Sync for repository foo started
You can safely CTRL+C this current command and it will continue
Waiting /
Step: Downloading Metadata
Waiting -
Step: Downloading Items or Verifying
[                         ] 0%
Rpms: 0/7
Total: 0/7 items
Step: Downloading Items or Verifying
[========                 ] 33%
Rpms: 4/7
Total: 4/7 items
Step: Running Createrepo
Waiting \
Step: Running Createrepo
Waiting |
Step: Running Createrepo
Waiting /
Step: Importing data into pulp
Waiting -
Step: Importing data into pulp
Waiting \
Step: Importing data into pulp
Waiting |
Step: Importing data into pulp
Waiting /
Sync: Finished
0/7 new items downloaded
7/7 existing items processed

Item Details: 
Rpms: 7/7

[root@pulp-qe-rhel5 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 5.6 (Tikanga)

Comment 4 Preethi Thomas 2011-08-16 12:07:27 UTC
Closing with Community Release 15

pulp-0.0.223-4.

Comment 5 Preethi Thomas 2011-08-16 12:21:03 UTC
Closing with Community Release 15

pulp-0.0.223-4.