7 Commits

Author SHA1 Message Date
Sean Dague
22b63666de Warn instead of die on undefined config names
When using local.conf in multinode envs not everything is going to be
defined in all places. Eventually we probably want to make it so we
have a host role for these sections or something. But for now warn
instead of die when we can't find a config var.

Change-Id: I6959099373f035fbfe9e540a44e4c52b8e7c95c0
Closes-Bug: #2000824
2016-12-12 09:55:32 -05:00
YAMAMOTO Takashi
02f3f9a6bb meta-config: Fix consecutive same sections
The current coding fails to process local.conf like
the following.  Note: This example is taken from a
real use case. [1]

    [[post-config|$NEUTRON_CONF]]
    [qos]
    notification_drivers = midonet
    [[post-config|$NEUTRON_CONF]]

    [quotas]
    # x10 of default quotas (at the time of writing)
    quota_network=100
    quota_subnet=100
    quota_port=500
    quota_router=100
    quota_floatingip=500
    quota_security_group=100
    quota_security_group_rule=1000

[1] https://review.openstack.org/#/c/400627/

Closes-Bug: #1583214
Change-Id: Ie571b5fa5a33d9ed09f30ba7c7724b958ce17616
2016-11-26 00:49:55 +09:00
Swapnil Kulkarni (coolsvap)
7f0be4fc5f Updated Typos in devstack
(1/5) Updated HACKING.rst for typos
(2/5) Updated typos in lib/dlm
(3/5) Updated typos in lib/ironic
(4/5) Updated typos in unittest.sh
(5/5) Updated typos in test_meta_config.sh

Change-Id: I7aafa3af69df9dc6a5923a8557f380d48b73433a
2015-11-20 11:17:19 +05:30
Thomas Morin
85f42f698c Provide an error message on bogus config file spec
If local.conf specifies a config file addition in the following way...

[[post-config|$MY_CONF_FILE]]
[xyz]
foo=bar

...and $MY_CONF_FILE points to a file whose directory is not writable by
the user running the script, then stack.sh aborts with the following
obscure message:

  2015-09-01 08:20:08.113 | touch: setting times of '/': Permission denied

This patch modifies inc/meta-config to provide a useful error message,
such as:

  2015-09-01 08:20:08.114 | could not create config file / ($MY_CONF_FILE)

This patch also modifies inc/meta-config so that it provides an error
message if $MY_CONF_FILE is empty (instead of silently ignoring this local.conf
statement):

  2015-09-01 09:38:53.406 | bogus config file specification: $MY_CONF_FILE
  is undefined

Change-Id: I9b78407420318548561012a8672762bc7fdd6db6
Closes-Bug: 1490881
2015-11-02 15:35:01 +01:00
Ian Wienand
fa3e841286 Create config file in merge_config_file
Change If132a94e53545d9134859aa508da7b9819ede2f8 introduced a small
regression; it added an "inidelete" which looks in the config file to
delete rows.

However, at least for the test-case, the config file isn't created
yet.  The end result is that the test fails but we don't notice.

 2015-04-17 00:55:03.169 | merge_config_file test-multiline: sed: can't read test-multiline.conf: No such file or directory
 2015-04-17 00:55:03.195 | OK

So fix this up by creating the config-file if it isn't there.

Also, add "-e" to the test file so we catch things like this in the
future.

Change-Id: I43a4ecc247f19cccf51d5931dfb687adbd23d6b1
2015-04-17 13:23:25 +10:00
Ian Wienand
fcdca05de5 Fix return of test_ini_config & test_meta_config
Convert test_ini_config to use the "passed / failed" functions in
unittest.sh.  test_meta_config wraps everything into a function; it's
not work unrolling this so just make sure it exits with non-zero if a
test fails.

Change-Id: I9e9883fdad42358255383eede9121b1d361799c8
2015-04-17 13:23:25 +10:00
Dean Troyer
bf2ad7015d Move configuration functions into inc/*
* config/INI functions from functions-common to to inc/ini-config
* local.conf meta-config functions from lib/config to inc/meta-config

Change-Id: I00fab724075a693529273878875cfd292d00b18a
2015-03-09 22:52:19 -05:00