Add settings of cpu mode for heat deplyments
By default cpu_mode is set in host-passtrought,
and computes can schedule in cloud on diff cpus, so set mode to avoid
failures in nova-migration
Closes-Bug: #PROD-30398
Change-Id: I2cc6206b8b250f38057e88f949e6c2b57233fa17
diff --git a/tcp_tests/templates/cookied-model-generator/salt_heat-cicd-pike-contrail41-sl.yaml b/tcp_tests/templates/cookied-model-generator/salt_heat-cicd-pike-contrail41-sl.yaml
index 992dc35..3205e42 100644
--- a/tcp_tests/templates/cookied-model-generator/salt_heat-cicd-pike-contrail41-sl.yaml
+++ b/tcp_tests/templates/cookied-model-generator/salt_heat-cicd-pike-contrail41-sl.yaml
@@ -23,3 +23,14 @@
{{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }}
{{ SHARED.MACRO_GENERATE_INVENTORY(RERUN_SALTMASTER_STATE=true) }}
+
+- description: "Add cpu_mode"
+ cmd: |
+ set -e;
+ set -x;
+ . /root/venv-reclass-tools/bin/activate;
+ reclass-tools add-key parameters.nova.compute.cpu_mode custom /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/compute/init.yml;
+ reclass-tools add-key parameters.nova.compute.libvirt.cpu_model kvm64 /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/compute/init.yml;
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 5}
+ skip_fail: false
diff --git a/tcp_tests/templates/cookied-model-generator/salt_heat-cicd-pike-dvr-sl.yaml b/tcp_tests/templates/cookied-model-generator/salt_heat-cicd-pike-dvr-sl.yaml
index 71230d0..ba8a4f4 100644
--- a/tcp_tests/templates/cookied-model-generator/salt_heat-cicd-pike-dvr-sl.yaml
+++ b/tcp_tests/templates/cookied-model-generator/salt_heat-cicd-pike-dvr-sl.yaml
@@ -19,3 +19,14 @@
{{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }}
{{ SHARED.MACRO_GENERATE_INVENTORY(RERUN_SALTMASTER_STATE=true) }}
+
+- description: "Add cpu_mode"
+ cmd: |
+ set -e;
+ set -x;
+ . /root/venv-reclass-tools/bin/activate;
+ reclass-tools add-key parameters.nova.compute.cpu_mode custom /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/compute/init.yml;
+ reclass-tools add-key parameters.nova.compute.libvirt.cpu_model kvm64 /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/compute/init.yml;
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 5}
+ skip_fail: false
diff --git a/tcp_tests/templates/cookied-model-generator/salt_heat-cicd-queens-dvr-sl.yaml b/tcp_tests/templates/cookied-model-generator/salt_heat-cicd-queens-dvr-sl.yaml
index 14afef7..1011916 100644
--- a/tcp_tests/templates/cookied-model-generator/salt_heat-cicd-queens-dvr-sl.yaml
+++ b/tcp_tests/templates/cookied-model-generator/salt_heat-cicd-queens-dvr-sl.yaml
@@ -19,3 +19,14 @@
{{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }}
{{ SHARED.MACRO_GENERATE_INVENTORY(RERUN_SALTMASTER_STATE=true) }}
+
+- description: "Add cpu_mode"
+ cmd: |
+ set -e;
+ set -x;
+ . /root/venv-reclass-tools/bin/activate;
+ reclass-tools add-key parameters.nova.compute.cpu_mode custom /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/compute/init.yml;
+ reclass-tools add-key parameters.nova.compute.libvirt.cpu_model kvm64 /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/compute/init.yml;
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 5}
+ skip_fail: false