Bug 657990

Summary: rhncfg-client get : returns exit code 0 even when fails.
Product: Red Hat Satellite 5 Reporter: Dimitar Yordanov <dyordano>
Component: Configuration ManagementAssignee: Tomas Lestach <tlestach>
Status: CLOSED DUPLICATE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: low    
Version: 540CC: aparsons, cperry, msuchy
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-19 16:40:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 462714    

Description Dimitar Yordanov 2010-11-29 02:03:11 UTC
Description of problem:
rhncfg-client  get : returns exit code 0 evem when fails

Version-Release number of selected component (if applicable):
rhncfg-client-5.9.27-1.el5sat

How reproducible:
Always

Steps to Reproduce:
1. Register server to satellite.
2. Create Configuration channel and subscribe the system to it.
2. rhncfg-client get some_file_that_does_not_exists
  
Actual results:
Not found on server: some_file_that_does_not_exists
Exit code equal to 0

Expected results:
Not found on server: some_file_that_does_not_exists
Exit code different than 0

Additional info:
Ex:
# rhncfg-client get /tmp/tmp/file_test_one
Deploying /tmp/tmp/file_test_one
# echo $?
0
# rhncfg-client get /tmp/tmp/file_test_one_
Not found on server: /tmp/tmp/file_test_one_
# echo $?
0

Comment 1 Aron Parsons 2011-03-11 22:12:09 UTC
Additionally, rhncfg-client exits with 0 when "verify" picks up differences.  This is not ideal when scripting with the utility and forces one to evaluate the text output of the utility.

Comment 2 Miroslav Suchý 2012-03-19 16:40:18 UTC

*** This bug has been marked as a duplicate of bug 627964 ***