Bug 996725 - Packstack should not require ALL parameters be specified in an answer file
Packstack should not require ALL parameters be specified in an answer file
Status: CLOSED CURRENTRELEASE
Product: RDO
Classification: Community
Component: openstack-packstack (Show other bugs)
unspecified
Unspecified Unspecified
high Severity low
: Milestone3
: Havana
Assigned To: Martin Magr
Ami Jeain
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-13 15:52 EDT by Perry Myers
Modified: 2015-06-04 17:53 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-23 17:20:10 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 Perry Myers 2013-08-13 15:52:51 EDT
Description of problem:
When new config options are added to Packstack, old answer files break

For example, the latest Packstack build introduced a new config variable:
CONFIG_PROVISION_TEMPEST_REPO_URI

My answer files did not have this in them, and now I get errors:
ERROR : Failed handling answer file: 'Parser cannot find option CONFIG_PROVISION_TEMPEST_REPO_URI in answer file.'

This is annoying because it breaks automation even when the option being added to Packstack is completely optional

In addition, it also means that a Packstack answer file must be completely specified vs. just containing only the minimum options needed (useful if you are writing one on your own vs. using output from packstack --gen-answer-file)

Version-Release number of selected component (if applicable):
openstack-packstack-2013.1.1-0.24.dev660.el6.noarch
Comment 1 Perry Myers 2013-08-13 16:14:28 EDT
More data... The snippets for these new values are:

# Whether to configure tempest for testing
CONFIG_PROVISION_TEMPEST=n

# The uri of the tempest git repository to use
CONFIG_PROVISION_TEMPEST_REPO_URI=https://github.com/redhat-openstack/tempest.git

# The revision of the tempest git repository to use
CONFIG_PROVISION_TEMPEST_REPO_REVISION=stable/grizzly

(CONFIG_PROVISION_TEMPEST was already there)

You can't add blank values to CONFIG_PROVISION_TEMPEST_REPO_URI or CONFIG_PROVISION_TEMPEST_REPO_REVISION

Since there are sane defaults here, shouldn't the behavior be that if a config option is omitted or left blank that the default value is used?
Comment 2 Gilles Dubreuil 2014-03-18 23:53:40 EDT
Before digging into it, the feature sounds good but is it still relevant, Packstack targeting only AIO/POC?

If yes then a simple approach could be:
- If a parameter is not available a default value to be used.
- Unknown (older) parameter ignored.
Comment 3 Lars Kellogg-Stedman 2015-03-23 17:20:10 EDT
It looks as if this behavior has already been implemented.

Working with packstack master, if I remove values from the answer file, things appear to move forward without a problem.  In fact, it looks as if I can pass packstack a completely empty answer file consisting of:

    [general]

...and it will still operate.

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