Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 903187

Summary: Better error handling for missing parameters in answer file
Product: Red Hat OpenStack Reporter: Flavio Percoco <fpercoco>
Component: openstack-packstackAssignee: Martin Magr <mmagr>
Status: CLOSED ERRATA QA Contact: Nir Magnezi <nmagnezi>
Severity: low Docs Contact:
Priority: high    
Version: unspecifiedCC: aortega, derekh, ykaul
Target Milestone: snapshot3Keywords: Triaged
Target Release: 2.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-packstack-2012.2.2-0.9.dev406 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-05 21:02:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Flavio Percoco 2013-01-23 12:34:32 UTC
Description of problem:

Packstack crashes when there are missing parameters in the answer file. A better error handling with a useful message would be better.


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


How reproducible:


Steps to Reproduce:
1. packstack --answer-file=empty_answer_file.txt
2.
3.
  
Actual results:

ERROR:root:Traceback (most recent call last):
  File "/home/flaper87/workspace/rhos/packstack/packstack/installer/run_setup.py", line 387, in _handleAnswerFileParams
    _loadParamFromFile(fconf, "general", param.getKey("CONF_NAME"))
  File "/home/flaper87/workspace/rhos/packstack/packstack/installer/run_setup.py", line 349, in _loadParamFromFile
    value = config.get(section, paramName)
  File "/usr/lib/python2.7/ConfigParser.py", line 618, in get
    raise NoOptionError(option, section)
NoOptionError: No option 'config_keystone_db_pw' in section: 'general'


Expected results:

A message saying there're missing parameters in the answer file.

Additional info:

Comment 2 Derek Higgins 2013-01-30 22:04:01 UTC
If this change merges 
https://review.openstack.org/#/c/20816/

the message will look like this
Additional information:
 * ERROR : Failed handling answer file: No option 'config_repo' in section: 'general'
 * Please check log file /var/tmp/packstack/20130130-1700/openstack-setup.log for more information


the config option is lower_case (options in the answer file are not case sensitive), this is how the exception comes from ConfigParser

Comment 4 Nir Magnezi 2013-02-25 14:48:58 UTC
Verified NVR: openstack-packstack-2012.2.2-1.0.dev408.el6ost.noarch

# packstack --answer-file=empty_ans.txt -d
Welcome to Installer setup utility

Additional information:
 * ERROR : Failed handling answer file: No section: 'general'
 * Please check log file /var/tmp/packstack/20130225-164658-fdOSZN/openstack-setup.log for more information
[root@puma06 ~]# vim /var/tmp/packstack/20130225-164658-fdOSZN/openstack-setup.log

Comment 6 errata-xmlrpc 2013-03-05 21:02:52 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.

http://rhn.redhat.com/errata/RHSA-2013-0595.html