Add file to the reno documentation build to show release notes for
stable/2024.1.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2024.1.
Sem-Ver: feature
Change-Id: Icbe72daa765e51be572775538a25fd8a4e8b58c7
Add file to the reno documentation build to show release notes for
stable/2023.2.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.2.
Sem-Ver: feature
Change-Id: I5c18449ccfcb4e3c0ecd333a6d772ca4a2303d44
Add file to the reno documentation build to show release notes for
stable/2023.1.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.1.
Sem-Ver: feature
Change-Id: I709b3871b07a1b5eeb711916d4af75dcbe06b78e
Add file to the reno documentation build to show release notes for
stable/zed.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/zed.
Sem-Ver: feature
Change-Id: I82608453f5edf65bbd8ab42ef1e5106f536142eb
Add file to the reno documentation build to show release notes for
stable/yoga.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/yoga.
Sem-Ver: feature
Change-Id: I64f5023e8f9f4c49d4d7d08b4ea339af4ac9a7a8
Add file to the reno documentation build to show release notes for
stable/xena.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/xena.
Sem-Ver: feature
Change-Id: I31fff76861e961754fef2d65a6938e6a028d702b
The ``HostDomain`` config type have been added few months ago [1]
however the config option have been forgotten and this new type
isn't importable.
When we try to import this type without defining a new related cfg
option we get the following issue:
```
AttributeError: module 'oslo_config.cfg' has no attribute 'HostDomain'
```
These changes allow us to import this new type and allow us to use
it in our configs:
```
>>> from oslo_config import cfg
>>> foo = cfg.HostDomain('foo')
>>> foo.type.__call__("1")
...
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "~/oslo.config/oslo_config/types.py", line 893, in __call__
raise ValueError(
ValueError: 1 is not a valid host address
>>> foo.type.__call__("host_name")
'host_name'
```
Also properly initialize HostDomain because The HostDomain class wasn't
calling super in it's __init__() method, which resulted in the type_name not
being set properly for instances of that class.
[1] 6480356928
Change-Id: Ie947803f61ba0ef080018e0447de894a400d7975
Closes-Bug: 1924283
Add file to the reno documentation build to show release notes for
stable/wallaby.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/wallaby.
Sem-Ver: feature
Change-Id: Ieef544f34d5291ed300a14801d73e2419f9db0cf
When troubleshooting, it's often interesting to see the deltas between
the default or sample configs and the running configuration. The
oslo_config.validator is a great tool to integrate this feature across
all projects. It can also be easily captured by data collection tools
like sosreports with the current deployment packages.
Change-Id: I172d82f19a81282093b0d5f7ae4c1817801cd887
Signed-off-by: David Vallee Delisle <dvd@redhat.com>
HostDomain is like HostAddress with the support of
_ character - RFC1033
openstack services are failing to start when a hostname with underscore
_ is provided.
Example:
```
overcloud-novacompute_edge1-0.internalapi.localdomain
overcloud-novacompute_edge1-0.internalapi
```
Nova use `HostAddressOpt` to define `live_migration_inbound_addr`,
and if a hostname with underscore is present in the config file
then the service fail to start.
Example:
```
/etc/nova/nova.conf
live_migration_inbound_addr =
overcloud-novacompute_edge1-0.internalapi.localdomain
```
FQDN is a domain name that specifies its exact
location in the tree hierarchy of the Domain Name System (DNS).
Underscore are allowed by RFC1033 [1][2][3]. Indeed, while a hostname may not
contain other characters, such as the underscore character (_), other
DNS names may contain the underscore.[1][2].
Systems such as DomainKeys and service records use the underscore.
These changes allow us to use underscore with the `HostDomain`.
[1] https://www.ietf.org/rfc/rfc1912.txt
[2] https://www.ietf.org/rfc/rfc1033.txt
[3] http://domainkeys.sourceforge.net/underscore.html
Co-authored-by: Daniel Bengtsson <dbengt@redhat.com>
Change-Id: I0a0670207f96a987996d329e5efa9a5eb2ce000c
Closes-Bug: #1892044
Add file to the reno documentation build to show release notes for
stable/victoria.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/victoria.
Change-Id: I59fa3a4e5ced137e61b8c08d63995d2a20693a92
Sem-Ver: feature
Add file to the reno documentation build to show release notes for
stable/ussuri.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/ussuri.
Change-Id: I0562aab55c319fd46f5db73246e25233fc4700a7
Sem-Ver: feature
The 'positional' keyword specifically applies to oslo.config's argparse
support. Unlike oslo.config, argparse assumes that all positional
arguments are required by default, and you have to explicitly tell it
that a positional argument is optional if you'd like to opt into that
behavior.
This patch adopts that same behavior for oslo.config. When you define an
option to be non-positional (oslo.config's default, designed for config
files), then oslo.config makes that option optional:
However, when you define an option to be positional, oslo.config assumes
that the option is primarily going to be used on the CLI and thus sets
it as required, by default.
This change in behavior has the side effect of allowing argparse to
enforce required arguments on the CLI *while* parsing arguments, instead
of depending on oslo.config to detect the condition *after* argparse has
been allowed to parse "invalid" arguments. argparse correctly raises a
SystemExit in this case, and prints the actual command usage and a "hey,
you forgot this required argument", instead of allowing oslo.config to
dump a backtrace to the CLI with a context-less error message
("context-less" in that no useful CLI usage information is dumped along
with the crash to help you correct the condition).
Change-Id: Ifdc6918444fe72f7e1649483c237cce64b4c72d8
Partial-Bug: 1676989
Add file to the reno documentation build to show release notes for
stable/train.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/train.
Change-Id: Id19c6dca83057a9ab63d0947ff508f97811c0499
Sem-Ver: feature
Some options are now automatically configured by the version 1.20:
- project
- html_last_updated_fmt
- latex_engine
- latex_elements
- version
- release.
Change-Id: Iac913e9dea8318ad8398ed7478cb66d845fe7f1e
When dynamic groups are used, the sample config data may not know
about those group names. As a result, validation of such files will
always fail. This makes it hard to automate config checks since the
output would need to be inspected manually to verify that the missing
options are all from the dynamic group.
Ideally, we would provide some way to map sample config groups to
the dynamic group name used in the actual config, but that would be
more complicated and still might not work in every case if a project
doesn't include sample sections for a dynamic group (although they
_should_ be doing so).
Allowing certain group names to be excluded from validation lets
us to solve this problem in a simple way and maintain validation of
99%[0] of the config options and enables the validation to be scripted
since it won't need manual verification of the error output.
Change-Id: I352fd48f86ecb876fe26a5e50e9a2633af1fff3d
0: citation needed ;-)
Add file to the reno documentation build to show release notes for
stable/stein.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/stein.
Change-Id: I2eea7c9f90cc08b8ae451af07259d0cf594d756a
Sem-Ver: feature
An _environment source is added that looks in os.environ for
values.
Using the environment is on by default, but can be shut down
by setting `use_env` to False when __call__ is called.
The enviroment is inspected before any other sources
of config data but the value is used after command line
arguments and before config file options.
This is done by checking both the command line and config
files and then inspecting the location of the result. If
it is command_line, we use it. If not, we use the environment
value (if any). If there's no environment value, the config
file value is used. If checking the command line and config
file results in a KeyError, the environment value is used,
if set.
The names of the environment variables follow the rules
described in oslo_config.sources._environment.
A new exception has been added: ConfigSourceValueError, this
is the superclass of the existing ConfigFileValueError. The
code in _do_get has been updated to only use
ConfigFileValueError when it is in fact a file from whence a
ValueError came.
Documentation has been updated and a rlease note created to
indicate the new functionality.
Change-Id: I3245c40ebdcc96f8e3b2dc0bab3b4aa71d07ad15
While we can't add a hard dependency on oslo.log because it uses
oslo.config, in most cases oslo.log will be installed anyway. In
the interest of being able to make use of features like
fatal_deprecations in oslo.log, let's use it if it's available.
Change-Id: If9499aa6fc28a6b92447b3825d3ca1957cb2255a
Nova uses a common pattern for choices where a 'choices' parameter is
provided and the choices are later documented in the help text. This
frequently leads to code and docs getting out-of-sync and requires
authors to be consistent in how they write option descriptions.
Eliminate the need to do this by allowing users to describe the choices
in the same place as the choices are declared.
Change-Id: Ic084b04ebf232fb72c9c05bbea3a216391b15c83
Release notes are version independent, so remove version/release
values. We've found that projects now require the service package
to be installed in order to build release notes, and this is entirely
due to the current convention of pulling in the version information.
Release notes should not need installation in order to build, so this
unnecessary version setting needs to be removed.
This is needed for new release notes publishing, see
I56909152975f731a9d2c21b2825b972195e48ee8 and the discussion starting
at
http://lists.openstack.org/pipermail/openstack-dev/2017-November/124480.html
.
Change-Id: I84611e79a2cf4838751b43bd39ceb2d60743fb28
Adds the ability for the sample config generator to output the
config data in the machine readable formats yaml and json.
bp machine-readable-sample-config
Change-Id: I236918f0c1da27358aace66914aae5c34afef301
Co-Authored-By: Stephen Finucane <sfinucan@redhat.com>
When we log the warning that an option is deprecated for removal,
include the reason if we have one. Previously the deprecation reason was
only visible in the sample configuration file.
Add some tests for the log messages emitted when deprecated options are
used.
Change-Id: I5e309a3651041580fdf529ff31e18bbd90714f35
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
When config options in different projects use IPOpt as the opt's
type, it restricts operators to only IP addresses.
When the opt is set to HostnameOpt type, currently even an
incomplete or invalid IP passes as a valid hostname. Also, currently
HostnameOpt does not make sure that there is a presense of at least one
non-numeric character in the provided host name.
According to RFC 1123, (https://tools.ietf.org/html/rfc1123),
a valid host name can never have the dotted-decimal form #.#.#.#,
since at least the highest-level component label will be alphabetic.
This patch fixes the existing Hostname Opt to abide by the stated RFC
and also adds a new opt type that would enable operators to provide
either a hostname or an IP and at the same time perform checks on
both IPOpt type and HostnameOpt type, by setting opt type to
"HostAddressOpt" type. This would ensure that an invalid IP does
not pass as a valid hostname and at the same time retains the rules
required to be followed for the validation of an acceptable hostname.
Change-Id: I77bdb64b7e6e56ce761d76696bc4448a9bd325eb
Closes-Bug: #1619044
Closes-Bug: #1615028
If no --config-dir switches are given on the command
line, use default directories to search for config
snippets.
This is similar to the default config-file support
oslo.config already includes. It is useful in environments
where command line arguments can not easily be added, like
mod_wsgi Apache envs.
Change-Id: I4df977911539777d1510e8b579375aca5b5f15f4