Modules import nova.config for two reasons right now - firstly, to
reference nova.config.CONF and, secondly, if they use one of the
options defined in nova.config.
Often modules import nova.openstack.common.cfg and nova.config
which is a bit pointless since they could just use cfg.CONF if
they just want to nova.config in order to reference CONF.
Let's just use cfg.CONF everywhere and we can explicitly state
where we actually require options defined in nova.config.
Change-Id: Ie4184a74e3e78c99658becb18dce1c2087e450bb
Fixes bug 1055503
The standard behaviour of the 'gethostname' function in Python differs from
Linux to Windows. A common Linux configuration returns the FQDN, while a
Windows one returns only the host name.
To resolve inconsistent node naming in deployments that mix windows and
Linux, it is proposed to use 'getfqdn' as default function instead of
'gethostname'. This is function is more predictable in all cases.
Change-Id: I3164d9a36df2b8484bbf9a57879c31fa0e342503
The script analyze_opts.py is added to identify unused options
and options which are set to default values in the nova.conf file.
Change-Id: Iec42781a56f73b7d0960bdd569f5dd06edbb88df
Options defined by CommonConfigOpts are declared within the class rather
than at module level, so they weren't being included in the sample conf.
Also, in essex (and up until commit 991614add8), the sample conf file
didn't contain these options but they included the hyphen in the name.
The hyphen is only used on the command line, it is converted to an
underscore automatically in the config file. Use opt.dest rather than
opt.name as the config file key. Fixes bug #1034970.
DocImpact: update nova.conf docs
Change-Id: Ia7f3dded9148deedeb198c19a8d343db6dd93f99
I hit an issue where extract_opts.py couldn't import importutils
since it's not in my sys.path, so it's clear we need to set
PYTHONPATH before running.
The whole business of running the tool from the tools/conf dir
is fairly awkward, so change it to run from the top-level dir
instead.
Change-Id: I89b4d874a6ee3732234a9704a8ee6001a293ed71
Fixes bug #1005869
Changing create_conf.py to no longer include quotes for
StrOpt, ListOpt and MultiStrOpt types, Also regenerating
and new version of etc/nova/nova.conf.sample
Change-Id: I31c0a6cdcfd3e7cacaae6afbf75648ef0a34d668
Fixes bug #1000133
Current method of extracting config options will not work
once the global config object gets removed.
1. Update tool to read a cfg.Opt subclass instance or list of cfg.Opt subclass
instances rather than the FLAG object.
2. Word wrap help messages
3. Insert line between consecutive options
4. Print warnings for missing option help string
Change-Id: Idd17048b6e8db6e939946968e011e68da8585b8c
We want to avoid e.g. /home/markmc or /Users/vishvananda in this
file.
/usr/lib/python/site-packages is pretty dumb too, but it's suffices
as an example.
Change-Id: I851841a30ca01790c7b5a9b6bdbd160f4a84467c
* Makes it adhere to the config file format
* Puts the sample output in etc/nova/nova.conf.sample
* Updating sample is as easy as ./tools/conf/generate_sample.sh
Change-Id: I01e72cb58dd598a74f50c2c17f102d24df325f2e
Fixes bug #936898
1. Just import the modules and only look at nova.flags.FLAGS
when they're all imported
2. ConfigOpts is iterable, there should be no need to iterate
the private FLAGS._opts dict
3. Output should be .ini style
4. The output should only contain comments
i.e. each option default should be commented out
Change-Id: I15835bb437bc6d575e8311d7c55b3a29d67b006d