From b5839292d177a61d904f1ee1dc8ebb6744505897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Jeanneret?= Date: Tue, 6 Aug 2019 10:05:25 +0200 Subject: [PATCH] Allows to disable in-flight validations Up to now, the in-flight validations were launched without any way to deactivate them. This patch intends to change that fact. Depends-On: https://review.opendev.org/675823 Change-Id: Ic3af7eb49ee6db5bc0ab10302c3f2a2c616db7b6 (cherry picked from commit 32e53e60596094290298ffd9f9e6be754fd21825) --- tripleoclient/v1/overcloud_deploy.py | 6 +++++- tripleoclient/workflows/deployment.py | 11 +++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/tripleoclient/v1/overcloud_deploy.py b/tripleoclient/v1/overcloud_deploy.py index 81d6298ad..7cecac335 100644 --- a/tripleoclient/v1/overcloud_deploy.py +++ b/tripleoclient/v1/overcloud_deploy.py @@ -969,6 +969,9 @@ class DeployOvercloud(command.Command): used = int(time.time() - start) timeout = (parsed_args.timeout * 60) - used + disabled_val = parsed_args.disable_validations + enable_val = parsed_args.run_validations + deployment.config_download( self.log, self.clients, stack, parsed_args.templates, parsed_args.overcloud_ssh_user, @@ -977,7 +980,8 @@ class DeployOvercloud(command.Command): parsed_args.output_dir, parsed_args.override_ansible_cfg, timeout, - verbosity=self.app_args.verbose_level) + verbosity=self.app_args.verbose_level, + in_flight_validations=(enable_val or not disabled_val)) except Exception: deployment.set_deployment_status( self.clients, 'failed', diff --git a/tripleoclient/workflows/deployment.py b/tripleoclient/workflows/deployment.py index 039f126e2..a80791adb 100644 --- a/tripleoclient/workflows/deployment.py +++ b/tripleoclient/workflows/deployment.py @@ -301,15 +301,22 @@ def enable_ssh_admin(log, clients, plan_name, hosts, ssh_user, ssh_key): def config_download(log, clients, stack, templates, ssh_user, ssh_key, ssh_network, - output_dir, override_ansible_cfg, timeout, verbosity=1): + output_dir, override_ansible_cfg, timeout, verbosity=1, + in_flight_validations=True): workflow_client = clients.workflow_engine tripleoclients = clients.tripleoclient + if in_flight_validations: + skip_tags = '' + else: + skip_tags = 'opendev-validation' + workflow_input = { 'verbosity': verbosity or 1, 'plan_name': stack.stack_name, 'ssh_network': ssh_network, - 'config_download_timeout': timeout + 'config_download_timeout': timeout, + 'skip_tags': skip_tags } if output_dir: workflow_input.update(dict(work_dir=output_dir))