Bug 1284991

Summary: "atomic-openshift-installer uninstall" error when configuration file is missing.
Product: OpenShift Container Platform Reporter: Brenton Leanhardt <bleanhar>
Component: InstallerAssignee: Brenton Leanhardt <bleanhar>
Status: CLOSED ERRATA QA Contact: Ma xiaoqiang <xiama>
Severity: low Docs Contact:
Priority: medium    
Version: 3.1.0CC: aos-bugs, ghuang, jokerman, mmccomas, pruan, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-27 19:42:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Brenton Leanhardt 2015-11-24 15:53:09 UTC
Description of problem:
If the configuration file is missing when an uninstall is attempted an error will result.

Version-Release number of selected component (if applicable):

How reproducible:

# atomic-openshift-installer uninstall
Traceback (most recent call last):
  File "/usr/bin/atomic-openshift-installer", line 9, in <module>
    load_entry_point('ooinstall==3.0.0', 'console_scripts', 'oo-install')()
  File "/usr/lib/python2.7/site-packages/click/core.py", line 664, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 644, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/site-packages/click/core.py", line 837, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 464, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/ooinstall/cli_installer.py", line 574, in uninstall
    click.echo("No hosts defined in: %s" % oo_cfg['configuration'])
TypeError: 'OOConfig' object has no attribute '__getitem__'

Actual results:

Expected results:
An error message should be displayed indicating which file should contain the required configuration.

Additional info:

Comment 1 Brenton Leanhardt 2015-11-24 16:47:49 UTC

Comment 2 Gan Huang 2015-12-25 03:19:07 UTC
Check on atomic-openshift-utils-3.0.20-1.git.0.3703f1b.el7aos.noarch

1) Install an env successfully
2) #mv .config .config_bak
3) #atomic-openshift-installer uninstall
No hosts defined in: /home/huanggan/.config/openshift/installer.cfg.yml

As Expected results

Comment 4 errata-xmlrpc 2016-01-27 19:42:49 UTC
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.