(actually) disable the inflight validations by default
- undercloud_config: set no_validations to True by default, since we want to disable them by default now. Introduce --inflight-validations in order to get those particular validations independently. - tripleo_deploy (undercloud + standalone): add missing extra_args when running ansible. Co-Authored-By: Cédric Jeaneret <cjeanner@redhat.com> Closes-Bug: #1843555 Change-Id: I95b8d7abc632b190ac6731393bd490bfa3aedcca
This commit is contained in:
@@ -1314,7 +1314,8 @@ class Deploy(command.Command):
|
||||
extra_args=extra_args)
|
||||
if rc != 0:
|
||||
raise exceptions.DeploymentError('Upgrade failed')
|
||||
rc = self._launch_ansible(self.ansible_dir)
|
||||
rc = self._launch_ansible(self.ansible_dir,
|
||||
extra_args=extra_args)
|
||||
if rc != 0:
|
||||
raise exceptions.DeploymentError('Deployment failed')
|
||||
if parsed_args.upgrade:
|
||||
|
||||
@@ -100,6 +100,16 @@ class InstallUndercloud(command.Command):
|
||||
default=False,
|
||||
help=_("Do not perform undercloud configuration validations"),
|
||||
)
|
||||
parser.add_argument(
|
||||
'--inflight-validations',
|
||||
dest='inflight',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help=_('Activate in-flight validations during the deploy. '
|
||||
'In-flight validations provide a robust way to ensure '
|
||||
'deployed services are running right after their '
|
||||
'activation. Defaults to False.')
|
||||
)
|
||||
parser.add_argument(
|
||||
'--dry-run',
|
||||
dest='dry_run',
|
||||
@@ -121,11 +131,14 @@ class InstallUndercloud(command.Command):
|
||||
|
||||
utils.ensure_run_as_normal_user()
|
||||
no_validations = parsed_args.dry_run or parsed_args.no_validations
|
||||
inflight = not parsed_args.dry_run and parsed_args.inflight
|
||||
|
||||
cmd = undercloud_config.prepare_undercloud_deploy(
|
||||
no_validations=no_validations,
|
||||
verbose_level=self.app_args.verbose_level,
|
||||
force_stack_update=parsed_args.force_stack_update,
|
||||
dry_run=parsed_args.dry_run)
|
||||
dry_run=parsed_args.dry_run,
|
||||
inflight=inflight)
|
||||
|
||||
self.log.warning("Running: %s" % ' '.join(cmd))
|
||||
if not parsed_args.dry_run:
|
||||
|
||||
@@ -374,9 +374,10 @@ def _process_network_args(env):
|
||||
raise exceptions.InvalidConfiguration(msg)
|
||||
|
||||
|
||||
def prepare_undercloud_deploy(upgrade=False, no_validations=False,
|
||||
def prepare_undercloud_deploy(upgrade=False, no_validations=True,
|
||||
verbose_level=1, yes=False,
|
||||
force_stack_update=False, dry_run=False):
|
||||
force_stack_update=False, dry_run=False,
|
||||
inflight=False):
|
||||
"""Prepare Undercloud deploy command based on undercloud.conf"""
|
||||
|
||||
env_data = {}
|
||||
@@ -753,8 +754,10 @@ def prepare_undercloud_deploy(upgrade=False, no_validations=False,
|
||||
utils.ansible_symlink()
|
||||
undercloud_preflight.check(verbose_level, upgrade)
|
||||
deploy_args += ['-e', os.path.join(
|
||||
tht_templates, "environments/tripleo-validations.yaml"),
|
||||
'--inflight-validations']
|
||||
tht_templates, "environments/tripleo-validations.yaml")]
|
||||
|
||||
if inflight:
|
||||
deploy_args.append('--inflight-validations')
|
||||
|
||||
if CONF.get('custom_env_files'):
|
||||
for custom_file in CONF['custom_env_files']:
|
||||
|
||||
Reference in New Issue
Block a user