Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionJustin Sherrill
2015-03-06 20:26:22 UTC
Created attachment 998998[details]
puppet module in question
Description of problem:
Publishing a content view with the attached puppet module fails. It may have to do with non-ascii text in the module, it is unclear.
Attached the example module.
Version-Release number of selected component (if applicable):
seen on pulp-2.5.1 and pulp-2.6.0-0.7.beta
How reproducible:
Always
Steps to Reproduce:
1. Create a puppet repo
2. Upload attached puppet module
3. Add the module to a content view
4. Attempt to publish content view
Actual results:
Fails
Expected results:
Succeeds
Additional info:
The puppet install distributor in pulp fails with the following traceback:
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/celery/app/trace.py",
line 240, in trace_task
R = retval = fun(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/pulp/server/async/tasks.py",
line 328, in __call__
return super(Task, self).__call__(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/celery/app/trace.py", line 437, in
__protected_call__
return self.run(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/publish.py",
line 99, in publish
transfer_repo, conduit, call_config)
File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/publish.py",
line 127, in _do_publish
publish_report = publish_repo(transfer_repo, conduit,
call_config)
File "/usr/lib/python2.6/site-packages/pulp/server/async/tasks.py",
line 483, in wrap_f
return f(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/pulp_puppet/plugins/distributors/installdistributor.py",
line 129, in publish_repo
self._rename_directory(unit, temporarydestination,
archive.getnames())
File "/usr/lib/python2.6/site-packages/pulp_puppet/plugins/distributors/installdistributor.py",
line 219, in _rename_directory
shutil.move(before, after)
File "/usr/lib64/python2.6/shutil.py",
line 256, in move
raise Error, "Cannot move a directory '%s' into itself
'%s'." % (src, dst)
Error: Cannot move a directory '/etc/puppet/environments/KT_Default_Organization_Library_RHEL_70_x86_64_Content_Host_10/pulpLMQUgA/ssh_key'
into itself '/etc/puppet/environments/KT_Default_Organization_Library_RHEL_70_x86_64_Content_Host_10/pulpLMQUgA/ssh_key'.
I was able to reproduce only on EL6. Once an uploaded puppet module is uploaded, Pulp extracts the contents and then renames the top level directory to match the unit key. If the top level directory already has that name, shutil.move is still called. Python 2.6 throws an exception while Python 2.7 lets this happen.
To make this happen using pic, I did the following:
1. Download the modules attached to this bugzilla.
2. mv ssh_key.0.1.0.tar.gz me-ssh_key-0.1.0.tar.gz
3. sudo mkdir /etc/puppet/myforges
4. sudo chown apache:apache /etc/puppet/myforges
5. sudo semanage boolean --modify --on pulp_manage_puppet
6. pulp-admin puppet repo create --repo-id test
7. pulp-admin puppet repo uploads upload -f me-ssh_key-0.1.0.tar.gz --repo-id test
8. open interactive python interpreter and paste the following
from pulp.common import pic
pic.connect()
pic.POST('/v2/repositories/test/distributors/', {'distributor_type_id':'puppet_install_distributor', 'distributor_id':'puppet_tmp_install_distributor', 'auto_publish': False, 'distributor_config': {'install_path':'/etc/puppet/myforges/test'}})
pic.connect()
pic.POST('/pulp/api/v2/repositories/test/actions/publish/', {'id':
"puppet_tmp_install_distributor"})
Created attachment 998998 [details] puppet module in question Description of problem: Publishing a content view with the attached puppet module fails. It may have to do with non-ascii text in the module, it is unclear. Attached the example module. Version-Release number of selected component (if applicable): seen on pulp-2.5.1 and pulp-2.6.0-0.7.beta How reproducible: Always Steps to Reproduce: 1. Create a puppet repo 2. Upload attached puppet module 3. Add the module to a content view 4. Attempt to publish content view Actual results: Fails Expected results: Succeeds Additional info: The puppet install distributor in pulp fails with the following traceback: Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/celery/app/trace.py", line 240, in trace_task R = retval = fun(*args, **kwargs) File "/usr/lib/python2.6/site-packages/pulp/server/async/tasks.py", line 328, in __call__ return super(Task, self).__call__(*args, **kwargs) File "/usr/lib/python2.6/site-packages/celery/app/trace.py", line 437, in __protected_call__ return self.run(*args, **kwargs) File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/publish.py", line 99, in publish transfer_repo, conduit, call_config) File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/publish.py", line 127, in _do_publish publish_report = publish_repo(transfer_repo, conduit, call_config) File "/usr/lib/python2.6/site-packages/pulp/server/async/tasks.py", line 483, in wrap_f return f(*args, **kwargs) File "/usr/lib/python2.6/site-packages/pulp_puppet/plugins/distributors/installdistributor.py", line 129, in publish_repo self._rename_directory(unit, temporarydestination, archive.getnames()) File "/usr/lib/python2.6/site-packages/pulp_puppet/plugins/distributors/installdistributor.py", line 219, in _rename_directory shutil.move(before, after) File "/usr/lib64/python2.6/shutil.py", line 256, in move raise Error, "Cannot move a directory '%s' into itself '%s'." % (src, dst) Error: Cannot move a directory '/etc/puppet/environments/KT_Default_Organization_Library_RHEL_70_x86_64_Content_Host_10/pulpLMQUgA/ssh_key' into itself '/etc/puppet/environments/KT_Default_Organization_Library_RHEL_70_x86_64_Content_Host_10/pulpLMQUgA/ssh_key'.