Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 990715 - the pulp-admin cli does not report a failed publish operation
Summary: the pulp-admin cli does not report a failed publish operation
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: rpm-support
Version: 2.2
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: 2.4.0
Assignee: Barnaby Court
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-31 20:13 UTC by Jeremy Cline
Modified: 2014-08-09 06:54 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-09 06:54:28 UTC


Attachments (Terms of Use)

Description Jeremy Cline 2013-07-31 20:13:59 UTC
Description of problem: If a publish fails during a sync (or and explicit publish using 'pulp-admin rpm repo publish run'), the command line gives no indication to the user that the publish failed. 


Version-Release number of selected component (if applicable): master


How reproducible: always


Steps to Reproduce:
1. Create a repository: pulp-admin rpm repo create --repo-id=zoo --feed=http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/
2. Cause the yum distributor (pulp_rpm/pulp_rpm/plugins/yum_distributor/distributor) to fail by adding a line to raise an exception in the publish_repo method
3. sudo systemctl restart httpd.service
4. pulp-admin rpm repo sync run --repo-id=zoo
5. pulp-admin rpm repo publish run --repo-id=zoo


Actual results:
[jcline@jcline-desk pulp_rpm]$ pulp-admin rpm repo sync run --repo-id=zoo
+----------------------------------------------------------------------+
                     Synchronizing Repository [zoo]
+----------------------------------------------------------------------+

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:       32/32 items
Delta RPMs: 0/0 items

... completed

Downloading distribution files...
[==================================================] 100%
Distributions: 0/0 items
... completed

Importing errata...
[-]
... completed

Importing package groups/categories...
[-]
... completed

Publishing packages...
[==================================================] 100%
Packages: 32/32 items
... completed

[jcline@jcline-desk pulp_rpm]$ pulp-admin rpm repo publish run --repo-id=zoo
+----------------------------------------------------------------------+
                      Publishing Repository [zoo]
+----------------------------------------------------------------------+

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

Publishing packages...
[==================================================] 100%
Packages: 32/32 items
... completed


But, checking /var/log/pulp/pulp.log:
Traceback (most recent call last):
  File "/home/jcline/devel/pulp/platform/src/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/yum_distributor/distributor.py", line 438, in publish_repo
    raise IOError('boop')
IOError: boop
2013-07-31 16:06:28,934 pulp.server.dispatch.task:ERROR: Pulp exception occurred: PulpExecutionException
Traceback (most recent call last):
  File "/home/jcline/devel/pulp/platform/src/pulp/server/dispatch/task.py", line 138, in _run
    result = call(*args, **kwargs)
  File "/home/jcline/devel/pulp/platform/src/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 "/home/jcline/devel/pulp/platform/src/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/yum_distributor/distributor.py", line 438, in publish_repo
    raise IOError('boop')
PulpExecutionException: Pulp exception occurred: PulpExecutionException
2013-07-31 16:06:28,934 pulp.server.dispatch.task:INFO: FAILURE: Task 3ec3060a-473e-4992-bc3a-c7d80d8b8325: CallRequest: RepoPublishManager.publish(u'zoo', u'yum_distributor')


Expected results: The command line should let the user know the publish failed


Additional info:

Comment 2 Jeff Ortel 2014-04-03 13:35:42 UTC
build: 2.4.0-0.7.beta

Comment 3 Preethi Thomas 2014-06-26 17:34:59 UTC
verified

[root@mgmt5 ~]# rpm -qa pulp-server
pulp-server-2.4.0-0.23.beta.el6.noarch
[root@mgmt5 ~]# 

failed published reported 

[root@mgmt5 ~]# pulp-admin rpm repo publish run --repo-id zoo
+----------------------------------------------------------------------+
                      Publishing Repository [zoo]
+----------------------------------------------------------------------+

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


Initializing repo metadata
[-]
... completed

Publishing Distribution files
[-]
... completed

Publishing RPMs
[==================================================] 100%
32 of 32 items
... completed

Publishing Delta RPMs
... skipped

Publishing Errata
[==================================================] 100%
4 of 4 items
... completed

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

Publishing Metadata.
[-]
... completed

Closing repo metadata
[-]
... completed

Generating sqlite files
... skipped

Publishing files to web
[-]
... failed
[Errno 13] Permission denied


Task Failed

[Errno 13] Permission denied

[root@mgmt5 ~]#

Comment 4 Randy Barlow 2014-08-09 06:54:28 UTC
This has been fixed in Pulp 2.4.0-1.


Note You need to log in before you can comment on or make changes to this bug.