Hide Forgot
Description of problem: As learned in https://bugzilla.redhat.com/show_bug.cgi?id=734533#c3 the exit code for a bad input should probably be 1 with a message to stdout, exitcode of 255 should be saved for uncaught tracebacks. Version-Release number of selected component (if applicable): [root@jsefler-onprem-5server ~]# rpm -q subscription-manager-migration subscription-manager-migration-0.98.13-1.git.0.9bcbcab.el5 How reproducible: Steps to Reproduce: [root@jsefler-onprem-5server ~]# install-num-migrate-to-rhsm --dryrun --instnumber 123 1>/tmp/stdout 2>/tmp/stderr [root@jsefler-onprem-5server ~]# echo $? 255 [root@jsefler-onprem-5server ~]# cat /tmp/stdout Could not parse the installation number: Unsupported string length [root@jsefler-onprem-5server ~]# cat /tmp/stderr [root@jsefler-onprem-5server ~]# Expected results: The error message written to stdout is fine, but the exit code should probably be 1.
Here's another case where the exitCode should probably be 1. [root@jsefler-onprem-5server rhn]# ls clientCaps.d rhnsd up2date [root@jsefler-onprem-5server rhn]# install-num-migrate-to-rhsm Could not read installation number from /etc/sysconfig/rhn/install-num. Aborting. [root@jsefler-onprem-5server rhn]# echo $? 255
Committed e794c7fe2b0ba65d508f7b37f88d31b097f7801b Available in 0.99.5+
verified using following rpm subscription-manager-1.0.3-1.git.69.b87abd7.el5 subscription-manager-firstboot-1.0.3-1.git.69.b87abd7.el5 subscription-manager-migration-data-1.11.1.1-1.git.2.c7fbafe.el5 subscription-manager-migration-1.0.3-1.git.69.b87abd7.el5 subscription-manager-gui-1.0.3-1.git.69.b87abd7.el5 [root@dhcp193-122 ~]# install-num-migrate-to-rhsm Could not read installation number from /etc/sysconfig/rhn/install-num. Aborting. [root@dhcp193-122 ~]# echo $? 1 [root@dhcp193-122 ~]# install-num-migrate-to-rhsm -d -i 123 1>/tmp/stdout 2>/tmp/syderr [root@dhcp193-122 ~]# echo $? 1 resolving defect as verified
Batch change of verified bugs which must have missed making the errata.