Add command to run config validation
Adds the command ``kayobe overcloud service configuration validate`` to run the ``oslo-config-validator`` on all hosts via Kolla-Ansible. The output directory of the results is specified with the flag ``--output-dir``. Change-Id: I5d5d16eeabe69e8659e33722165928df096b3559
This commit is contained in:
parent
ebd5799fd4
commit
4af5fd172b
@ -218,6 +218,17 @@ specified directory, with one subdirectory per container. This command may be
|
|||||||
followed by ``kayobe overcloud service configuration save`` to gather the
|
followed by ``kayobe overcloud service configuration save`` to gather the
|
||||||
generated configuration to the Ansible control host.
|
generated configuration to the Ansible control host.
|
||||||
|
|
||||||
|
Validating Overcloud Service Configuration
|
||||||
|
==========================================
|
||||||
|
|
||||||
|
Issues can arise in Kolla Ansible deployments when incorrect options are used
|
||||||
|
in configuration files. This is because OpenStack services will ignore unknown
|
||||||
|
options. It is also important to keep on top of deprecated options that may be
|
||||||
|
removed in the future. The ``oslo-config-validator`` can be used to check both
|
||||||
|
of these. This command will run it on the OpenStack control plane services::
|
||||||
|
|
||||||
|
(kayobe) $ kayobe overcloud service configuration validate --output-dir /path/to/save/results
|
||||||
|
|
||||||
Performing Database Backups
|
Performing Database Backups
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
|
@ -1320,7 +1320,7 @@ class OvercloudServiceConfigurationGenerate(KayobeAnsibleMixin,
|
|||||||
def get_parser(self, prog_name):
|
def get_parser(self, prog_name):
|
||||||
parser = super(OvercloudServiceConfigurationGenerate,
|
parser = super(OvercloudServiceConfigurationGenerate,
|
||||||
self).get_parser(prog_name)
|
self).get_parser(prog_name)
|
||||||
group = parser.add_argument_group("Service Configuration")
|
group = parser.add_argument_group("Service Configuration Generate")
|
||||||
group.add_argument("--node-config-dir", required=True,
|
group.add_argument("--node-config-dir", required=True,
|
||||||
help="the directory to store the config files on "
|
help="the directory to store the config files on "
|
||||||
"the remote node (required)")
|
"the remote node (required)")
|
||||||
@ -1346,6 +1346,30 @@ class OvercloudServiceConfigurationGenerate(KayobeAnsibleMixin,
|
|||||||
extra_vars=extra_vars)
|
extra_vars=extra_vars)
|
||||||
|
|
||||||
|
|
||||||
|
class OvercloudServiceConfigurationValidate(KayobeAnsibleMixin,
|
||||||
|
KollaAnsibleMixin, VaultMixin,
|
||||||
|
Command):
|
||||||
|
"""Runs oslo config validator on the OpenStack control plane services."""
|
||||||
|
|
||||||
|
def get_parser(self, prog_name):
|
||||||
|
parser = super(OvercloudServiceConfigurationValidate,
|
||||||
|
self).get_parser(prog_name)
|
||||||
|
group = parser.add_argument_group("Service Configuration Validate")
|
||||||
|
group.add_argument("--output-dir", required=True,
|
||||||
|
help="the directory to store the results of running"
|
||||||
|
"the config validator (required)")
|
||||||
|
return parser
|
||||||
|
|
||||||
|
def take_action(self, parsed_args):
|
||||||
|
self.app.LOG.debug("Validating overcloud service configuration")
|
||||||
|
extra_vars = {}
|
||||||
|
if parsed_args.output_dir:
|
||||||
|
extra_vars[
|
||||||
|
"service_config_validate_output_dir"] = parsed_args.output_dir
|
||||||
|
self.run_kolla_ansible_overcloud(parsed_args, "validate-config",
|
||||||
|
extra_vars=extra_vars)
|
||||||
|
|
||||||
|
|
||||||
class OvercloudServiceConfigurationSave(KayobeAnsibleMixin, VaultMixin,
|
class OvercloudServiceConfigurationSave(KayobeAnsibleMixin, VaultMixin,
|
||||||
Command):
|
Command):
|
||||||
"""Gather and save the overcloud service configuration files.
|
"""Gather and save the overcloud service configuration files.
|
||||||
@ -1359,7 +1383,7 @@ class OvercloudServiceConfigurationSave(KayobeAnsibleMixin, VaultMixin,
|
|||||||
def get_parser(self, prog_name):
|
def get_parser(self, prog_name):
|
||||||
parser = super(OvercloudServiceConfigurationSave, self).get_parser(
|
parser = super(OvercloudServiceConfigurationSave, self).get_parser(
|
||||||
prog_name)
|
prog_name)
|
||||||
group = parser.add_argument_group("Service configuration")
|
group = parser.add_argument_group("Service Configuration Save")
|
||||||
group.add_argument("--exclude",
|
group.add_argument("--exclude",
|
||||||
help="optional comma-separated list of patterns "
|
help="optional comma-separated list of patterns "
|
||||||
"matching filenames to exclude")
|
"matching filenames to exclude")
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Adds the command ``kayobe overcloud service configuration validate`` to run
|
||||||
|
the ``oslo-config-validator`` on all hosts via Kolla-Ansible.
|
@ -70,6 +70,7 @@ kayobe.cli=
|
|||||||
overcloud_provision = kayobe.cli.commands:OvercloudProvision
|
overcloud_provision = kayobe.cli.commands:OvercloudProvision
|
||||||
overcloud_service_configuration_save = kayobe.cli.commands:OvercloudServiceConfigurationSave
|
overcloud_service_configuration_save = kayobe.cli.commands:OvercloudServiceConfigurationSave
|
||||||
overcloud_service_configuration_generate = kayobe.cli.commands:OvercloudServiceConfigurationGenerate
|
overcloud_service_configuration_generate = kayobe.cli.commands:OvercloudServiceConfigurationGenerate
|
||||||
|
overcloud_service_configuration_validate = kayobe.cli.commands:OvercloudServiceConfigurationValidate
|
||||||
overcloud_service_deploy = kayobe.cli.commands:OvercloudServiceDeploy
|
overcloud_service_deploy = kayobe.cli.commands:OvercloudServiceDeploy
|
||||||
overcloud_service_deploy_containers = kayobe.cli.commands:OvercloudServiceDeployContainers
|
overcloud_service_deploy_containers = kayobe.cli.commands:OvercloudServiceDeployContainers
|
||||||
overcloud_service_destroy = kayobe.cli.commands:OvercloudServiceDestroy
|
overcloud_service_destroy = kayobe.cli.commands:OvercloudServiceDestroy
|
||||||
@ -168,6 +169,8 @@ kayobe.cli.overcloud_service_configuration_save =
|
|||||||
hooks = kayobe.cli.commands:HookDispatcher
|
hooks = kayobe.cli.commands:HookDispatcher
|
||||||
kayobe.cli.overcloud_service_configuration_generate =
|
kayobe.cli.overcloud_service_configuration_generate =
|
||||||
hooks = kayobe.cli.commands:HookDispatcher
|
hooks = kayobe.cli.commands:HookDispatcher
|
||||||
|
kayobe.cli.overcloud_service_configuration_validate =
|
||||||
|
hooks = kayobe.cli.commands:HookDispatcher
|
||||||
kayobe.cli.overcloud_service_deploy =
|
kayobe.cli.overcloud_service_deploy =
|
||||||
hooks = kayobe.cli.commands:HookDispatcher
|
hooks = kayobe.cli.commands:HookDispatcher
|
||||||
kayobe.cli.overcloud_service_deploy_containers =
|
kayobe.cli.overcloud_service_deploy_containers =
|
||||||
|
Loading…
Reference in New Issue
Block a user