Project

Profile

Help

Issue #1856

publishing kickstart repo fails on EL6

Added by dkliban@redhat.com over 4 years ago. Updated over 1 year ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
2.8.2
Platform Release:
2.8.3
OS:
RHEL 6
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

The following traceback is present in the logs when trying to publish a kickstart repo on EL6

celery.worker.job:ERROR: (21227-18496) Traceback (most recent call last):
celery.worker.job:ERROR: (21227-18496)   File "/usr/lib/python2.6/site-packages/celery/app/trace.py", line 240, in trace_task
celery.worker.job:ERROR: (21227-18496)     R = retval = fun(*args, **kwargs)
celery.worker.job:ERROR: (21227-18496)   File "/usr/lib/python2.6/site-packages/pulp/server/async/tasks.py", line 473, in __call__
celery.worker.job:ERROR: (21227-18496)     return super(Task, self).__call__(*args, **kwargs) 
celery.worker.job:ERROR: (21227-18496)   File "/usr/lib/python2.6/site-packages/pulp/server/async/tasks.py", line 103, in __call__
celery.worker.job:ERROR: (21227-18496)     return super(PulpTask, self).__call__(*args, **kwargs)
celery.worker.job:ERROR: (21227-18496)   File "/usr/lib/python2.6/site-packages/celery/app/trace.py", line 437, in __protected_call__
celery.worker.job:ERROR: (21227-18496)     return self.run(*args, **kwargs)
celery.worker.job:ERROR: (21227-18496)   File "/usr/lib/python2.6/site-packages/pulp/server/controllers/repository.py", line 971, in publish
celery.worker.job:ERROR: (21227-18496)     result = _do_publish(repo_obj, dist_id, dist_inst, transfer_repo, conduit, call_config)
celery.worker.job:ERROR: (21227-18496)   File "/usr/lib/python2.6/site-packages/pulp/server/controllers/repository.py", line 1023, in _do_publish
celery.worker.job:ERROR: (21227-18496)     publish_report = publish_repo(transfer_repo, conduit, call_config)
celery.worker.job:ERROR: (21227-18496)   File "/usr/lib/python2.6/site-packages/pulp/server/async/tasks.py", line 658, in wrap_f
celery.worker.job:ERROR: (21227-18496)     return f(*args, **kwargs) 
celery.worker.job:ERROR: (21227-18496)   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/distributors/yum/distributor.py", line 174, in publish_repo
celery.worker.job:ERROR: (21227-18496)     return self._publisher.process_lifecycle()  
celery.worker.job:ERROR: (21227-18496)   File "/usr/lib/python2.6/site-packages/pulp/plugins/util/publish_step.py", line 562, in process_lifecycle
celery.worker.job:ERROR: (21227-18496)     super(PluginStep, self).process_lifecycle() 
celery.worker.job:ERROR: (21227-18496)   File "/usr/lib/python2.6/site-packages/pulp/plugins/util/publish_step.py", line 159, in process_lifecycle
celery.worker.job:ERROR: (21227-18496)     step.process()
celery.worker.job:ERROR: (21227-18496)   File "/usr/lib/python2.6/site-packages/pulp/plugins/util/publish_step.py", line 232, in process
celery.worker.job:ERROR: (21227-18496)     self._process_block(item=item)
celery.worker.job:ERROR: (21227-18496)   File "/usr/lib/python2.6/site-packages/pulp/plugins/util/publish_step.py", line 291, in _process_block
celery.worker.job:ERROR: (21227-18496)     self.process_main(item=item)
celery.worker.job:ERROR: (21227-18496)   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/distributors/yum/publish.py", line 748, in process_main
celery.worker.job:ERROR: (21227-18496)     self._publish_distribution_files(unit)
celery.worker.job:ERROR: (21227-18496)   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/distributors/yum/publish.py", line 816, in _publish_distribution_files
celery.worker.job:ERROR: (21227-18496)     self._write_pulp_distribution_file(distro_files, xml_file_path)
celery.worker.job:ERROR: (21227-18496)   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/distributors/yum/publish.py", line 835, in _write_pulp_distribution_file
celery.worker.job:ERROR: (21227-18496)     old_files = [old_element.text for old_element in old_xml_root.iter('file')]
celery.worker.job:ERROR: (21227-18496) AttributeError: iter

This is due to Element.iter() method not being available on Python 2.6.

Associated revisions

Revision 8c2ea72b View on GitHub
Added by mhrivnak over 4 years ago

adding a unit test for _write_pulp_distribution_file

https://pulp.plan.io/issues/1856

re #1856

Revision 153b67ea View on GitHub
Added by dkliban@redhat.com over 4 years ago

Makes publishing kickstart trees compatible with Python 2.6

Element.getiterator() is depricated in Python 2.7, but still available. However, Element.iter() is not available in Python 2.6.

fixes #1856 https://pulp.plan.io/issues/1856

History

#2 Updated by mhrivnak over 4 years ago

A unit test to reproduce it: https://github.com/pulp/pulp_rpm/pull/851

#3 Updated by dkliban@redhat.com over 4 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#4 Updated by semyers over 4 years ago

  • Status changed from MODIFIED to 5

#5 Updated by dkliban@redhat.com over 4 years ago

  • Triaged changed from No to Yes

#6 Updated by pthomas@redhat.com over 4 years ago

verified
[root@ibm-x3250m4-03 ~]# rpm -qa pulp-server
pulp-server-2.8.3-0.2.beta.el6.noarch
[root@ibm-x3250m4-03 ~]#

[root@ibm-x3250m4-03 ~]# pulp-admin rpm repo publish run --repo-id rhel6
+----------------------------------------------------------------------+
                     Publishing Repository [rhel6]
+----------------------------------------------------------------------+

This command may be exited via ctrl+c without affecting the request.

Copying files
[-]
... completed

Initializing repo metadata
[-]
... completed

Publishing Distribution files
[|]
... completed

Publishing RPMs
[/]
... completed

Publishing Delta RPMs
... skipped

Publishing Errata
[-]
... completed

Publishing Comps file
[==================================================] 100%
212 of 212 items
... completed

Publishing Metadata.
[-]
... completed

Closing repo metadata
[-]
... completed

Generating sqlite files
... skipped

Publishing files to web
[\]
... completed

Writing Listings File
[-]
... completed

Writing Listings File
[-]
... completed

Task Succeeded

#7 Updated by pthomas@redhat.com over 4 years ago

  • Status changed from 5 to 6

#8 Updated by semyers over 4 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE

#10 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF