Merge "Validate the container_cli option"

This commit is contained in:
Zuul 2021-07-02 21:26:42 +00:00 committed by Gerrit Code Review
commit 025b0c8eb3
3 changed files with 12 additions and 10 deletions

View File

@ -0,0 +1,5 @@
---
upgrade:
- |
The ``container_cli`` parameter no longer accepts ``docker``. Now only
``podman`` is accepted as a valid value.

View File

@ -124,8 +124,7 @@ class StandaloneConfig(BaseConfig):
cfg.StrOpt('deployment_user',
help=_(
'User used to run openstack undercloud install '
'command which will be used to add the user to the '
'docker group, required to upload containers'),
'command.')
),
cfg.StrOpt('hieradata_override',
default='',
@ -217,7 +216,7 @@ class StandaloneConfig(BaseConfig):
'configuration and can be used to override '
'any derived values. This should be used '
'only by advanced users.')),
# docker config bits
# container config bits
cfg.StrOpt('container_registry_mirror',
deprecated_name='docker_registry_mirror',
default='',
@ -233,8 +232,9 @@ class StandaloneConfig(BaseConfig):
),
cfg.StrOpt('container_cli',
default='podman',
choices=('podman',),
help=_('Container CLI used for deployment; '
'Can be docker or podman.')),
'Only podman is allowed.')),
cfg.BoolOpt('container_healthcheck_disabled',
default=False,
help=_(

View File

@ -522,12 +522,9 @@ def prepare_undercloud_deploy(upgrade=False, no_validations=True,
env_data['DockerInsecureRegistryAddress'].append(
CONF['undercloud_admin_host'])
else:
env_data['DockerInsecureRegistryAddress'] = [
'%s:8787' % local_registry_name]
env_data['DockerInsecureRegistryAddress'].append(
'%s:8787' % CONF['local_ip'].split('/')[0])
env_data['DockerInsecureRegistryAddress'].append(
'%s:8787' % CONF['undercloud_admin_host'])
msg = ('Unsupported container_cli: %s' % CONF['container_cli'])
raise exceptions.InvalidConfiguration(msg)
env_data['DockerInsecureRegistryAddress'].extend(
CONF['container_insecure_registries'])