From bf48dbc84405208dd86ae3dd4879fc7735b99838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Jeanneret?= Date: Thu, 15 Aug 2019 11:44:32 +0200 Subject: [PATCH] Adds new "--no-inflight-validations" option to deploy CLI This provides an independant way to activate or not the in-flight validations within a deploy. The default is to have them running, and this option allows to deactivate the in-flight ones. Change-Id: I81e934e2978cad4e2713d54e19a57c84a6ac0b52 --- ...flight-validation-option-9e3f70b5bcb8dea9.yaml | 5 +++++ tripleoclient/v1/overcloud_deploy.py | 15 +++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 releasenotes/notes/inflight-validation-option-9e3f70b5bcb8dea9.yaml diff --git a/releasenotes/notes/inflight-validation-option-9e3f70b5bcb8dea9.yaml b/releasenotes/notes/inflight-validation-option-9e3f70b5bcb8dea9.yaml new file mode 100644 index 000000000..ac01afcb4 --- /dev/null +++ b/releasenotes/notes/inflight-validation-option-9e3f70b5bcb8dea9.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Introduce new "--no-inflight-validations" option in order to deactivate + those validations. It defaults to "False", since we want them by default. diff --git a/tripleoclient/v1/overcloud_deploy.py b/tripleoclient/v1/overcloud_deploy.py index 5ab7c02a1..74882f650 100644 --- a/tripleoclient/v1/overcloud_deploy.py +++ b/tripleoclient/v1/overcloud_deploy.py @@ -722,6 +722,16 @@ def get_parser(self, prog_name): 'use the --run-validations flag. These validations are ' 'now run via the external validations in ' 'tripleo-validations.')) + parser.add_argument( + '--no-inflight-validations', + action='store_true', + default=False, + dest='no_inflight', + help=_('Deactivate 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', action='store_true', @@ -915,9 +925,6 @@ def take_action(self, parsed_args): deployment_options['ansible_python_interpreter'] = \ parsed_args.deployment_python_interpreter - 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, @@ -928,7 +935,7 @@ def take_action(self, parsed_args): timeout, verbosity=self.app_args.verbose_level, deployment_options=deployment_options, - in_flight_validations=(enable_val or not disabled_val)) + in_flight_validations=(not parsed_args.no_inflight)) except Exception: deployment.set_deployment_status( self.clients, 'failed',