Project

Profile

Help

Issue #427

Updated by bmbouter about 8 years ago

The return code Description of pulp-admin is always 0 which is not correct. This is a broad issue so the example in this bug is one single example. This bug is to fix all return code usage. 

 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. 


 For the command: 
 <pre> 
 # pulp-admin -u admin -p admin rpm consumer package install run --name some_rpm --consumer-id c1 
 </pre> 


 Produces the output: 

 <pre> 
 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 
 </pre> 


 The return code in this case is still 0 which is incorrect. 

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

 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: 

 + This bug was cloned from "Bugzilla Bug #1096875":https://bugzilla.redhat.com/show_bug.cgi?id=1096875 +

Back