MaaS: Set commission/deploy timeouts via reclass 61/50161/2
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Sun, 7 Jan 2018 19:20:36 +0000 (20:20 +0100)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Sun, 7 Jan 2018 19:24:15 +0000 (20:24 +0100)
Allow end-users to easily change the MaaS commissioning/deploying
timeouts by simply editing the reclass model.
While at it, use arch-specific values and bump deploy timeout on
AArch64 to 20 minutes instead of 15.

Change-Id: I37ae434ecebdd64effb007baa06c722b1db15c66
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
mcp/patches/0010-maas-region-allow-timeout-override.patch
mcp/reclass/classes/cluster/all-mcp-arch-common/aarch64/init.yml
mcp/reclass/classes/cluster/all-mcp-arch-common/x86_64/init.yml

index 37bdf58..5b8d5a1 100644 (file)
@@ -47,7 +47,7 @@ diff --git a/maas/region.sls b/maas/region.sls
 +  file.replace:
 +    - name: "/usr/lib/python3/dist-packages/maasserver/node_status.py"
 +    - pattern: '^(\s+NODE_STATUS.COMMISSIONING:)\s+\d+,$'
-+    - repl: \1 {{ salt['pillar.get']('_param:opnfv_maas_timeout_comissioning', '10') }},
++    - repl: \1 {{ salt['pillar.get']('_param:opnfv_maas_timeout_comissioning', '20') }},
 +    - require:
 +      - pkg: maas_region_packages
 +    - require_in:
@@ -57,7 +57,7 @@ diff --git a/maas/region.sls b/maas/region.sls
 +  file.replace:
 +    - name: "/usr/lib/python3/dist-packages/maasserver/node_status.py"
 +    - pattern: '^(\s+NODE_STATUS.DEPLOYING:)\s+\d+,$'
-+    - repl: \1 {{ salt['pillar.get']('_param:opnfv_maas_timeout_deploying', '15') }},
++    - repl: \1 {{ salt['pillar.get']('_param:opnfv_maas_timeout_deploying', '40') }},
 +    - require:
 +      - pkg: maas_region_packages
 +    - require_in:
index 0350afa..719e471 100644 (file)
@@ -21,3 +21,7 @@ parameters:
     opnfv_vcp_vm_primary_interface: ${_param:opnfv_fn_vm_primary_interface}
     opnfv_vcp_vm_secondary_interface: ${_param:opnfv_fn_vm_secondary_interface}
     opnfv_vcp_vm_tertiary_interface: ${_param:opnfv_fn_vm_tertiary_interface}
+
+    # MaaS timeouts
+    opnfv_maas_timeout_comissioning: 10
+    opnfv_maas_timeout_deploying: 20
index 1554a32..1d61576 100644 (file)
@@ -21,3 +21,7 @@ parameters:
     opnfv_vcp_vm_primary_interface: ens2
     opnfv_vcp_vm_secondary_interface: ens3
     opnfv_vcp_vm_tertiary_interface: ens4
+
+    # MaaS timeouts
+    opnfv_maas_timeout_comissioning: 10
+    opnfv_maas_timeout_deploying: 15