Browse Source

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 32e53e6059)
tags/11.5.1
Cédric Jeanneret 1 month ago
parent
commit
b5839292d1
2 changed files with 14 additions and 3 deletions
  1. 5
    1
      tripleoclient/v1/overcloud_deploy.py
  2. 9
    2
      tripleoclient/workflows/deployment.py

+ 5
- 1
tripleoclient/v1/overcloud_deploy.py View File

@@ -969,6 +969,9 @@ class DeployOvercloud(command.Command):
969 969
                     used = int(time.time() - start)
970 970
                     timeout = (parsed_args.timeout * 60) - used
971 971
 
972
+                disabled_val = parsed_args.disable_validations
973
+                enable_val = parsed_args.run_validations
974
+
972 975
                 deployment.config_download(
973 976
                     self.log, self.clients, stack,
974 977
                     parsed_args.templates, parsed_args.overcloud_ssh_user,
@@ -977,7 +980,8 @@ class DeployOvercloud(command.Command):
977 980
                     parsed_args.output_dir,
978 981
                     parsed_args.override_ansible_cfg,
979 982
                     timeout,
980
-                    verbosity=self.app_args.verbose_level)
983
+                    verbosity=self.app_args.verbose_level,
984
+                    in_flight_validations=(enable_val or not disabled_val))
981 985
             except Exception:
982 986
                 deployment.set_deployment_status(
983 987
                     self.clients, 'failed',

+ 9
- 2
tripleoclient/workflows/deployment.py View File

@@ -301,15 +301,22 @@ def enable_ssh_admin(log, clients, plan_name, hosts, ssh_user, ssh_key):
301 301
 
302 302
 def config_download(log, clients, stack, templates,
303 303
                     ssh_user, ssh_key, ssh_network,
304
-                    output_dir, override_ansible_cfg, timeout, verbosity=1):
304
+                    output_dir, override_ansible_cfg, timeout, verbosity=1,
305
+                    in_flight_validations=True):
305 306
     workflow_client = clients.workflow_engine
306 307
     tripleoclients = clients.tripleoclient
307 308
 
309
+    if in_flight_validations:
310
+        skip_tags = ''
311
+    else:
312
+        skip_tags = 'opendev-validation'
313
+
308 314
     workflow_input = {
309 315
         'verbosity': verbosity or 1,
310 316
         'plan_name': stack.stack_name,
311 317
         'ssh_network': ssh_network,
312
-        'config_download_timeout': timeout
318
+        'config_download_timeout': timeout,
319
+        'skip_tags': skip_tags
313 320
     }
314 321
     if output_dir:
315 322
         workflow_input.update(dict(work_dir=output_dir))

Loading…
Cancel
Save