#5697 ipa-server-install traceback when -U causes error message and debug is used
Closed: Invalid Opened by adelton.

Running just

# ipa-server-install -U

produces error message

Usage: ipa-server-install [options]
ipa-server-install: error: In unattended mode you need to provide at least -r, -p and -a options

However, when {{{--debug}}} is used as well, unfriendly traceback is shown:

# ipa-server-install -U --debug
ipa.ipapython.install.cli.install_tool(Server): DEBUG    Logging to /var/log/ipaserver-install.log
Usage: ipa-server-install [options]
ipa-server-install: error: In unattended mode you need to provide at least -r, -p and -a options
ipa.ipapython.install.cli.install_tool(Server): DEBUG      File "/usr/lib/python2.7/site-packages/ipapython/admintool.py", line 171, in execute
    return_value = self.run()
  File "/usr/lib/python2.7/site-packages/ipapython/install/cli.py", line 299, in run
    self.option_parser.error(str(e))
  File "/usr/lib64/python2.7/optparse.py", line 1584, in error
    self.exit(2, "%s: error: %s\n" % (self.get_prog_name(), msg))
  File "/usr/lib64/python2.7/optparse.py", line 1574, in exit
    sys.exit(status)
ipa.ipapython.install.cli.install_tool(Server): DEBUG    The ipa-server-install command failed, exception: SystemExit: 2

This is with freeipa-python-4.2.3-2.fc23.x86_64.


It is intentional to print all tracebacks in debug mode

FreeIPA team agreed that it behaves correctly.

Debug mode should be verbose and not necessarily friendly to help debug issues.

Metadata Update from @adelton:
- Issue assigned to someone
- Issue set to the milestone: 0.0 NEEDS_TRIAGE

Metadata