Description of problem: If you run rpm repo export with --export-dir option and use a directory that doesn't exist or apache does not have the right permissions, the cli does not display any errors. Version-Release number of selected component (if applicable): [root@pulp-v2-server ~]# rpm -qa pulp-server pulp-server-2.3.0-0.14.alpha.el6.noarch [root@pulp-v2-server ~]# How reproducible: Steps to Reproduce: 1. Run repo export with --export-dir <dir-not-exist> 2. 3. Actual results: [root@pulp-v2-server ~]# pulp-admin rpm repo export run --repo-id SAM --export-dir /tmp/SAM-REPO1 +----------------------------------------------------------------------+ Publishing Repository [SAM] +----------------------------------------------------------------------+ The following publish configuration options will be used: Export Dir: /tmp/SAM-REPO1 This command may be exited by pressing ctrl+c without affecting the actual operation on the server. Expected results: Additional info: 013-09-25 12:46:28,381 pulp.plugins.pulp_rpm.yum_plugin.metadata:INFO: Metadata generation finished in 0.964037895203 seconds 2013-09-25 12:46:28,385 pulp.server.dispatch.task:INFO: SUCCESS: Task 5021a67a-c0ff-4d94-a66a-6f6750d4e6c2: CallRequest: RepoPublishManager.publish(u'SAM', 'export_distributor', publish_config_override={'export_dir': '/tmp/SAM-REPO'}) 2013-09-25 12:51:19,071 pulp.server.managers.repo.publish:ERROR: Exception caught from plugin during publish for repo [SAM] Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/publish.py", line 121, in _do_publish publish_report = distributor_instance.publish_repo(transfer_repo, conduit, call_config) File "/usr/lib/pulp/plugins/distributors/iso_distributor/distributor.py", line 140, in publish_repo raise PulpDataException(msg) PulpDataException: Value for 'export_dir' is not an existing directory: /tmp/SAM-REPO1 2013-09-25 12:51:19,072 pulp.server.dispatch.task:ERROR: Pulp exception occurred: PulpExecutionException Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/pulp/server/dispatch/task.py", line 138, in _run result = call(*args, **kwargs) File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/publish.py", line 97, in publish result = self._do_publish(repo, distributor_id, distributor_instance, transfer_repo, conduit, call_config) File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/publish.py", line 121, in _do_publish publish_report = distributor_instance.publish_repo(transfer_repo, conduit, call_config) File "/usr/lib/pulp/plugins/distributors/iso_distributor/distributor.py", line 140, in publish_repo raise PulpDataException(msg) PulpExecutionException: Pulp exception occurred: PulpExecutionException 2013-09-25 12:51:19,073 pulp.server.dispatch.task:INFO: FAILURE: Task 06461431-6eed-48c3-a905-cadca29b2382: CallRequest: RepoPublishManager.publish(u'SAM', 'export_distributor', publish_config_override={'export_dir': '/tmp/SAM-REPO1'})
This works for me on Pulp 2.5.0. Marking bug as ON_QA for 2.5.1 for verification.
Failed QA >> rpm -qa | grep pulp-server pulp-server-2.5.0-0.18.rc.fc20.noarch >> pulp-admin rpm repo list +----------------------------------------------------------------------+ RPM Repositories +----------------------------------------------------------------------+ Id: gena Display Name: gena Description: None Content Unit Counts: Rpm: 2 >> ls -l | grep tmp drwxrwxrwt. 8 apache apache 4096 Nov 13 13:27 tmp >> ls -l /tmp total 4 srwxrwxrwx. 1 mongodb mongodb 0 Oct 14 10:47 mongodb-27017.sock drwx------. 3 root root 4096 Nov 12 19:33 systemd-httpd.service-Xzx1e87 >> pulp-admin rpm repo export run --repo-id gena --export-dir /tmp/blabla +----------------------------------------------------------------------+ Publishing Repository [gena] +----------------------------------------------------------------------+ The following publish configuration options will be used: Export Dir: /tmp/blabla This command may be exited via ctrl+c without affecting the request. Initializing repo metadata [-] ... completed Publishing Distribution files [-] ... completed Publishing RPMs [==================================================] 100% 2 of 2 items ... completed Publishing Delta RPMs ... skipped Publishing Errata [-] ... completed Publishing Comps file [-] ... completed Publishing Metadata. [-] ... completed Closing repo metadata [-] ... completed Generating sqlite files ... skipped Copying files [-] ... failed [(u'/var/lib/pulp/working/repos/gena/distributors/export_distributor/repodata', u'/tmp/blabla/gena/repodata', "[Errno 13] Permission denied: '/tmp/blabla/gena/repodata'"), (u'/var/lib/pulp/working/repos/gena/distributors/export_distributor', u'/tmp/blabla/gena', "[Errno 13] Permission denied: '/tmp/blabla/gena'")] Task Failed [(u'/var/lib/pulp/working/repos/gena/distributors/export_distributor/repodata', u'/tmp/blabla/gena/repodata', "[Errno 13] Permission denied: '/tmp/blabla/gena/repodata'"), (u'/var/lib/pulp/working/repos/gena/distributors/export_distributor', u'/tmp/blabla/gena', "[Errno 13] Permission denied: '/tmp/blabla/gena'")] >> ls -l /tmp total 8 drwxr-xr-x. 3 apache apache 4096 Nov 13 13:29 blabla srwxrwxrwx. 1 mongodb mongodb 0 Oct 14 10:47 mongodb-27017.sock drwx------. 3 root root 4096 Nov 12 19:33 systemd-httpd.service-Xzx1e87 >> ls -l /tmp/blabla/ total 4 drwxr-xr-x. 3 apache apache 4096 Nov 13 13:29 gena
Related to https://bugzilla.redhat.com/show_bug.cgi?id=1163810
https://github.com/pulp/pulp/pull/1413
fixed in pulp 2.6.0-0.2.beta
verified [root@gizmo ~]# rpm -qa pulp-server pulp-server-2.6.0-0.5.beta.el6.noarch [root@gizmo ~]# [root@gizmo ~]# [root@gizmo ~]# ls -la /tmp/ total 36 drwxrwxrwt. 3 root root 4096 Jan 28 12:46 . dr-xr-xr-x. 23 root root 4096 Jan 22 21:14 .. drwxrwxrwt. 2 root root 4096 Jan 23 01:57 .ICE-unix -rwx------. 1 root root 11814 Jan 23 01:52 ks-script-oKwnk4 srwxrwxrwx. 1 mongodb mongodb 0 Jan 22 21:11 mongodb-27017.sock -rw-------. 1 root root 11583 Jan 22 20:58 tmp.jLsUL1 -rw-------. 1 root root 0 Jan 23 01:45 yum.log [root@gizmo ~]# pulp-admin rpm repo export run --repo-id epel5 --export-dir /tmp/foo Warning: path should have mode 0700 because it may contain sensitive information: /root/.pulp/ +----------------------------------------------------------------------+ Publishing Repository [epel5] +----------------------------------------------------------------------+ The following publish configuration options will be used: Export Dir: /tmp/foo This command may be exited via ctrl+c without affecting the request. Initializing repo metadata [-] ... completed Publishing Distribution files [-] ... completed Publishing RPMs [==================================================] 100% 6674 of 6674 items ... completed Publishing Delta RPMs ... skipped Publishing Errata [==================================================] 100% 1948 of 1948 items ... completed Publishing Comps file [==================================================] 100% 41 of 41 items ... completed Publishing Metadata. [-] ... completed Closing repo metadata [-] ... completed Generating sqlite files ... skipped Copying files [|] ... completed Writing Listings File [-] ... completed Task Succeeded
Moved to https://pulp.plan.io/issues/373