Description of problem: running ipa-server-install with bad options produces a zero return code Version-Release number of selected component (if applicable): build from 5-22-08 How reproducible: always Steps to Reproduce: 1.run /usr/sbin/ipa-server-install -U --hostname=dhcp-114 -r SJCTEST.REDHAT.COM -p Secret123 -P Secret123 -a Secret123 --setup-bind -u admin -d 2. 3. Actual results: ipa server install produces a error message, and exits with a 0 return code. Expected results: The return code to not be 0. Additional info:
What is the bad option in this command-line? It looks ok to me. The hostname is probably not going to work but that is not a bad option.
The bad option is the hostname. It's not a full hostname. So when ipa-server-install hits a ERROR, I'd like to see a non-zero result. This is the current output of that string, notice the return code at the bottom: [root@dhcp-114 tmp]# /usr/sbin/ipa-server-install -U --hostname=dhcp-114 -r SJCTEST.REDHAT.COM -p Secret123 -P Secret123 -a Secret123 --setup-bind -u admin -d The log file for this installation can be found in /var/log/ipaserver-install.log root : DEBUG Loading Index file from '/var/lib/ipa/sysrestore/sysrestore.index' ============================================================================== This program will setup the IPA Server. This includes: * Configure the Network Time Daemon (ntpd) * Create and configure an instance of Directory Server * Create and configure a Kerberos Key Distribution Center (KDC) * Configure Apache (httpd) * Configure TurboGears To accept the default shown in brackets, press the Enter key. root : DEBUG Loading StateFile from '/var/lib/ipa/sysrestore/sysrestore.state' root : DEBUG Loading Index file from '/var/lib/ipa/sysrestore/sysrestore.index' root : ERROR Invalid hostname: dhcp-114 Return code: [root@dhcp-114 tmp]# echo $? 0
Created attachment 306415 [details] Fix up function return values so we can return 1 on an installation error.
ipa-1-0: 4a1862075e88cb48f226bb1c1b575e9484bdd845 master: 927447b144bbe0afd1d099a71dd482f61b431749
ipa-server-install -U --hostname=BOGUSNAME -r BOGUSRELM -p Secret123 -P Secret123 -a Secret123 --setup-bind -u admin -d + ssh root.sjc2.redhat.com ipa-server-install -U --hostname=BOGUSNAME -r BOGUSRELM -p Secret123 -P Secret123 -a Secret123 --setup-bind -u admin -d root : DEBUG Loading Index file from '/var/lib/ipa/sysrestore/sysrestore.index' The log file for this installation can be found in /var/log/ipaserver-install.log ============================================================================== This program will setup the IPA Server. This includes: * Configure the Network Time Daemon (ntpd) * Create and configure an instance of Directory Server * Create and configure a Kerberos Key Distribution Center (KDC) * Configure Apache (httpd) * Configure TurboGears * Configure DNS (bind) To accept the default shown in brackets, press the Enter key. root : ERROR Invalid hostname: BOGUSNAME + ret=1 Verified against: 1.1.0-2.20081119.el5ipa