Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 903187 - Better error handling for missing parameters in answer file
Better error handling for missing parameters in answer file
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-packstack (Show other bugs)
unspecified
Unspecified Unspecified
high Severity low
: snapshot3
: 2.1
Assigned To: Martin Magr
Nir Magnezi
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-23 07:34 EST by Flavio Percoco
Modified: 2016-04-26 17:25 EDT (History)
3 users (show)

See Also:
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 16:02:52 EST
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)


External Trackers
Tracker ID Priority Status Summary Last Updated
OpenStack gerrit 20816 None None None Never
Red Hat Product Errata RHSA-2013:0595 normal SHIPPED_LIVE Moderate: openstack-packstack security and bug fix update 2013-03-05 21:00:00 EST

  None (edit)
Description Flavio Percoco 2013-01-23 07:34:32 EST
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 17:04:01 EST
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 09:48:58 EST
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 16:02:52 EST
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

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