diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2018-08-25 23:57:09 +0200 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2018-08-30 04:18:46 +0200 |
commit | 86dcebf4b39ff2e6b2d28691b308a571177e16a5 (patch) | |
tree | a3164506989e7b23b78be0a60ede03f61f2ffbb5 /mcp/reclass/classes/cluster | |
parent | 8d5759ed9836e7c65f6e66b1b7125f0fe5e7b4a1 (diff) |
[AArch64] salt.control.virt support
Salt relies on a limiting libvirt_domain j2 template to generate the
XML it passes to libvirt for salt.control managed virtual machines.
For AArch64, we need to set up 3 XML nodes in a non-default way:
1. UEFI firmware (AAVMF) should be enabled by passing a pflash loader;
2. CPU mode should be 'host-passthrough';
3. QEMU machine type should be 'virt';
To allow configuring the above using pillar data:
- virtng module: implement functionality similar to upstream changes:
* 219b84a512 virt module: Allow NVRAM unlinking on DOM undefine
in develop, not in 2018.2;
* 9cace9adb9 Add support to virt for libvirt loader
in develop, not in 2018.2;
- virtng module: extend it with:
* pass virt machine type to vm;
* pass cpu_mode to vm;
JIRA: ARMBAND-404
Change-Id: Ib2123e7170991b3dfbdb42bd1a2baa5a4360b200
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp/reclass/classes/cluster')
-rw-r--r-- | mcp/reclass/classes/cluster/mcp-common-ha/infra/kvm.yml.j2 | 37 | ||||
-rw-r--r-- | mcp/reclass/classes/cluster/mcp-odl-ha/infra/kvm.yml.j2 | 9 |
2 files changed, 32 insertions, 14 deletions
diff --git a/mcp/reclass/classes/cluster/mcp-common-ha/infra/kvm.yml.j2 b/mcp/reclass/classes/cluster/mcp-common-ha/infra/kvm.yml.j2 index 62af0893a..f1bdf01d0 100644 --- a/mcp/reclass/classes/cluster/mcp-common-ha/infra/kvm.yml.j2 +++ b/mcp/reclass/classes/cluster/mcp-common-ha/infra/kvm.yml.j2 @@ -5,6 +5,7 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +{%- import 'net_map.j2' as nm with context %} --- classes: - system.linux.system.repo.glusterfs @@ -92,34 +93,42 @@ parameters: cluster: internal: node: - mdb01: + mdb01: &salt_control_xenial_image_common_attr image: ${_param:salt_control_xenial_image} +{%- if conf.nodes[nm.ctl01.idx].node.arch == 'aarch64' %} + machine: virt + cpu_mode: host-passthrough + loader: + readonly: 'yes' + type: pflash + path: /usr/share/AAVMF/AAVMF_CODE.fd +{%- endif %} mdb02: - image: ${_param:salt_control_xenial_image} + <<: *salt_control_xenial_image_common_attr mdb03: - image: ${_param:salt_control_xenial_image} + <<: *salt_control_xenial_image_common_attr ctl01: - image: ${_param:salt_control_xenial_image} + <<: *salt_control_xenial_image_common_attr ctl02: - image: ${_param:salt_control_xenial_image} + <<: *salt_control_xenial_image_common_attr ctl03: - image: ${_param:salt_control_xenial_image} + <<: *salt_control_xenial_image_common_attr dbs01: - image: ${_param:salt_control_xenial_image} + <<: *salt_control_xenial_image_common_attr dbs02: - image: ${_param:salt_control_xenial_image} + <<: *salt_control_xenial_image_common_attr dbs03: - image: ${_param:salt_control_xenial_image} + <<: *salt_control_xenial_image_common_attr msg01: - image: ${_param:salt_control_xenial_image} + <<: *salt_control_xenial_image_common_attr msg02: - image: ${_param:salt_control_xenial_image} + <<: *salt_control_xenial_image_common_attr msg03: - image: ${_param:salt_control_xenial_image} + <<: *salt_control_xenial_image_common_attr prx01: - image: ${_param:salt_control_xenial_image} + <<: *salt_control_xenial_image_common_attr prx02: - image: ${_param:salt_control_xenial_image} + <<: *salt_control_xenial_image_common_attr provider: kvm03.${_param:cluster_domain} virt: nic: diff --git a/mcp/reclass/classes/cluster/mcp-odl-ha/infra/kvm.yml.j2 b/mcp/reclass/classes/cluster/mcp-odl-ha/infra/kvm.yml.j2 index ab0da39b3..09a490669 100644 --- a/mcp/reclass/classes/cluster/mcp-odl-ha/infra/kvm.yml.j2 +++ b/mcp/reclass/classes/cluster/mcp-odl-ha/infra/kvm.yml.j2 @@ -5,6 +5,7 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +{%- import 'net_map.j2' as nm with context %} --- {%- if conf.MCP_VCP %} # NOTE(armband): we don't want to pull in salt.control for novcp @@ -29,4 +30,12 @@ parameters: provider: ${_param:infra_kvm_node02_hostname}.${_param:cluster_domain} image: ${_param:salt_control_xenial_image} size: opendaylight.server +{%- if conf.nodes[nm.ctl01.idx].node.arch == 'aarch64' %} + machine: virt + cpu_mode: host-passthrough + loader: + readonly: 'yes' + type: pflash + path: /usr/share/AAVMF/AAVMF_CODE.fd +{%- endif %} {%- endif %} |