Browse Source

Merge "Add missing update_serial key to compute roles" into stable/queens

tags/8.4.1
Zuul 1 month ago
parent
commit
ceeb663cfe

+ 2
- 0
roles/ComputeHCIOvsDpdk.yaml View File

@@ -12,6 +12,8 @@
12 12
   HostnameFormatDefault: '%stackname%-computehciovsdpdk-%index%'
13 13
   disable_upgrade_deployment: True
14 14
   deprecated_nic_config_name: 'compute-dpdk.yaml'
15
+  # CephOSD present so serial has to be 1
16
+  update_serial: 1
15 17
   RoleParametersDefault:
16 18
     TunedProfileName: "cpu-partitioning"
17 19
     VhostuserSocketGroup: "hugetlbfs"

+ 1
- 0
roles/ComputeLocalEphemeral.yaml View File

@@ -9,6 +9,7 @@
9 9
     - InternalApi
10 10
     - Tenant
11 11
     - Storage
12
+  update_serial: 25
12 13
   HostnameFormatDefault: '%stackname%-novacompute-local-%index%'
13 14
   RoleParametersDefault:
14 15
     TunedProfileName: "virtual-host"

+ 1
- 0
roles/ComputeRBDEphemeral.yaml View File

@@ -9,6 +9,7 @@
9 9
     - InternalApi
10 10
     - Tenant
11 11
     - Storage
12
+  update_serial: 25
12 13
   HostnameFormatDefault: '%stackname%-novacompute-rbd-%index%'
13 14
   RoleParametersDefault:
14 15
     TunedProfileName: "virtual-host"

+ 20
- 1
tools/yaml-validate.py View File

@@ -365,8 +365,27 @@ def validate_with_compute_role_services(role_filename, role_tpl, exclude_service
365 365
               'ServicesDefault in roles/Compute.yaml'.format(role_filename,
366 366
               ', '.join(missing_services)))
367 367
         return 1
368
-    return 0
369 368
 
369
+    cmpt_us = cmpt_tpl[0].get('update_serial', None)
370
+    tpl_us = role_tpl[0].get('update_serial', None)
371
+
372
+    if 'OS::TripleO::Services::CephOSD' in role_services:
373
+        if tpl_us not in (None, 1):
374
+            print('ERROR: update_serial in {0} ({1}) '
375
+                  'is should be 1 as it includes CephOSD'.format(
376
+                      role_filename,
377
+                      tpl_us,
378
+                      cmpt_us))
379
+            return 1
380
+    elif cmpt_us is not None and tpl_us != cmpt_us:
381
+        print('ERROR: update_serial in {0} ({1}) '
382
+              'does not match roles/Compute.yaml {2}'.format(
383
+                  role_filename,
384
+                  tpl_us,
385
+                  cmpt_us))
386
+        return 1
387
+
388
+    return 0
370 389
 
371 390
 def search(item, check_item, check_key):
372 391
     if check_item(item):

Loading…
Cancel
Save