Bug 1278330 - installer options are not validated at the beginning of installation
installer options are not validated at the beginning of installation
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa (Show other bugs)
7.2
All Linux
urgent Severity urgent
: rc
: ---
Assigned To: Jan Cholasta
Namita Soman
Aneta Šteflová Petrová
: Regression, ZStream
: 1273309 1273700 1273707 (view as bug list)
Depends On:
Blocks: 1283890
  Show dependency treegraph
 
Reported: 2015-11-05 04:49 EST by Petr Vobornik
Modified: 2016-11-04 01:39 EDT (History)
8 users (show)

See Also:
Fixed In Version: ipa-4.2.0-16.el7
Doc Type: Known Issue
Doc Text:
ipa-server-install and ipa-replica-install do not validate their options The *ipa-server-install* and *ipa-replica-install* utilities do currently not validate the options supplied to them. If the user passes incorrect values to the utilities, the installation fails. To work around the problem, make sure to supply correct values, and then run the utilities again.
Story Points: ---
Clone Of:
: 1283890 (view as bug list)
Environment:
Last Closed: 2016-11-04 01:39:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Petr Vobornik 2015-11-05 04:49:02 EST
Description of problem:
ipa-server-install doesn't validate its option at the beginning of installation. Which causes the installation to fail later if wrong value is supplied.

Version-Release number of selected component (if applicable):
ipa-server-4.2.0-15.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. start installer with incorrect value in it's option,e.g. with --subject CN=Test -U


Actual results:
installation fails in bad manner (differs on option used)

Expected results:
validation is done at the beginning and installation will fail with proper message
Comment 1 Petr Vobornik 2015-11-05 04:50:56 EST
it has manifested in bug 1273309, bug 1273707 and bug 1273700

Verification steps: e.g. verify the bugs above.
Comment 3 Petr Vobornik 2015-11-05 04:53:06 EST
*** Bug 1273309 has been marked as a duplicate of this bug. ***
Comment 4 Petr Vobornik 2015-11-05 04:55:17 EST
*** Bug 1273707 has been marked as a duplicate of this bug. ***
Comment 5 Petr Vobornik 2015-11-05 04:55:46 EST
*** Bug 1273700 has been marked as a duplicate of this bug. ***
Comment 8 Jan Cholasta 2015-11-11 07:17:04 EST
Hi Aneta, this bug affects ipa-replica-install as well. Besides that, the doc text looks good to me.
Comment 9 Aneta Šteflová Petrová 2015-11-11 07:21:33 EST
Thanks, Honza. I added ipa-replica-install to the description.
Comment 14 Nikhil Dehadrai 2016-08-02 07:19:28 EDT
IPA server: ipa-server-4.4.0-4.el7.x86_64

Verified the bug with following observations / steps whene run against ipa-server-install command:

1)
QERUN COMMAND: ipa-server-install -a
QERUN ALL OUTPUT:
-bash: line 1: cd: /root/multihost_tests: No such file or directory
Usage: ipa-server-install [options]

ipa-server-install: error: -a option requires an argument

GOT: ipa-server-install: error: -a option
QERUN COMMAND SUCCEEDED!
PASSED

2)
QERUN COMMAND: ipa-server-install --setup-dns --forwarder=x.x.x.x -r TESTRELM.TEST -p password -a password --zonemgr=Tko@redhat..com -U
QERUN ALL OUTPUT:
-bash: line 1: cd: /root/multihost_tests: No such file or directory
Usage: ipa-server-install [options]

ipa-server-install: error: option --zonemgr: empty DNS label
ipa.ipapython.install.cli.install_tool(Server): ERROR    The ipa-server-install command failed. See /var/log/ipaserver-install.log for more information

GOT: ipa-server-install: error: option --zonemgr: empty DNS label
QERUN COMMAND SUCCEEDED!
PASSED

3)
QERUN COMMAND: ipa-server-install --setup-dns --forwarder=x.x.x.x -r TESTRELM.TEST -p password -a password --subject
QERUN ALL OUTPUT:
-bash: line 1: cd: /root/multihost_tests: No such file or directory
Usage: ipa-server-install [options]

ipa-server-install: error: --subject option requires an argument

GOT: ipa-server-install: error: --subject option requires an argument
QERUN COMMAND SUCCEEDED!
PASSED

4)
QERUN COMMAND: ipa-server-install --setup-dns --forwarder=x.x.x.x -r TESTRELM.TEST -p password -a password --subject=NOSUBJECT -U
QERUN ALL OUTPUT:
-bash: line 1: cd: /root/multihost_tests: No such file or directory
Usage: ipa-server-install [options]

ipa-server-install: error: option --subject: invalid subject base format: malformed RDN string = "NOSUBJECT"
ipa.ipapython.install.cli.install_tool(Server): ERROR    The ipa-server-install command failed. See /var/log/ipaserver-install.log for more information

GOT: ipa-server-install: error: option --subject: invalid subject base format
QERUN COMMAND SUCCEEDED!
PASSED

5)
QERUN COMMAND: ipa-server-install --ip-address=a.b.3.4
QERUN ALL OUTPUT:
-bash: line 1: cd: /root/multihost_tests: No such file or directory
Usage: ipa-server-install [options]

ipa-server-install: error: option --ip-address: invalid IP address a.b.3.4: failed to detect a valid IP address from 'a.b.3.4'

GOT: ipa-server-install: error: option --ip-address: invalid IP address
QERUN COMMAND SUCCEEDED!
PASSED

6)
QERUN COMMAND: ipa-server-install -xyz
QERUN ALL OUTPUT:
-bash: line 1: cd: /root/multihost_tests: No such file or directory
Usage: ipa-server-install [options]

ipa-server-install: error: no such option: -x

GOT: ipa-server-install: error: no such option
QERUN COMMAND SUCCEEDED!
PASSED


Thus on the basis of above observations, marking status of bug to "VERIFIED".
Comment 16 errata-xmlrpc 2016-11-04 01:39:46 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2404.html

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