summaryrefslogtreecommitdiff
path: root/doc/source
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-10-08 11:40:07 +0000
committerGerrit Code Review <review@openstack.org>2018-10-08 11:40:07 +0000
commit8449a0444c2a60035eb85c3dc4d3d7e05555a760 (patch)
tree63c8f6357e83bb8c24c211816fef0d6d00449304 /doc/source
parent561da1eb96ae5d34e03175079e02a2a87a79038a (diff)
parent1f17b823e0fbe082db74f1707af3888cacc6a3e4 (diff)
downloadoslo-config-8449a0444c2a60035eb85c3dc4d3d7e05555a760.tar.gz
Merge "Add release note and documentation for config validator"
Diffstat (limited to 'doc/source')
-rw-r--r--doc/source/cli/index.rst1
-rw-r--r--doc/source/cli/validator.rst63
2 files changed, 64 insertions, 0 deletions
diff --git a/doc/source/cli/index.rst b/doc/source/cli/index.rst
index b81f89f..dbe1949 100644
--- a/doc/source/cli/index.rst
+++ b/doc/source/cli/index.rst
@@ -6,4 +6,5 @@
:maxdepth: 2
generator
+ validator
diff --git a/doc/source/cli/validator.rst b/doc/source/cli/validator.rst
new file mode 100644
index 0000000..637aeeb
--- /dev/null
+++ b/doc/source/cli/validator.rst
@@ -0,0 +1,63 @@
+=====================
+oslo-config-validator
+=====================
+
+`oslo-config-validator` is a utility for verifying that the entries in a
+config file are correct. It will report an error for any options found that
+are not defined by the service, and a warning for any deprecated options found.
+
+.. versionadded:: 6.5.0
+
+Usage
+-----
+
+There are two primary ways to use the config validator. It can use the sample
+config generator configuration file found in each service to determine the list
+of available options, or it can consume a machine-readable sample config that
+provides the same information.
+
+Sample Config Generator Configuration
+-------------------------------------
+
+.. note:: When using this method, all dependencies of the service must be
+ installed in the environment where the validator is run.
+
+There are two parameters that must be passed to the validator in this case:
+``--config-file`` and ``--input-file``. ``--config-file`` should point at the
+location of the sample config generator configuration file, while
+``--input-file`` should point at the location of the configuration file to be
+validated.
+
+Here's an example of using the validator on Nova as installed by Devstack::
+
+ $ oslo-config-validator --config-file /opt/stack/nova/etc/nova/nova-config-generator.conf --input-file /etc/nova/nova.conf
+ ERROR:root:keystone_authtoken/user_domain_name not found
+ ERROR:root:keystone_authtoken/password not found
+ ERROR:root:keystone_authtoken/project_domain_name not found
+ ERROR:root:keystone_authtoken/project_name not found
+ ERROR:root:keystone_authtoken/username not found
+ ERROR:root:keystone_authtoken/auth_url not found
+
+Machine-Readable Sample Config
+------------------------------
+
+.. note:: For most accurate results, the machine-readable sample config should
+ be generated from the same version of the code as is running on
+ the system whose config file is being validated.
+
+In this case, a machine-readable sample config must first be generated, as
+described in :doc:`generator`.
+
+This file is then passed to the validator with ``--opt-data``, along with the
+config file to validated in ``--input-file`` as above.
+
+Here's an example of using the validator on Nova as installed by Devstack, with
+a sample config file ``config-data.yaml`` created by the config generator::
+
+ $ oslo-config-validator --opt-data config-data.yaml --input-file /etc/nova/nova.conf
+ ERROR:root:keystone_authtoken/username not found
+ ERROR:root:keystone_authtoken/project_domain_name not found
+ ERROR:root:keystone_authtoken/user_domain_name not found
+ ERROR:root:keystone_authtoken/project_name not found
+ ERROR:root:keystone_authtoken/password not found
+ ERROR:root:keystone_authtoken/auth_url not found