summaryrefslogtreecommitdiffstats
path: root/patches/opnfv-fuel
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-08-31 17:22:18 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-08-31 20:19:03 +0200
commitb7e8a6cfacf7748ef17247d2404fb336ed65c8dc (patch)
tree831034e1d0b8287c24a4f117be925af9b2156b6a /patches/opnfv-fuel
parent30cc14e3c66740f5718dc3a8e239d55c2ecfa72b (diff)
u/fuel: Bump & rebase for AArch64 upstream
JIRA: FUEL-401 Change-Id: I62f5bfe5d3c83a031437765aa0576bcff5b2e92e Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'patches/opnfv-fuel')
-rw-r--r--patches/opnfv-fuel/0001-Set-volume-name-in-source-file-to-sdX.patch (renamed from patches/opnfv-fuel/0004-Set-volume-name-in-source-file-to-sdX.patch)2
-rw-r--r--patches/opnfv-fuel/0001-salt-formulas-Add-enable-armband-formula.patch198
-rw-r--r--patches/opnfv-fuel/0002-mcp-salt-formulas-armband-Extend-libvirt_domain.patch143
-rw-r--r--patches/opnfv-fuel/0003-virtng.py-virt.sls-Extend-libvirt_domain.patch223
4 files changed, 1 insertions, 565 deletions
diff --git a/patches/opnfv-fuel/0004-Set-volume-name-in-source-file-to-sdX.patch b/patches/opnfv-fuel/0001-Set-volume-name-in-source-file-to-sdX.patch
index 7bb29965..62f1ffff 100644
--- a/patches/opnfv-fuel/0004-Set-volume-name-in-source-file-to-sdX.patch
+++ b/patches/opnfv-fuel/0001-Set-volume-name-in-source-file-to-sdX.patch
@@ -30,7 +30,7 @@ index a7e8fcde..81a8a2af 100644
server:
<<: *db_conn_recycle_time
diff --git a/mcp/reclass/classes/cluster/mcp-common-noha/openstack_control.yml b/mcp/reclass/classes/cluster/mcp-common-noha/openstack_control.yml
-index dbd9d055..3631e6ab 100644
+index dd4b9c4f..d235ef4a 100644
--- a/mcp/reclass/classes/cluster/mcp-common-noha/openstack_control.yml
+++ b/mcp/reclass/classes/cluster/mcp-common-noha/openstack_control.yml
@@ -80,7 +80,7 @@ parameters:
diff --git a/patches/opnfv-fuel/0001-salt-formulas-Add-enable-armband-formula.patch b/patches/opnfv-fuel/0001-salt-formulas-Add-enable-armband-formula.patch
deleted file mode 100644
index 0c9bb2c0..00000000
--- a/patches/opnfv-fuel/0001-salt-formulas-Add-enable-armband-formula.patch
+++ /dev/null
@@ -1,198 +0,0 @@
-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-: Copyright (c) 2018 Enea AB and others.
-:
-: All rights reserved. This program and the accompanying materials
-: are made available under the terms of the Apache License, Version 2.0
-: which accompanies this distribution, and is available at
-: http://www.apache.org/licenses/LICENSE-2.0
-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-From: Guillermo Herrero <Guillermo.Herrero@enea.com>
-Date: Tue, 25 Jul 2017 00:58:32 +0200
-Subject: [PATCH] salt-formulas: Add & enable armband formula
-
-- prereq: install qemu-efi;
-- prereq: install vgabios;
-- prereq: fix missing link for vgabios binary blob;
-- nova conf: cpu_model=cortex-a57 (only for virtual deploys);
-- nova conf: virt_type=qemu (only for virtual deploys);
-- nova compute conf: virt_type=qemu (only for virtual deploys);
-- nova conf: pointer_model=ps2mouse since AArch64 has no USB tablet;
-
-[1] https://github.com/openstack/nova/commit/f0f0953
-
-Signed-off-by: Guillermo Herrero <Guillermo.Herrero@enea.com>
-Signed-off-by: Charalampos Kominos <Charalampos.Kominos@enea.com>
-Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
----
- mcp/config/states/openstack_ha | 1 +
- mcp/config/states/openstack_noha | 2 ++
- mcp/config/states/virtual_control_plane | 1 +
- .../files/nova-libvirt-aarch64-rollup.diff | 27 ++++++++++++++
- mcp/salt-formulas/armband/init.sls | 7 ++++
- mcp/salt-formulas/armband/nova_config.sls | 35 +++++++++++++++++++
- mcp/salt-formulas/armband/nova_libvirt.sls | 7 ++++
- mcp/salt-formulas/armband/qemu_efi.sls | 2 ++
- mcp/salt-formulas/armband/vgabios.sls | 7 ++++
- 9 files changed, 89 insertions(+)
- create mode 100644 mcp/salt-formulas/armband/files/nova-libvirt-aarch64-rollup.diff
- create mode 100644 mcp/salt-formulas/armband/init.sls
- create mode 100644 mcp/salt-formulas/armband/nova_config.sls
- create mode 100644 mcp/salt-formulas/armband/nova_libvirt.sls
- create mode 100644 mcp/salt-formulas/armband/qemu_efi.sls
- create mode 100644 mcp/salt-formulas/armband/vgabios.sls
-
-diff --git a/mcp/config/states/openstack_ha b/mcp/config/states/openstack_ha
-index d7d8cbd4..73c74ee0 100755
---- a/mcp/config/states/openstack_ha
-+++ b/mcp/config/states/openstack_ha
-@@ -56,6 +56,7 @@ if salt 'cmp*' match.pillar 'neutron:compute:backend:engine:ovn' \
- fi
-
- salt -I 'nova:compute' state.sls nova
-+wait_for 5.0 "salt -I 'nova:compute' state.sls armband"
-
- salt -I 'barbican:server' state.sls barbican -b 1
- salt -I 'barbican:client' state.sls barbican
-diff --git a/mcp/config/states/openstack_noha b/mcp/config/states/openstack_noha
-index 9a42d481..9ca32d0f 100755
---- a/mcp/config/states/openstack_noha
-+++ b/mcp/config/states/openstack_noha
-@@ -57,3 +57,5 @@ salt -I 'ceilometer:server' state.sls ceilometer
- salt -I 'ceilometer:agent' state.sls ceilometer
-
- salt -I 'horizon:server' state.sls apache,horizon
-+
-+salt -I 'nova:compute' state.sls armband
-diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane
-index 8ea5047a..f8ef86b3 100755
---- a/mcp/config/states/virtual_control_plane
-+++ b/mcp/config/states/virtual_control_plane
-@@ -27,6 +27,7 @@ if [ "${ERASE_ENV}" -eq 1 ]; then
- fi
-
- # KVM libvirt first, VCP deployment
-+wait_for 5.0 "salt -C 'kvm*' state.sls armband"
- wait_for 5.0 "salt -C 'kvm*' state.sls libvirt"
-
- salt -C 'kvm* or cmp*' state.apply salt
-diff --git a/mcp/salt-formulas/armband/files/nova-libvirt-aarch64-rollup.diff b/mcp/salt-formulas/armband/files/nova-libvirt-aarch64-rollup.diff
-new file mode 100644
-index 00000000..1ecbf297
---- /dev/null
-+++ b/mcp/salt-formulas/armband/files/nova-libvirt-aarch64-rollup.diff
-@@ -0,0 +1,27 @@
-+From: Charalampos Kominos <Charalampos.Kominos@enea.com>
-+Date: Wed, 2 May 2018 14:20:47 +0200
-+Subject: [PATCH] Allow libvirt to honor root device naming
-+
-+Current behaviour in upstream nova is for rootfs to be in /dev/vda
-+which is the default behaviour when using virtio driver. However when
-+other devices are requested either by glance or by CLI, nova ignores
-+that naming and still tries to attach to vda which fails.
-+
-+Manually applied in https://review.openstack.org/#/c/214314/
-+
-+JIRA: ARMBAND-376
-+
-+Signed-off-by: Charalampos Kominos <charalampos.kominos@enea.com>
-+---
-+
-+--- a/nova/virt/libvirt/driver.py
-++++ b/nova/virt/libvirt/driver.py
-+@@ -8257,6 +8257,8 @@
-+ "Ignoring supplied device name: %(device_name)s. "
-+ "Libvirt can't honour user-supplied dev names",
-+ {'device_name': bdm.device_name}, instance=instance)
-++ if instance.root_device_name == bdm.device_name:
-++ instance.root_device_name = None
-+ bdm.device_name = None
-+ block_device_info = driver.get_block_device_info(instance,
-+ block_device_mapping)
-diff --git a/mcp/salt-formulas/armband/init.sls b/mcp/salt-formulas/armband/init.sls
-new file mode 100644
-index 00000000..8a8cf2ab
---- /dev/null
-+++ b/mcp/salt-formulas/armband/init.sls
-@@ -0,0 +1,7 @@
-+include:
-+ - armband.qemu_efi
-+ - armband.vgabios
-+ {%- if salt['pkg.version']('python-nova') %}
-+ - armband.nova_libvirt
-+ - armband.nova_config
-+ {%- endif %}
-diff --git a/mcp/salt-formulas/armband/nova_config.sls b/mcp/salt-formulas/armband/nova_config.sls
-new file mode 100644
-index 00000000..31fa031a
---- /dev/null
-+++ b/mcp/salt-formulas/armband/nova_config.sls
-@@ -0,0 +1,35 @@
-+{% if grains['virtual'] == 'kvm' %}
-+nova_virt_type:
-+ file.replace:
-+ - name: "/etc/nova/nova.conf"
-+ - pattern: '^virt_type\s*=.*$'
-+ - repl: "virt_type = qemu"
-+nova_compute_virt_type:
-+ file.replace:
-+ - name: "/etc/nova/nova-compute.conf"
-+ - pattern: '^virt_type\s*=.*$'
-+ - repl: "virt_type = qemu"
-+{% endif %}
-+nova_pointer_model:
-+ file.replace:
-+ - name: "/etc/nova/nova.conf"
-+ - pattern: '^#pointer_model\s*=.*$'
-+ - repl: "pointer_model = ps2mouse"
-+nova_cpu_mode:
-+ file.replace:
-+ - name: "/etc/nova/nova.conf"
-+ - pattern: '^cpu_mode\s*=\s*host-passthrough'
-+ - repl: "cpu_mode = custom"
-+nova_cpu_model:
-+ file.replace:
-+ - name: "/etc/nova/nova.conf"
-+ - pattern: '^#cpu_model\s*=.*$'
-+ {% if grains['virtual'] == 'kvm' %}
-+ - repl: "cpu_model = cortex-a57"
-+ {% else %}
-+ - repl: "cpu_model = host"
-+ {% endif %}
-+restart_nova-compute:
-+ cmd:
-+ - run
-+ - name: "service nova-compute restart"
-diff --git a/mcp/salt-formulas/armband/nova_libvirt.sls b/mcp/salt-formulas/armband/nova_libvirt.sls
-new file mode 100644
-index 00000000..ff93db80
---- /dev/null
-+++ b/mcp/salt-formulas/armband/nova_libvirt.sls
-@@ -0,0 +1,7 @@
-+nova-libvirt-aarch64-rollup:
-+ file.patch:
-+ - name: /usr/lib/python2.7/dist-packages
-+ - source: salt://armband/files/nova-libvirt-aarch64-rollup.diff
-+ - hash: False
-+ - options: '-p1'
-+ - unless: 'test -f /var/cache/salt/minion/files/base/armband/files/nova-libvirt-aarch64-rollup.diff && cd /usr/lib/python2.7/dist-packages && patch -p1 -R --dry-run -r - < /var/cache/salt/minion/files/base/armband/files/nova-libvirt-aarch64-rollup.diff'
-diff --git a/mcp/salt-formulas/armband/qemu_efi.sls b/mcp/salt-formulas/armband/qemu_efi.sls
-new file mode 100644
-index 00000000..c697dae9
---- /dev/null
-+++ b/mcp/salt-formulas/armband/qemu_efi.sls
-@@ -0,0 +1,2 @@
-+qemu-efi:
-+ pkg.installed
-diff --git a/mcp/salt-formulas/armband/vgabios.sls b/mcp/salt-formulas/armband/vgabios.sls
-new file mode 100644
-index 00000000..500c2bcf
---- /dev/null
-+++ b/mcp/salt-formulas/armband/vgabios.sls
-@@ -0,0 +1,7 @@
-+vgabios:
-+ pkg.installed
-+/usr/share/qemu:
-+ file.directory
-+/usr/share/qemu/vgabios-stdvga.bin:
-+ file.symlink:
-+ - target: "/usr/share/vgabios/vgabios.bin"
diff --git a/patches/opnfv-fuel/0002-mcp-salt-formulas-armband-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0002-mcp-salt-formulas-armband-Extend-libvirt_domain.patch
deleted file mode 100644
index 998a5aba..00000000
--- a/patches/opnfv-fuel/0002-mcp-salt-formulas-armband-Extend-libvirt_domain.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-: Copyright (c) 2018 Enea AB and others.
-:
-: All rights reserved. This program and the accompanying materials
-: are made available under the terms of the Apache License, Version 2.0
-: which accompanies this distribution, and is available at
-: http://www.apache.org/licenses/LICENSE-2.0
-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-Date: Sun, 20 Aug 2017 22:41:26 +0200
-Subject: [PATCH] mcp: salt-formulas: armband: Extend libvirt_domain
-
-Add new state in armband salt formula that:
-* extends salt's virt libvirt_domain.jinja template with support for:
- - hw_firmware_type;
- - virt_machine_model;
- - cpu_model;
- These will later be leveraged via salt virt formula with AArch64
- specific values.
-* to ensure compatibilty of `virt.purge` with NVRAM-enabled domains
- at undefine time, pass down the proper flag to libvirt from virt.py.
-* re-enable AArch64 bootstrap
- Recent changes in salt bootstrap script from [1] whitelist a
- fixed pool of known architectures. Add "arm64" to that list on the
- fly, as part of `config.gather_bootstrap_script`.
- NOTE: This change will be leveraged by passing a custom DEB repo to
- the bootstrap script with `-R linux.enea.com/saltstack`.
-
-NOTE: After running this new state, salt-minion should be restarted
-to pick up the changes, so we'll run it before rebooting kvm nodes.
-
-[1] http://bootstrap.saltstack.com
-
-Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
----
- mcp/config/states/baremetal_init | 1 +
- .../files/salt-minion-aarch64-rollup.diff | 70 +++++++++++++++++++
- mcp/salt-formulas/armband/salt_minion.sls | 7 ++
- 3 files changed, 78 insertions(+)
- create mode 100644 mcp/salt-formulas/armband/files/salt-minion-aarch64-rollup.diff
- create mode 100644 mcp/salt-formulas/armband/salt_minion.sls
-
-diff --git a/mcp/config/states/baremetal_init b/mcp/config/states/baremetal_init
-index 358e1874..14d6a570 100755
---- a/mcp/config/states/baremetal_init
-+++ b/mcp/config/states/baremetal_init
-@@ -32,6 +32,7 @@ wait_for 5.0 "salt -C '${cluster_nodes_query}' state.apply salt.minion"
- wait_for 5.0 "salt -C '${compute_nodes_query}' state.apply linux.system,linux.network"
- wait_for 30.0 "salt -C '${cluster_nodes_query}' test.ping"
-
-+salt -C "${control_nodes_query}" state.apply armband.salt_minion
- salt -C "${cluster_nodes_query}" system.reboot
- wait_for 90.0 "salt -C '${cluster_nodes_query}' test.ping"
-
-diff --git a/mcp/salt-formulas/armband/files/salt-minion-aarch64-rollup.diff b/mcp/salt-formulas/armband/files/salt-minion-aarch64-rollup.diff
-new file mode 100644
-index 00000000..1a2e9a3c
---- /dev/null
-+++ b/mcp/salt-formulas/armband/files/salt-minion-aarch64-rollup.diff
-@@ -0,0 +1,70 @@
-+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-+Date: Sun Aug 20 18:18:53 2017 +0200
-+Subject: [PATCH] libvirt_domain.jinja: Add AArch64 support
-+
-+Salt virt state relies on a Jinja template to create a libvirt
-+XML definition for each new VM.
-+This template needs to be extended with a few specific options
-+for AArch64:
-+- UEFI loader support (pflash);
-+- custom machine model (e.g. 'virt-2.9'), since AArch64 defaults to
-+ 'integratorcp';
-+- custom cpu model;
-+
-+Allow all these to be parametrized from the salt virt formula,
-+which we will also adapt to allow the params to be passed via our
-+reclass model.
-+
-+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-+---
-+
-+diff --git a/salt/templates/virt/libvirt_domain.jinja b/salt/templates/virt/libvirt_domain.jinja
-+--- a/salt/templates/virt/libvirt_domain.jinja
-++++ b/salt/templates/virt/libvirt_domain.jinja
-+@@ -3,11 +3,22 @@
-+ <vcpu>{{ cpu }}</vcpu>
-+ <memory unit='KiB'>{{ mem }}</memory>
-+ <os>
-++ {% if custom_virt_machine %}
-++ <type machine='{{ virt_machine_model }}'>hvm</type>
-++ {% else %}
-+ <type>hvm</type>
-++ {% endif %}
-++ {% if os_loader_type == 'pflash' %}
-++ <loader readonly='yes' type='{{ os_loader_type }}'>{{ os_loader }}</loader>
-++ <nvram>{{ os_loader_nvram }}</nvram>
-++ {% endif %}
-+ {% for dev in boot_dev %}
-+ <boot dev='{{ dev }}' />
-+ {% endfor %}
-+ </os>
-++ {% if cpu_mode == 'custom' %}
-++ <cpu mode='{{ cpu_model }}' check='none'/>
-++ {% endif %}
-+ <devices>
-+ {% for diskname, disk in disks.items() %}
-+ <disk type='file' device='disk'>
-+--
-+
-+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-+Date: Sun Nov 19 02:18:53 2017 +0200
-+Subject: [PATCH] virt.py: undefine: NVRAM flag support
-+
-+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-+---
-+
-+diff --git a/salt/modules/virt.py b/salt/modules/virt.py
-+--- a/salt/modules/virt.py
-++++ b/salt/modules/virt.py
-+@@ -1523,7 +1523,10 @@
-+ salt '*' virt.undefine <domain>
-+ '''
-+ dom = _get_domain(vm_)
-+- return dom.undefine() == 0
-++ try:
-++ return dom.undefineFlags(libvirt.VIR_DOMAIN_UNDEFINE_NVRAM) == 0
-++ except libvirt.libvirtError:
-++ return dom.undefine() == 0
-+
-+
-+ def purge(vm_, dirs=False):
-diff --git a/mcp/salt-formulas/armband/salt_minion.sls b/mcp/salt-formulas/armband/salt_minion.sls
-new file mode 100644
-index 00000000..cc5c9242
---- /dev/null
-+++ b/mcp/salt-formulas/armband/salt_minion.sls
-@@ -0,0 +1,7 @@
-+salt-minion-aarch64-rollup:
-+ file.patch:
-+ - name: /usr/lib/python2.7/dist-packages
-+ - source: salt://armband/files/salt-minion-aarch64-rollup.diff
-+ - hash: False
-+ - options: '-p1'
-+ - unless: 'test -f /var/cache/salt/minion/files/base/armband/files/salt-minion-aarch64-rollup.diff && cd /usr/lib/python2.7/dist-packages && patch -p1 -R --dry-run -r - < /var/cache/salt/minion/files/base/armband/files/salt-minion-aarch64-rollup.diff'
diff --git a/patches/opnfv-fuel/0003-virtng.py-virt.sls-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0003-virtng.py-virt.sls-Extend-libvirt_domain.patch
deleted file mode 100644
index 75c5ae99..00000000
--- a/patches/opnfv-fuel/0003-virtng.py-virt.sls-Extend-libvirt_domain.patch
+++ /dev/null
@@ -1,223 +0,0 @@
-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-: Copyright (c) 2018 Enea AB and others.
-:
-: All rights reserved. This program and the accompanying materials
-: are made available under the terms of the Apache License, Version 2.0
-: which accompanies this distribution, and is available at
-: http://www.apache.org/licenses/LICENSE-2.0
-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-Date: Mon, 21 Aug 2017 01:10:16 +0200
-Subject: [PATCH] virtng.py, virt.sls: Extend libvirt_domain
-
-Extend _modules/virtng.py, salt/control/virt.sls with support for:
-- hw_firmware_type;
-- virt_machine_model;
-- cpu_model;
-
-This functionality relies on the corresponding changes to be
-implemented in libvirt_domain.jinja template.
-
-These will later be leveraged via our reclass model with AArch64
-specific values.
-
-Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
----
- ...-virtng-module-Extend-libvirt_domain.patch | 54 +++++++++++++++++++
- ...t-control-virt-Extend-libvirt_domain.patch | 51 ++++++++++++++++++
- mcp/patches/patches.list | 2 +
- .../cluster/mcp-common-ha/infra/kvm.yml.j2 | 15 ++++++
- .../cluster/mcp-odl-ha/infra/kvm.yml.j2 | 3 ++
- 5 files changed, 125 insertions(+)
- create mode 100644 mcp/patches/0103-virtng-module-Extend-libvirt_domain.patch
- create mode 100644 mcp/patches/0104-salt-control-virt-Extend-libvirt_domain.patch
-
-diff --git a/mcp/patches/0103-virtng-module-Extend-libvirt_domain.patch b/mcp/patches/0103-virtng-module-Extend-libvirt_domain.patch
-new file mode 100644
-index 00000000..706b67da
---- /dev/null
-+++ b/mcp/patches/0103-virtng-module-Extend-libvirt_domain.patch
-@@ -0,0 +1,54 @@
-+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-+Date: Mon, 21 Aug 2017 02:03:01 +0200
-+Subject: [PATCH] virtng: module: Extend libvirt_domain
-+
-+Extend virtng.py with support for passing down new params:
-+- hw_firmware_type;
-+- virt_machine_model;
-+- cpu_model;
-+
-+This functionality relies on the corresponding changes to be
-+implemented in libvirt_domain.jinja template.
-+
-+These will later be leveraged via salt virt formula with AArch64
-+specific values.
-+
-+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-+---
-+
-+diff --git a/_modules/virtng.py b/_modules/virtng.py
-+--- a/_modules/virtng.py
-++++ b/_modules/virtng.py
-+@@ -56,6 +56,10 @@
-+
-+ VIRT_DEFAULT_HYPER = 'kvm'
-+
-++DEFAULT_UEFI_LOADER_PATH = {
-++ "x86_64": "/usr/share/OVMF/OVMF_CODE.fd",
-++ "aarch64": "/usr/share/AAVMF/AAVMF_CODE.fd"
-++}
-+
-+ def __virtual__():
-+ if not HAS_ALL_IMPORTS:
-+@@ -227,6 +231,21 @@
-+ # TODO: make bus and model parameterized, this works for 64-bit Linux
-+ context['controller_model'] = 'lsilogic'
-+
-++ # TODO: limit cpu_model, hw_firmware_type, virt_machine_type to qemu/kvm
-++ # FIXME: parametrize hardcoded path for NVRAM storage
-++ if 'hw_firmware_type' in kwargs and kwargs['hw_firmware_type'] == 'uefi':
-++ context['os_loader_type'] = 'pflash'
-++ context['os_loader'] = DEFAULT_UEFI_LOADER_PATH[os.uname()[-1]]
-++ context['os_loader_nvram'] = '/var/lib/libvirt/qemu/nvram/{0}_VARS.fd'.format(name)
-++
-++ if 'virt_machine_model' in kwargs:
-++ context['custom_virt_machine'] = True
-++ context['virt_machine_model'] = kwargs['virt_machine_model']
-++
-++ if 'cpu_model' in kwargs:
-++ context['cpu_mode'] = 'custom'
-++ context['cpu_model'] = kwargs['cpu_model']
-++
-+ if 'boot_dev' in kwargs:
-+ context['boot_dev'] = []
-+ for dev in kwargs['boot_dev'].split():
-diff --git a/mcp/patches/0104-salt-control-virt-Extend-libvirt_domain.patch b/mcp/patches/0104-salt-control-virt-Extend-libvirt_domain.patch
-new file mode 100644
-index 00000000..78eb0bff
---- /dev/null
-+++ b/mcp/patches/0104-salt-control-virt-Extend-libvirt_domain.patch
-@@ -0,0 +1,51 @@
-+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-+Date: Mon, 21 Aug 2017 02:03:01 +0200
-+Subject: [PATCH] salt: control: virt: Extend libvirt_domain
-+
-+Extend salt/control/virt.sls with support for new params:
-+- hw_firmware_type;
-+- virt_machine_model;
-+- cpu_model;
-+
-+This functionality relies on the corresponding changes to be
-+implemented in libvirt_domain.jinja template, as well as in
-+salt custom py module virtng.py.
-+
-+These will later be leveraged via reclass model with AArch64
-+specific values.
-+
-+FIXME: Move all new params to different section, as "size" is
-+definitely not the best choice.
-+
-+Example reclass model usage:
-+salt:
-+ control:
-+ size:
-+ openstack.example_vm_type:
-+ hw_firmware_type: uefi
-+ virt_machine_model: virt
-+ cpu_model: host-passthrough
-+
-+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-+---
-+
-+diff --git a/salt/control/virt.sls b/salt/control/virt.sls
-+--- a/salt/control/virt.sls
-++++ b/salt/control/virt.sls
-+@@ -44,6 +44,16 @@
-+ {%- if node.img_dest is defined %}
-+ img_dest: {{ node.img_dest }}
-+ {%- endif %}
-++ # FIXME(armband): Move these 3 params to different section
-++ {%- if size.hw_firmware_type is defined %}
-++ hw_firmware_type: {{ size.hw_firmware_type }}
-++ {%- endif %}
-++ {%- if size.virt_machine_model is defined %}
-++ virt_machine_model: {{ size.virt_machine_model }}
-++ {%- endif %}
-++ {%- if size.cpu_model is defined %}
-++ cpu_model: {{ size.cpu_model }}
-++ {%- endif %}
-+ - unless: virsh list --all --name| grep -E "^{{ node_name }}.{{ cluster.domain }}$"
-+
-+ #salt_control_seed_{{ cluster_name }}_{{ node_name }}:
-diff --git a/mcp/patches/patches.list b/mcp/patches/patches.list
-index baa15d79..c9dbe24a 100644
---- a/mcp/patches/patches.list
-+++ b/mcp/patches/patches.list
-@@ -10,3 +10,5 @@
- /usr/share/salt-formulas/env: 0010-maas-region-allow-timeout-override.patch
- /usr/share/salt-formulas/env: 0011-system.repo-Debian-Add-keyserver-proxy-support.patch
- /usr/share/salt-formulas/env: 0015-Set-ovs-bridges-as-L3-interfaces.patch
-+/usr/share/salt-formulas/env: 0103-virtng-module-Extend-libvirt_domain.patch
-+/usr/share/salt-formulas/env: 0104-salt-control-virt-Extend-libvirt_domain.patch
-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 62af0893..bda52803 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
-@@ -52,21 +52,33 @@ parameters:
- openstack.control:
- cpu: 4
- ram: 12288
-+ hw_firmware_type: uefi
-+ virt_machine_model: virt
-+ cpu_model: host-passthrough
- disk_profile: small
- net_profile: default
- openstack.database:
- cpu: 4
- ram: 6144
-+ hw_firmware_type: uefi
-+ virt_machine_model: virt
-+ cpu_model: host-passthrough
- disk_profile: large
- net_profile: default
- openstack.message_queue:
- cpu: 4
- ram: 2048
-+ hw_firmware_type: uefi
-+ virt_machine_model: virt
-+ cpu_model: host-passthrough
- disk_profile: small
- net_profile: default
- openstack.telemetry:
- cpu: 2
- ram: 3072
-+ hw_firmware_type: uefi
-+ virt_machine_model: virt
-+ cpu_model: host-passthrough
- disk_profile: xxlarge
- net_profile: default
- # stacklight.log:
-@@ -87,6 +99,9 @@ parameters:
- openstack.proxy:
- cpu: 2
- ram: 2048
-+ hw_firmware_type: uefi
-+ virt_machine_model: virt
-+ cpu_model: host-passthrough
- disk_profile: small
- net_profile: default_ext
- cluster:
-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 ab0da39b..f64ed46a 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
-@@ -19,6 +19,9 @@ parameters:
- opendaylight.server:
- cpu: 4
- ram: 8192
-+ hw_firmware_type: uefi
-+ virt_machine_model: virt
-+ cpu_model: host-passthrough
- disk_profile: small
- net_profile: default
- cluster: