aboutsummaryrefslogtreecommitdiffstats
path: root/patches/opnfv-fuel/0008-virtng.py-virt.sls-Extend-libvirt_domain.patch
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-11-26 05:43:39 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-11-26 23:56:20 +0000
commitb49021e1227573fbde13c82f432635ef187b1e83 (patch)
treea0ef84e1ab70b5f1aca9254c3664847c056ab474 /patches/opnfv-fuel/0008-virtng.py-virt.sls-Extend-libvirt_domain.patch
parent3293d28284b3d2d140f3b82452cfb6b16a7f2f2a (diff)
u/fuel: Bump & rebase for image pre-install
1. Bump to latest Fuel@OPNFV to include: - Bring in newer glusterfs for mtime unsplit brain * Requires adding arch "arm64" to PPA definition in reclass: - (reclass-system) linux.system.repo.glusterfs: Add arm64 arch - Switch nofeature-ha compute nodes to UCA repo * Requires an alternative way of adding linux.enea.com repos; * linux.enea.com repos will now be pre-install into VM images; * Requires refresh on repo arch list handled by Armband patch: - (fuel) baremetal, virtual: Extend arch list for UCA repo 2. Staging proposed patches from upstream Fuel@OPNFV: - Add pre-{install,purge} support for base image * Reference implementation adds pre-installed Armband specifics: - Enea public GPG to APT keys (for below repos); - repos (linux.enea.com/{apt-mk,mcp-repos}/*); - linux-{image,headers}-generic-hwe-16.04-edge; - cloud-init: datasource from NoCloud only; * Allows us to drop kernel installation from state files, installing the kernel only once during image prep, instead of two stages of parallel installs (5 baremetal, 14 VCP); * Ensures Armband repos are pre-configured for infrastructure VMs, allowing us to drop more reclass repo definitions; * Rework armband patch to install kernel only on kvm, cmp: - (fuel) baremetal: linux-image-generic-hwe-16.04-edge 3. Sync reclass repo definitions with upstream change, drop duplicates - [linux][repos] Remove unused repositories [1] * Upstream dropped all "ocata-{security,hotfix,...} repo comps, which are also empty for Armband, so drop them too; * Rework following armband patches: - (reclass-system) linux/system/repo/mcp: Add Armband repos * Move Armband repos to new dedicated reclass classes: - linux.system.repo.mcp.armband.extra (currently empty); - linux.system.repo.mcp.armband.openstack; * Use HTTPS for fetching Enea Armband GPG key; - (fuel) baremetal: Add Armband Openstack repos to kvm, cmp * Consume defs introduced above only on baremetal nodes; 4. Sync documentation with Fuel@OPNFV (cp) 5. Add vim swap files to .gitignore [1] https://github.com/Mirantis/reclass-system-salt-model/commit/1dd1b31 Change-Id: Ibab56279de86f08ad7cd9bc6761f4c525532f811 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> (cherry picked from commit 37083673d6cdddbb9b710f4dd5efe832753e5856)
Diffstat (limited to 'patches/opnfv-fuel/0008-virtng.py-virt.sls-Extend-libvirt_domain.patch')
-rw-r--r--patches/opnfv-fuel/0008-virtng.py-virt.sls-Extend-libvirt_domain.patch223
1 files changed, 0 insertions, 223 deletions
diff --git a/patches/opnfv-fuel/0008-virtng.py-virt.sls-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0008-virtng.py-virt.sls-Extend-libvirt_domain.patch
deleted file mode 100644
index 6b84b840..00000000
--- a/patches/opnfv-fuel/0008-virtng.py-virt.sls-Extend-libvirt_domain.patch
+++ /dev/null
@@ -1,223 +0,0 @@
-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-: Copyright (c) 2017 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>
----
- .../0103-virtng-module-Extend-libvirt_domain.patch | 54 ++++++++++++++++++++++
- ...4-salt-control-virt-Extend-libvirt_domain.patch | 51 ++++++++++++++++++++
- mcp/patches/patches.list | 2 +
- .../baremetal-mcp-ocata-common/infra/kvm.yml | 15 ++++++
- .../baremetal-mcp-ocata-odl-ha/infra/kvm.yml | 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 0000000..706b67d
---- /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 0000000..a9fe11b
---- /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 @@
-+ seed: True
-+ serial_type: pty
-+ console: True
-++ # 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 688a9af..e618d57 100644
---- a/mcp/patches/patches.list
-+++ b/mcp/patches/patches.list
-@@ -20,3 +20,5 @@
- /usr/share/salt-formulas/env: 0013-maas-region-Allow-subnets-without-fabrics.patch
- /usr/share/salt-formulas/env: 0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch
- /usr/share/salt-formulas/env: 0102-libvirt-unix_sock_group-s-libvirtd-libvirt.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/baremetal-mcp-ocata-common/infra/kvm.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/infra/kvm.yml
-index 7f2f572..9698875 100644
---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/infra/kvm.yml
-+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/infra/kvm.yml
-@@ -46,21 +46,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:
-@@ -81,6 +93,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/baremetal-mcp-ocata-odl-ha/infra/kvm.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/kvm.yml
-index d7bbadd..f8b9662 100644
---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/kvm.yml
-+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/kvm.yml
-@@ -17,6 +17,9 @@ parameters:
- opendaylight.server:
- cpu: 4
- ram: 6144
-+ hw_firmware_type: uefi
-+ virt_machine_model: virt
-+ cpu_model: host-passthrough
- disk_profile: small
- net_profile: default
- cluster: