Bug 1096875 - Return code of the operation called by pulp-admin should be propagated to pulp-admin
Summary: Return code of the operation called by pulp-admin should be propagated to pul...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: ---
Assignee: pulp-bugs
QA Contact: pulp-qe-list
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-12 14:57 UTC by Ina Panova
Modified: 2015-02-28 22:06 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-28 22:05:59 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 427 0 None None None Never

Description Ina Panova 2014-05-12 14:57:41 UTC
Description of problem:
Commands that were called by pulp-admin should propagate in a proper way their return codes to pulp-admin. In other words pulp-admin should have same return code as the command it called.


# pulp-admin -u admin -p admin rpm consumer package install run --name some_rpm --consumer-id c1
Install task created with id [ 44307c9e-c721-4b56-8e87-1954c104e3de ]

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

Refresh Repository Metadata

Install Failed

failure: repodata/repomd.xml from m2: [Errno 256] No more mirrors to
try.
https://example.com/pulp/repos/m2/repo
data/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found


[root@ec2-54-220-72-88 ~]# echo $?
0

If the script would call pulp-admin it would have to grep for any failure(that would complicate significantly the real life scenarios) instead of just checking the return code.
 
Version-Release number of selected component (if applicable):
pulp-2.4.0-0.13.beta

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
return code of the operation called by pulp-admin is not propagated to pulp-admin

Expected results:
result and return code of the operation is propagated to pulp-admin

Additional info:

Comment 1 Michael Hrivnak 2014-05-14 16:10:29 UTC
The pulp-admin exit code should be non-zero in this case, but should not necessarily mirror the exit code encountered by a handler on a consumer. The handler may not necessarily run a command that returns an exit code at all.

Comment 2 Brian Bouterse 2015-02-28 22:05:59 UTC
Moved to https://pulp.plan.io/issues/427


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