From cf421ba6f593ad1d7c926db618657f8bf66d01a7 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Thu, 10 May 2018 18:09:26 +0200 Subject: [salt] Retire Armband Saltstack repos Provided we take care of the minor consequences of relying strictly on upstream Saltstack amd64 repos on arm64 (since we don't use RAET, this means merely installing `python-futures` as a dependency of `python-tornado` on all minions), we can finally drop our Salstack arm64 repository. This implies installing python-futures on: - FN and VCP VMs (handled via lib.sh pre-patching); - baremetal nodes (handled via MaaS Curtin template for arm64 now); While at it, also handle other minor patch cleanup operations: * drop `system.linux.system.repo.mcp.armband`, already covered by: - lib.sh pre-patching for FN and VCP VM images; - maas.region.repositories for baremetal nodes; * switch glusterfs PPA repo arch from 'amd64,arm64' to None; * drop obsolete patch handling `mcelog` on AArch64; [1] https://github.com/salt-formulas/salt-formula-maas/pull/26 JIRA: ARMBAND-382 Change-Id: I34f3bd70ebf10395e8d4e70498ff3a144b4d9c3b Signed-off-by: Alexandru Avadanii (cherry picked from commit d680c5fb86c3fd4b25e7b7f766064a6ef4bf9a3b) --- ...al-Add-Armband-Openstack-repos-to-kvm-cmp.patch | 50 ---- ...-salt-formulas-Add-enable-armband-formula.patch | 282 +++++++++++++++++++++ ...-salt-formulas-Add-enable-armband-formula.patch | 282 --------------------- ...PDF-Use-arm-virtual2-POD-config-in-sample.patch | 67 +++++ ...alt-formulas-opendaylight-AArch64-leveldb.patch | 48 ++++ ...PDF-Use-arm-virtual2-POD-config-in-sample.patch | 67 ----- ...aas-boot-resources-Add-arm64-architecture.patch | 39 +++ ...alt-formulas-opendaylight-AArch64-leveldb.patch | 48 ---- ...-Add-curtin_userdata_arm64_generic_xenial.patch | 164 ------------ ...lt-formulas-armband-Extend-libvirt_domain.patch | 174 +++++++++++++ ...aas-boot-resources-Add-arm64-architecture.patch | 39 --- ...-virtng.py-virt.sls-Extend-libvirt_domain.patch | 223 ++++++++++++++++ .../0007-Add-opnfv-user-to-the-deployment.patch | 72 ++++++ ...lt-formulas-armband-Extend-libvirt_domain.patch | 174 ------------- .../0008-Revert-Get-back-to-the-GA-kernel.patch | 42 +++ ...-virtng.py-virt.sls-Extend-libvirt_domain.patch | 223 ---------------- ...009-Set-volume-name-in-source-file-to-sdX.patch | 44 ++++ .../0009-seedng-module-Add-AArch64-repo.patch | 59 ----- .../0010-Add-opnfv-user-to-the-deployment.patch | 72 ------ .../0011-Revert-Get-back-to-the-GA-kernel.patch | 42 --- ...012-Set-volume-name-in-source-file-to-sdX.patch | 44 ---- ....system.repo-Drop-arch-for-glusterfs-repo.patch | 35 +++ ...1-linux.system.repo.mcp-Add-Armband-repos.patch | 56 ---- .../0002-linux.system-AArch64-Remove-mcelog.patch | 34 --- ....system.repo-Drop-arch-for-openstack-repo.patch | 40 +++ ...inux.system.repo.glusterfs-Add-arm64-arch.patch | 29 --- ....system.repo-Drop-arch-for-openstack-repo.patch | 40 --- upstream/fuel | 2 +- 28 files changed, 1067 insertions(+), 1424 deletions(-) delete mode 100644 patches/opnfv-fuel/0001-baremetal-Add-Armband-Openstack-repos-to-kvm-cmp.patch create mode 100644 patches/opnfv-fuel/0001-salt-formulas-Add-enable-armband-formula.patch delete mode 100644 patches/opnfv-fuel/0002-salt-formulas-Add-enable-armband-formula.patch create mode 100644 patches/opnfv-fuel/0002-vPDF-Use-arm-virtual2-POD-config-in-sample.patch create mode 100644 patches/opnfv-fuel/0003-mcp-salt-formulas-opendaylight-AArch64-leveldb.patch delete mode 100644 patches/opnfv-fuel/0003-vPDF-Use-arm-virtual2-POD-config-in-sample.patch create mode 100644 patches/opnfv-fuel/0004-maas-boot-resources-Add-arm64-architecture.patch delete mode 100644 patches/opnfv-fuel/0004-mcp-salt-formulas-opendaylight-AArch64-leveldb.patch delete mode 100644 patches/opnfv-fuel/0005-maas-Add-curtin_userdata_arm64_generic_xenial.patch create mode 100644 patches/opnfv-fuel/0005-mcp-salt-formulas-armband-Extend-libvirt_domain.patch delete mode 100644 patches/opnfv-fuel/0006-maas-boot-resources-Add-arm64-architecture.patch create mode 100644 patches/opnfv-fuel/0006-virtng.py-virt.sls-Extend-libvirt_domain.patch create mode 100644 patches/opnfv-fuel/0007-Add-opnfv-user-to-the-deployment.patch delete mode 100644 patches/opnfv-fuel/0007-mcp-salt-formulas-armband-Extend-libvirt_domain.patch create mode 100644 patches/opnfv-fuel/0008-Revert-Get-back-to-the-GA-kernel.patch delete mode 100644 patches/opnfv-fuel/0008-virtng.py-virt.sls-Extend-libvirt_domain.patch create mode 100644 patches/opnfv-fuel/0009-Set-volume-name-in-source-file-to-sdX.patch delete mode 100644 patches/opnfv-fuel/0009-seedng-module-Add-AArch64-repo.patch delete mode 100644 patches/opnfv-fuel/0010-Add-opnfv-user-to-the-deployment.patch delete mode 100644 patches/opnfv-fuel/0011-Revert-Get-back-to-the-GA-kernel.patch delete mode 100644 patches/opnfv-fuel/0012-Set-volume-name-in-source-file-to-sdX.patch create mode 100644 patches/reclass-system-salt-model/0001-linux.system.repo-Drop-arch-for-glusterfs-repo.patch delete mode 100644 patches/reclass-system-salt-model/0001-linux.system.repo.mcp-Add-Armband-repos.patch delete mode 100644 patches/reclass-system-salt-model/0002-linux.system-AArch64-Remove-mcelog.patch create mode 100644 patches/reclass-system-salt-model/0002-linux.system.repo-Drop-arch-for-openstack-repo.patch delete mode 100644 patches/reclass-system-salt-model/0003-linux.system.repo.glusterfs-Add-arm64-arch.patch delete mode 100644 patches/reclass-system-salt-model/0004-linux.system.repo-Drop-arch-for-openstack-repo.patch diff --git a/patches/opnfv-fuel/0001-baremetal-Add-Armband-Openstack-repos-to-kvm-cmp.patch b/patches/opnfv-fuel/0001-baremetal-Add-Armband-Openstack-repos-to-kvm-cmp.patch deleted file mode 100644 index ecbe3a5b..00000000 --- a/patches/opnfv-fuel/0001-baremetal-Add-Armband-Openstack-repos-to-kvm-cmp.patch +++ /dev/null @@ -1,50 +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 -Date: Sun, 26 Nov 2017 17:25:08 +0100 -Subject: [PATCH] baremetal: Add Armband Openstack repos to kvm, cmp - -Armband provides one APT repository that should be added to all -baremetal nodes explicitly (the other Armband repos are now part of -`linux.system.repo.mcp.openstack` or `linux.system.repo.mcp.extra`): -- linux.system.repo.mcp.armband; - -This repo is pre-installed for all infrastructure VMs, so we only -handle it via Salt for baremetal kvm* and cmp* nodes. - -Signed-off-by: Alexandru Avadanii ---- - mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/kvm.yml | 1 + - mcp/reclass/classes/cluster/mcp-pike-common-ha/openstack_compute.yml | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/kvm.yml b/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/kvm.yml -index df230452..5bbe0fe4 100644 ---- a/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/kvm.yml -+++ b/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/kvm.yml -@@ -7,6 +7,7 @@ - ############################################################################## - --- - classes: -+ - system.linux.system.repo.mcp.armband - - system.linux.system.repo.glusterfs - - service.keepalived.cluster.single - - system.glusterfs.server.volume.glance -diff --git a/mcp/reclass/classes/cluster/mcp-pike-common-ha/openstack_compute.yml b/mcp/reclass/classes/cluster/mcp-pike-common-ha/openstack_compute.yml -index 24acbacf..e9f95f2d 100644 ---- a/mcp/reclass/classes/cluster/mcp-pike-common-ha/openstack_compute.yml -+++ b/mcp/reclass/classes/cluster/mcp-pike-common-ha/openstack_compute.yml -@@ -8,6 +8,7 @@ - --- - classes: - - system.linux.system.repo.mcp.openstack -+ - system.linux.system.repo.mcp.armband - - system.linux.system.repo.glusterfs - - system.glusterfs.client.cluster - - system.nova.compute.cluster 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 new file mode 100644 index 00000000..a04780b5 --- /dev/null +++ b/patches/opnfv-fuel/0001-salt-formulas-Add-enable-armband-formula.patch @@ -0,0 +1,282 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: 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 +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 patch: Add video type virtio for AArch64 (backport from [1]); +- nova patch: libvirt driver: AArch64: ACPI depends on AAVMF; +- 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 +Signed-off-by: Charalampos Kominos +Signed-off-by: Alexandru Avadanii +--- + 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 | 106 ++++++++++++++++++ + 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, 168 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 a30f9af6..600aa76b 100755 +--- a/mcp/config/states/openstack_ha ++++ b/mcp/config/states/openstack_ha +@@ -52,6 +52,7 @@ salt -I 'neutron:server' state.sls neutron -b 1 + salt -I 'neutron:gateway' state.sls neutron.gateway + + salt -I 'nova:compute' state.sls nova ++wait_for 5.0 "salt -I 'nova:compute' state.sls armband" + + salt -I 'redis:cluster:role:master' state.sls redis + salt -I 'redis:server' state.sls redis +diff --git a/mcp/config/states/openstack_noha b/mcp/config/states/openstack_noha +index a266989a..77557caa 100755 +--- a/mcp/config/states/openstack_noha ++++ b/mcp/config/states/openstack_noha +@@ -55,6 +55,8 @@ salt -I 'ceilometer:agent' state.sls ceilometer + + salt -I 'horizon:server' state.sls horizon + ++salt -I 'nova:compute' state.sls armband ++ + # workaround for the pike horizon is missing css, FUEL-324 + salt -I 'horizon:server' file.symlink \ + /var/lib/openstack-dashboard/static \ +diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane +index c391cfe6..02a813c9 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..c987a4ce +--- /dev/null ++++ b/mcp/salt-formulas/armband/files/nova-libvirt-aarch64-rollup.diff +@@ -0,0 +1,106 @@ ++From: Alexandru Avadanii ++Date: Thu, 24 Aug 2017 10:57:28 +0200 ++Subject: [PATCH] libvirt: AArch64: ACPI depends on AAVMF ++ ++On AArch64, ACPI should be added to domain XML only if guest UEFI ++(AAVMF) is also used. ++ ++[ Alexandru.Avadanii@enea.com ] ++- pike rebase: minor context adj ++ ++Signed-off-by: Alexandru Avadanii ++Signed-off-by: Ciprian Barbu ++ ++--- ++ ++diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py ++--- a/nova/virt/libvirt/driver.py +++++ b/nova/virt/libvirt/driver.py ++@@ -4314,7 +4314,10 @@ ++ ++ if (virt_type not in ("lxc", "uml", "parallels", "xen") or ++ (virt_type == "xen" and guest.os_type == fields.VMMode.HVM)): ++- guest.features.append(vconfig.LibvirtConfigGuestFeatureACPI()) +++ guestarch = libvirt_utils.get_arch(image_meta) +++ if (guestarch not in (fields.Architecture.ARMV7, fields.Architecture.AARCH64) or +++ image_meta.properties.get('hw_firmware_type') == 'uefi'): +++ guest.features.append(vconfig.LibvirtConfigGuestFeatureACPI()) ++ guest.features.append(vconfig.LibvirtConfigGuestFeatureAPIC()) ++ ++ if (virt_type in ("qemu", "kvm") and ++-- ++ ++From f0f09530ee9169eb29bc28d4f118676d7dc6640e Mon Sep 17 00:00:00 2001 ++From: Kevin Zhao ++Date: Tue, 15 Aug 2017 09:52:09 +0000 ++Subject: [PATCH] Add video type virtio for AArch64 ++ ++Currently only "virtio" type is supported on AArch64, and the ++other "virrus", "qxl" and "vga" don't work on AArch64 according to ++libvirt upstream: ++https://www.redhat.com/archives/libvir-list/2016-September/msg00546.html ++Then this patch adds the virtio for AArch64 and tweaks the related test cases. ++ ++Closes-bug: #1710766 ++ ++[ Alexandru.Avadanii@enea.com ] ++Dropped test changes so it applies cleanly on Newton without more backports. ++ ++Change-Id: Iba8a1e671f2b5759b3d9178aa1871d0cf888b26b ++Signed-off-by: Kevin Zhao ++Signed-off-by: Alexandru Avadanii ++--- ++ ++--- a/nova/virt/libvirt/driver.py +++++ b/nova/virt/libvirt/driver.py ++@@ -4342,7 +4342,8 @@ def _check_number_of_serial_console(self, num_ports): ++ allowed=ALLOWED_QEMU_SERIAL_PORTS, virt_type=virt_type) ++ ++ def _add_video_driver(self, guest, image_meta, flavor): ++- VALID_VIDEO_DEVICES = ("vga", "cirrus", "vmvga", "xen", "qxl") +++ VALID_VIDEO_DEVICES = ("vga", "cirrus", "vmvga", +++ "xen", "qxl", "virtio") ++ video = vconfig.LibvirtConfigGuestVideo() ++ # NOTE(ldbragst): The following logic sets the video.type ++ # depending on supported defaults given the architecture, ++@@ -4360,6 +4361,10 @@ def _add_video_driver(self, guest, image_meta, flavor): ++ # NOTE(ldbragst): PowerKVM doesn't support 'cirrus' be default ++ # so use 'vga' instead when running on Power hardware. ++ video.type = 'vga' +++ elif guestarch in (fields.Architecture.AARCH64): +++ # NOTE(kevinz): Only virtio device type is supported by AARCH64 +++ # so use 'virtio' instead when running on AArch64 hardware. +++ video.type = 'virtio' ++ elif CONF.spice.enabled: ++ video.type = 'qxl' ++ if image_meta.properties.get('hw_video_model'): ++-- ++ ++From dbd4c20de002784a4ffc07b173e82dd84a3af01c Mon Sep 17 00:00:00 2001 ++From: Charalampos Kominos ++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 ++--- ++ ++--- 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-salt-formulas-Add-enable-armband-formula.patch b/patches/opnfv-fuel/0002-salt-formulas-Add-enable-armband-formula.patch deleted file mode 100644 index ebcc8065..00000000 --- a/patches/opnfv-fuel/0002-salt-formulas-Add-enable-armband-formula.patch +++ /dev/null @@ -1,282 +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 -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 patch: Add video type virtio for AArch64 (backport from [1]); -- nova patch: libvirt driver: AArch64: ACPI depends on AAVMF; -- 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 -Signed-off-by: Charalampos Kominos -Signed-off-by: Alexandru Avadanii ---- - mcp/config/states/openstack_ha | 1 + - mcp/config/states/openstack_noha | 2 + - mcp/config/states/virtual_control_plane | 1 + - .../armband/files/nova-libvirt-aarch64-rollup.diff | 106 +++++++++++++++++++++ - 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, 168 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 77063d6c..e17f92a5 100755 ---- a/mcp/config/states/openstack_ha -+++ b/mcp/config/states/openstack_ha -@@ -52,6 +52,7 @@ salt -I 'neutron:server' state.sls neutron -b 1 - salt -I 'neutron:gateway' state.sls neutron.gateway - - salt -I 'nova:compute' state.sls nova -+wait_for 5.0 "salt -I 'nova:compute' state.sls armband" - - salt -C 'I@mongodb:server and *01*' state.sls mongodb || true - wait_for 10.0 "salt -C 'I@mongodb:server and *01*' cmd.run 'mongo localhost:27017/admin'" -diff --git a/mcp/config/states/openstack_noha b/mcp/config/states/openstack_noha -index a266989a..77557caa 100755 ---- a/mcp/config/states/openstack_noha -+++ b/mcp/config/states/openstack_noha -@@ -55,6 +55,8 @@ salt -I 'ceilometer:agent' state.sls ceilometer - - salt -I 'horizon:server' state.sls horizon - -+salt -I 'nova:compute' state.sls armband -+ - # workaround for the pike horizon is missing css, FUEL-324 - salt -I 'horizon:server' file.symlink \ - /var/lib/openstack-dashboard/static \ -diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane -index c391cfe6..02a813c9 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..c987a4ce ---- /dev/null -+++ b/mcp/salt-formulas/armband/files/nova-libvirt-aarch64-rollup.diff -@@ -0,0 +1,106 @@ -+From: Alexandru Avadanii -+Date: Thu, 24 Aug 2017 10:57:28 +0200 -+Subject: [PATCH] libvirt: AArch64: ACPI depends on AAVMF -+ -+On AArch64, ACPI should be added to domain XML only if guest UEFI -+(AAVMF) is also used. -+ -+[ Alexandru.Avadanii@enea.com ] -+- pike rebase: minor context adj -+ -+Signed-off-by: Alexandru Avadanii -+Signed-off-by: Ciprian Barbu -+ -+--- -+ -+diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py -+--- a/nova/virt/libvirt/driver.py -++++ b/nova/virt/libvirt/driver.py -+@@ -4314,7 +4314,10 @@ -+ -+ if (virt_type not in ("lxc", "uml", "parallels", "xen") or -+ (virt_type == "xen" and guest.os_type == fields.VMMode.HVM)): -+- guest.features.append(vconfig.LibvirtConfigGuestFeatureACPI()) -++ guestarch = libvirt_utils.get_arch(image_meta) -++ if (guestarch not in (fields.Architecture.ARMV7, fields.Architecture.AARCH64) or -++ image_meta.properties.get('hw_firmware_type') == 'uefi'): -++ guest.features.append(vconfig.LibvirtConfigGuestFeatureACPI()) -+ guest.features.append(vconfig.LibvirtConfigGuestFeatureAPIC()) -+ -+ if (virt_type in ("qemu", "kvm") and -+-- -+ -+From f0f09530ee9169eb29bc28d4f118676d7dc6640e Mon Sep 17 00:00:00 2001 -+From: Kevin Zhao -+Date: Tue, 15 Aug 2017 09:52:09 +0000 -+Subject: [PATCH] Add video type virtio for AArch64 -+ -+Currently only "virtio" type is supported on AArch64, and the -+other "virrus", "qxl" and "vga" don't work on AArch64 according to -+libvirt upstream: -+https://www.redhat.com/archives/libvir-list/2016-September/msg00546.html -+Then this patch adds the virtio for AArch64 and tweaks the related test cases. -+ -+Closes-bug: #1710766 -+ -+[ Alexandru.Avadanii@enea.com ] -+Dropped test changes so it applies cleanly on Newton without more backports. -+ -+Change-Id: Iba8a1e671f2b5759b3d9178aa1871d0cf888b26b -+Signed-off-by: Kevin Zhao -+Signed-off-by: Alexandru Avadanii -+--- -+ -+--- a/nova/virt/libvirt/driver.py -++++ b/nova/virt/libvirt/driver.py -+@@ -4342,7 +4342,8 @@ def _check_number_of_serial_console(self, num_ports): -+ allowed=ALLOWED_QEMU_SERIAL_PORTS, virt_type=virt_type) -+ -+ def _add_video_driver(self, guest, image_meta, flavor): -+- VALID_VIDEO_DEVICES = ("vga", "cirrus", "vmvga", "xen", "qxl") -++ VALID_VIDEO_DEVICES = ("vga", "cirrus", "vmvga", -++ "xen", "qxl", "virtio") -+ video = vconfig.LibvirtConfigGuestVideo() -+ # NOTE(ldbragst): The following logic sets the video.type -+ # depending on supported defaults given the architecture, -+@@ -4360,6 +4361,10 @@ def _add_video_driver(self, guest, image_meta, flavor): -+ # NOTE(ldbragst): PowerKVM doesn't support 'cirrus' be default -+ # so use 'vga' instead when running on Power hardware. -+ video.type = 'vga' -++ elif guestarch in (fields.Architecture.AARCH64): -++ # NOTE(kevinz): Only virtio device type is supported by AARCH64 -++ # so use 'virtio' instead when running on AArch64 hardware. -++ video.type = 'virtio' -+ elif CONF.spice.enabled: -+ video.type = 'qxl' -+ if image_meta.properties.get('hw_video_model'): -+-- -+ -+From dbd4c20de002784a4ffc07b173e82dd84a3af01c Mon Sep 17 00:00:00 2001 -+From: Charalampos Kominos -+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 -+--- -+ -+--- 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-vPDF-Use-arm-virtual2-POD-config-in-sample.patch b/patches/opnfv-fuel/0002-vPDF-Use-arm-virtual2-POD-config-in-sample.patch new file mode 100644 index 00000000..c3ffa52a --- /dev/null +++ b/patches/opnfv-fuel/0002-vPDF-Use-arm-virtual2-POD-config-in-sample.patch @@ -0,0 +1,67 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: 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 +Date: Tue, 18 Jul 2017 19:17:24 +0200 +Subject: [PATCH] vPDF: Use arm-virtual2 POD config in sample + +NOTE: This will be obsoleted when arm-virtual2 vPDF+IDF lands upstream +in Pharos git repo. + +Until then, just align the public network configuration used by the +virtual POD with the Enea lab configuration specific to arm-virtual2 +(i.e. public network on 10.0.9.0/24). + +Signed-off-by: Alexandru Avadanii +--- + mcp/config/labs/local/idf-virtual1.yaml | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/mcp/config/labs/local/idf-virtual1.yaml b/mcp/config/labs/local/idf-virtual1.yaml +index 79a5fa04..8a5fbb91 100644 +--- a/mcp/config/labs/local/idf-virtual1.yaml ++++ b/mcp/config/labs/local/idf-virtual1.yaml +@@ -42,10 +42,10 @@ idf: + public: + interface: 3 # when used, will be fourth vnet interface, untagged + vlan: native +- network: 10.16.0.0 +- ip-range: 10.16.0.100-10.16.0.254 # Some IPs are in use by lab infra ++ network: 10.0.9.0 ++ ip-range: 10.0.9.100-10.0.9.253 # Some IPs are in use by lab infra + mask: 24 +- gateway: 10.16.0.1 ++ gateway: 10.0.9.254 + dns: + - 8.8.8.8 + - 8.8.4.4 +@@ -61,16 +61,16 @@ idf: + # Ordered-list, index should be in sync with node index in PDF + - interfaces: &interfaces + # Ordered-list, index should be in sync with interface index in PDF +- - 'ens3' +- - 'ens4' +- - 'ens5' +- - 'ens6' ++ - 'enp1s0' ++ - 'enp2s0' ++ - 'enp3s0' ++ - 'enp4s0' + busaddr: &busaddr + # Bus-info reported by `ethtool -i ethX` +- - '0000:00:03.0' +- - '0000:00:04.0' +- - '0000:00:05.0' +- - '0000:00:06.0' ++ - '0000:01:00.0' ++ - '0000:02:00.0' ++ - '0000:03:00.0' ++ - '0000:04:00.0' + - interfaces: *interfaces + busaddr: *busaddr + - interfaces: *interfaces diff --git a/patches/opnfv-fuel/0003-mcp-salt-formulas-opendaylight-AArch64-leveldb.patch b/patches/opnfv-fuel/0003-mcp-salt-formulas-opendaylight-AArch64-leveldb.patch new file mode 100644 index 00000000..c2f2c36f --- /dev/null +++ b/patches/opnfv-fuel/0003-mcp-salt-formulas-opendaylight-AArch64-leveldb.patch @@ -0,0 +1,48 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: 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 +Date: Thu, 27 Jul 2017 23:42:29 +0200 +Subject: [PATCH] mcp: salt-formulas: opendaylight: AArch64 leveldb + +ODL requires native leveldbjni support on architectures like AArch64. +Armband provides a Debian package that provides exactly that, +specially tailored to be applied on top of upstream Opendaylight +Debian package. + +Install as part of the existing Opendaylight +salt-formula (and not as part of Armband's separate salt-formula, like +previous fixups). + +Some dependencies are not self-contained in this formula yet, and +should be handled before upstreaming this patch: +- Armband DEB repository (mcp-repos) is added by "openstack" state; +- only Debian systems are supported (no equivalent RPM provided); +- only systemd is supported (unlikely to change); + +JIRA: https://jira.opnfv.org/browse/ARMBAND-283 + +Signed-off-by: Alexandru Avadanii +--- + mcp/salt-formulas/opendaylight/server.sls | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/mcp/salt-formulas/opendaylight/server.sls b/mcp/salt-formulas/opendaylight/server.sls +index 51a4d9f9..61877d12 100644 +--- a/mcp/salt-formulas/opendaylight/server.sls ++++ b/mcp/salt-formulas/opendaylight/server.sls +@@ -99,4 +99,9 @@ service.mask: + - service: opendaylight + {%- endif %} + ++opendaylight_aarch64_leveldbjni: ++ pkg.installed: ++ {% if grains['cpuarch'] == 'aarch64'%} ++ - name: armband-odl-leveldb-fix ++ {% endif %} + {%- endif %} diff --git a/patches/opnfv-fuel/0003-vPDF-Use-arm-virtual2-POD-config-in-sample.patch b/patches/opnfv-fuel/0003-vPDF-Use-arm-virtual2-POD-config-in-sample.patch deleted file mode 100644 index c3ffa52a..00000000 --- a/patches/opnfv-fuel/0003-vPDF-Use-arm-virtual2-POD-config-in-sample.patch +++ /dev/null @@ -1,67 +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 -Date: Tue, 18 Jul 2017 19:17:24 +0200 -Subject: [PATCH] vPDF: Use arm-virtual2 POD config in sample - -NOTE: This will be obsoleted when arm-virtual2 vPDF+IDF lands upstream -in Pharos git repo. - -Until then, just align the public network configuration used by the -virtual POD with the Enea lab configuration specific to arm-virtual2 -(i.e. public network on 10.0.9.0/24). - -Signed-off-by: Alexandru Avadanii ---- - mcp/config/labs/local/idf-virtual1.yaml | 22 +++++++++++----------- - 1 file changed, 11 insertions(+), 11 deletions(-) - -diff --git a/mcp/config/labs/local/idf-virtual1.yaml b/mcp/config/labs/local/idf-virtual1.yaml -index 79a5fa04..8a5fbb91 100644 ---- a/mcp/config/labs/local/idf-virtual1.yaml -+++ b/mcp/config/labs/local/idf-virtual1.yaml -@@ -42,10 +42,10 @@ idf: - public: - interface: 3 # when used, will be fourth vnet interface, untagged - vlan: native -- network: 10.16.0.0 -- ip-range: 10.16.0.100-10.16.0.254 # Some IPs are in use by lab infra -+ network: 10.0.9.0 -+ ip-range: 10.0.9.100-10.0.9.253 # Some IPs are in use by lab infra - mask: 24 -- gateway: 10.16.0.1 -+ gateway: 10.0.9.254 - dns: - - 8.8.8.8 - - 8.8.4.4 -@@ -61,16 +61,16 @@ idf: - # Ordered-list, index should be in sync with node index in PDF - - interfaces: &interfaces - # Ordered-list, index should be in sync with interface index in PDF -- - 'ens3' -- - 'ens4' -- - 'ens5' -- - 'ens6' -+ - 'enp1s0' -+ - 'enp2s0' -+ - 'enp3s0' -+ - 'enp4s0' - busaddr: &busaddr - # Bus-info reported by `ethtool -i ethX` -- - '0000:00:03.0' -- - '0000:00:04.0' -- - '0000:00:05.0' -- - '0000:00:06.0' -+ - '0000:01:00.0' -+ - '0000:02:00.0' -+ - '0000:03:00.0' -+ - '0000:04:00.0' - - interfaces: *interfaces - busaddr: *busaddr - - interfaces: *interfaces diff --git a/patches/opnfv-fuel/0004-maas-boot-resources-Add-arm64-architecture.patch b/patches/opnfv-fuel/0004-maas-boot-resources-Add-arm64-architecture.patch new file mode 100644 index 00000000..b13390f4 --- /dev/null +++ b/patches/opnfv-fuel/0004-maas-boot-resources-Add-arm64-architecture.patch @@ -0,0 +1,39 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: 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 +Date: Fri, 11 Aug 2017 00:07:29 +0200 +Subject: [PATCH] maas: boot-resources: Add arm64 architecture + +Signed-off-by: Alexandru Avadanii +--- + mcp/patches/0003-maas-region-force-artifact-download.patch | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/mcp/patches/0003-maas-region-force-artifact-download.patch b/mcp/patches/0003-maas-region-force-artifact-download.patch +index b61a3d1b..e38b6c1a 100644 +--- a/mcp/patches/0003-maas-region-force-artifact-download.patch ++++ b/mcp/patches/0003-maas-region-force-artifact-download.patch +@@ -50,7 +50,7 @@ diff --git a/maas/files/maas-artifact-sync.sh b/maas/files/maas-artifact-sync.sh + new file mode 100644 + --- /dev/null + +++ b/maas/files/maas-artifact-sync.sh +-@@ -0,0 +1,20 @@ ++@@ -0,0 +1,25 @@ + +{%- from "maas/map.jinja" import region with context %} + +#!/bin/bash + +function wait_for { +@@ -71,3 +71,8 @@ new file mode 100644 + +wait_for 90 "! maas opnfv boot-resources is-importing | grep -q 'true'" + +maas opnfv rack-controllers import-boot-images || exit 3 + +wait_for 30 "test -d /var/lib/maas/boot-resources/current/ubuntu/amd64" +++maas opnfv boot-source-selection update 1 1 arches='amd64' arches='arm64' || exit 4 +++maas opnfv boot-resources import || exit 2 +++wait_for 90 "! maas opnfv boot-resources is-importing | grep -q 'true'" +++maas opnfv rack-controllers import-boot-images || exit 3 +++wait_for 30 "test -d /var/lib/maas/boot-resources/current/ubuntu/arm64" diff --git a/patches/opnfv-fuel/0004-mcp-salt-formulas-opendaylight-AArch64-leveldb.patch b/patches/opnfv-fuel/0004-mcp-salt-formulas-opendaylight-AArch64-leveldb.patch deleted file mode 100644 index c2f2c36f..00000000 --- a/patches/opnfv-fuel/0004-mcp-salt-formulas-opendaylight-AArch64-leveldb.patch +++ /dev/null @@ -1,48 +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 -Date: Thu, 27 Jul 2017 23:42:29 +0200 -Subject: [PATCH] mcp: salt-formulas: opendaylight: AArch64 leveldb - -ODL requires native leveldbjni support on architectures like AArch64. -Armband provides a Debian package that provides exactly that, -specially tailored to be applied on top of upstream Opendaylight -Debian package. - -Install as part of the existing Opendaylight -salt-formula (and not as part of Armband's separate salt-formula, like -previous fixups). - -Some dependencies are not self-contained in this formula yet, and -should be handled before upstreaming this patch: -- Armband DEB repository (mcp-repos) is added by "openstack" state; -- only Debian systems are supported (no equivalent RPM provided); -- only systemd is supported (unlikely to change); - -JIRA: https://jira.opnfv.org/browse/ARMBAND-283 - -Signed-off-by: Alexandru Avadanii ---- - mcp/salt-formulas/opendaylight/server.sls | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/mcp/salt-formulas/opendaylight/server.sls b/mcp/salt-formulas/opendaylight/server.sls -index 51a4d9f9..61877d12 100644 ---- a/mcp/salt-formulas/opendaylight/server.sls -+++ b/mcp/salt-formulas/opendaylight/server.sls -@@ -99,4 +99,9 @@ service.mask: - - service: opendaylight - {%- endif %} - -+opendaylight_aarch64_leveldbjni: -+ pkg.installed: -+ {% if grains['cpuarch'] == 'aarch64'%} -+ - name: armband-odl-leveldb-fix -+ {% endif %} - {%- endif %} diff --git a/patches/opnfv-fuel/0005-maas-Add-curtin_userdata_arm64_generic_xenial.patch b/patches/opnfv-fuel/0005-maas-Add-curtin_userdata_arm64_generic_xenial.patch deleted file mode 100644 index b7c1bec0..00000000 --- a/patches/opnfv-fuel/0005-maas-Add-curtin_userdata_arm64_generic_xenial.patch +++ /dev/null @@ -1,164 +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 -Date: Mon, 7 Aug 2017 19:45:01 +0200 -Subject: [PATCH] maas: Add curtin_userdata_arm64_generic_xenial - -Add AArch64 specific configuration. -While at it, preseed Armband common repo-comp for Pike, so we get -the updated kernel & other packages from the start. - -Signed-off-by: Alexandru Avadanii ---- - ...-Add-curtin_userdata_arm64_generic_xenial.patch | 35 +++++++++++++++++++++ - mcp/patches/patches.list | 1 + - .../cluster/mcp-pike-common-ha/infra/maas.yml | 36 ++++++++++++++++++++++ - .../files/curtin_userdata_arm64_generic_xenial | 35 +++++++++++++++++++++ - 4 files changed, 107 insertions(+) - create mode 100644 mcp/patches/0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch - create mode 100644 mcp/salt-formulas/maas/files/curtin_userdata_arm64_generic_xenial - -diff --git a/mcp/patches/0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch b/mcp/patches/0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch -new file mode 100644 -index 00000000..0368937d ---- /dev/null -+++ b/mcp/patches/0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch -@@ -0,0 +1,35 @@ -+From: Alexandru Avadanii -+Date: Sat, 5 Aug 2017 02:03:01 +0200 -+Subject: [PATCH] maas: Add curtin_userdata_arm64_generic_xenial -+ -+Based on curtin_userdata_amd64_generic_xenial, add new arm64 -+specific configuration file: -+- curtin_userdata_arm64_generic_xenial -+ -+Requires Salt repo key and repo URL to be defined via reclass. -+ -+Signed-off-by: Alexandru Avadanii -+--- -+ -+diff --git a/maas/region.sls b/maas/region.sls -+--- a/maas/region.sls -++++ b/maas/region.sls -+@@ -70,6 +70,18 @@ -+ - require: -+ - pkg: maas_region_packages -+ -++/etc/maas/preseeds/curtin_userdata_arm64_generic_xenial: -++ file.managed: -++ - source: salt://maas/files/curtin_userdata_arm64_generic_xenial -++ - template: jinja -++ - user: root -++ - group: root -++ - mode: 644 -++ - context: -++ salt_master_ip: {{ region.salt_master_ip }} -++ - require: -++ - pkg: maas_region_packages -++ -+ /root/.pgpass: -+ file.managed: -+ - source: salt://maas/files/pgpass -diff --git a/mcp/patches/patches.list b/mcp/patches/patches.list -index 6a6e7a36..3632a92b 100644 ---- a/mcp/patches/patches.list -+++ b/mcp/patches/patches.list -@@ -17,3 +17,4 @@ - /usr/share/salt-formulas/env: 0012-routes-Skip-network-restart-on-noifupdown.patch - /usr/share/salt-formulas/env: 0015-Set-ovs-bridges-as-L3-interfaces.patch - /usr/share/salt-formulas/env: 0016-Set-boot-source-selections.patch -+/usr/share/salt-formulas/env: 0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch -diff --git a/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas.yml b/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas.yml -index e83de35c..226a4f66 100644 ---- a/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas.yml -+++ b/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas.yml -@@ -41,6 +41,42 @@ parameters: - enable_third_party_drivers: true - network_discovery: 'enabled' - default_min_hwe_kernel: ${_param:hwe_kernel} -+ package_repositories: -+ armband: -+ name: armband -+ enabled: '1' -+ url: 'http://linux.enea.com/mcp-repos/${_param:openstack_version}/${_param:linux_system_codename}' -+ distributions: '${_param:openstack_version}-armband' -+ components: 'main' -+ arches: 'arm64' -+ key: &armband_key | -+ -----BEGIN PGP PUBLIC KEY BLOCK----- -+ Version: GnuPG v2.0.14 (GNU/Linux) -+ -+ mQENBFagAroBCADWboNIjuF6lB1mWv2+EbvqY3lKl5mLKhr2DnSUkKeHUPBv8gNM -+ qK8Q00AMIyPiyEhgjA+dWizZ+5aBgxoiY7oMeLJ2Xym36U/8SYq2BWd3SGCbMNoz -+ SJDxDUSM/HFVs6atF1M3DY9oN65hSVnu4uy5Tu6asf6k4rhAyk0z4+pRcPBCu2vq -+ mnGi3COM/+9PShrEKeVOx5W2vRJywUFuq8EDvQnRoJ0GvM28JiJIanw17YwIPxhg -+ BKZVpZjan5X+ihVMXwA2h/G/FS5Omhd50RqV6LWSYs94VJJgYqHx8UMm7izcxI+P -+ ct3IcbD195bPbJ+SbuiFe45ZLsdY1MyGiU2BABEBAAG0K0VuZWEgQXJtYmFuZCBE -+ ZXZvcHMgVGVhbSA8YXJtYmFuZEBlbmVhLmNvbT6JATgEEwECACICGwMGCwkIBwMC -+ BhUIAgkKCwQWAgMBAh4BAheABQJaY3bYAAoJEN6rkLp5irHRoQMH/0PYl0A/6eWw -+ nQ/szhEFrr76Ln6wA4vEO+PiuWj9kTkZM2NaCnkisrIuHSPIVvOLfFmztbE6sKGe -+ t+a2b7Jqw48DZ/gq508aZE4Q307ookxdCOrzIu/796hFO34yXg3sqZoJh3VmKIjY -+ 4DL8yG1iAiQ5vOw3IFWQnATwIZUgaCcjmE7HGap+9ePuJfFuQ8mIG5cy28t8qocx -+ AB/B2tucfBMwomYxKqgbLI5AG7iSt58ajvrrNa9f8IX7Ihj/jiuXhUwX+geEp98K -+ IWVI1ftEthZvfBpZW4BS98J4z//dEPi31L4jb9RQXq3afF2RpXchDeUN85bW45nu -+ W/9PMAlgE/U= -+ =m+zE -+ -----END PGP PUBLIC KEY BLOCK----- -+ saltstack_armband: -+ name: saltstack_armband -+ enabled: '1' -+ url: 'http://linux.enea.com/saltstack/apt/ubuntu/16.04/arm64/2016.11' -+ distributions: '${_param:linux_system_codename}' -+ components: 'main' -+ arches: 'arm64' -+ key: *armband_key - subnets: - opnfv_maas_pxe: - name: ${_param:opnfv_infra_maas_pxe_network_address}/24 -diff --git a/mcp/salt-formulas/maas/files/curtin_userdata_arm64_generic_xenial b/mcp/salt-formulas/maas/files/curtin_userdata_arm64_generic_xenial -new file mode 100644 -index 00000000..15d10a48 ---- /dev/null -+++ b/mcp/salt-formulas/maas/files/curtin_userdata_arm64_generic_xenial -@@ -0,0 +1,35 @@ -+{%- from "maas/map.jinja" import cluster with context %} -+{% raw %} -+#cloud-config -+debconf_selections: -+ maas: | -+ {{for line in str(curtin_preseed).splitlines()}} -+ {{line}} -+ {{endfor}} -+{{if third_party_drivers and driver}} -+early_commands: -+ {{py: key_string = ''.join(['\\x%x' % x for x in map(ord, driver['key_binary'])])}} -+ driver_00_get_key: /bin/echo -en '{{key_string}}' > /tmp/maas-{{driver['package']}}.gpg -+ driver_01_add_key: ["apt-key", "add", "/tmp/maas-{{driver['package']}}.gpg"] -+ driver_02_add: ["add-apt-repository", "-y", "deb {{driver['repository']}} {{node.get_distro_series()}} main"] -+ driver_03_update_install: ["sh", "-c", "apt-get update --quiet && apt-get --assume-yes install {{driver['package']}}"] -+ driver_04_load: ["sh", "-c", "depmod && modprobe {{driver['module']}}"] -+{{endif}} -+late_commands: -+ maas: [wget, '--no-proxy', {{node_disable_pxe_url|escape.json}}, '--post-data', {{node_disable_pxe_data|escape.json}}, '-O', '/dev/null'] -+ salt_01_install: ["curtin", "in-target", "--", "apt-get", "-y", "install", "salt-minion"] -+{% endraw %} -+ salt_02_hostname_set: ["curtin", "in-target", "--", "echo", "{% raw %}{{node.hostname}}{% endraw %}.{{pillar.linux.system.domain}}"] -+ salt_03_hostname_get: ["curtin", "in-target", "--", "sh", "-c", "echo 'id: {% raw %}{{node.hostname}}{% endraw %}.{{pillar.linux.system.domain}}' >> /etc/salt/minion"] -+ salt_04_master: ["curtin", "in-target", "--", "sh", "-c", "echo 'master: {{ salt_master_ip }}' >> /etc/salt/minion"] -+{% raw %} -+{{if third_party_drivers and driver}} -+ driver_00_key_get: curtin in-target -- sh -c "/bin/echo -en '{{key_string}}' > /tmp/maas-{{driver['package']}}.gpg" -+ driver_02_key_add: ["curtin", "in-target", "--", "apt-key", "add", "/tmp/maas-{{driver['package']}}.gpg"] -+ driver_03_add: ["curtin", "in-target", "--", "add-apt-repository", "-y", "deb {{driver['repository']}} {{node.get_distro_series()}} main"] -+ driver_04_update_install: ["curtin", "in-target", "--", "apt-get", "update", "--quiet"] -+ driver_05_install: ["curtin", "in-target", "--", "apt-get", "-y", "install", "{{driver['package']}}"] -+ driver_06_depmod: ["curtin", "in-target", "--", "depmod"] -+ driver_07_update_initramfs: ["curtin", "in-target", "--", "update-initramfs", "-u"] -+{{endif}} -+{% endraw %} diff --git a/patches/opnfv-fuel/0005-mcp-salt-formulas-armband-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0005-mcp-salt-formulas-armband-Extend-libvirt_domain.patch new file mode 100644 index 00000000..07c447be --- /dev/null +++ b/patches/opnfv-fuel/0005-mcp-salt-formulas-armband-Extend-libvirt_domain.patch @@ -0,0 +1,174 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: 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 +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 +--- + mcp/config/states/baremetal_init | 1 + + .../files/salt-minion-aarch64-rollup.diff | 101 ++++++++++++++++++ + mcp/salt-formulas/armband/salt_minion.sls | 7 ++ + 3 files changed, 109 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 891eae36..54ffb873 100755 +--- a/mcp/config/states/baremetal_init ++++ b/mcp/config/states/baremetal_init +@@ -35,6 +35,7 @@ wait_for 30.0 "salt -C 'kvm* or cmp*' test.ping" + salt -C 'cmp*' file.write /etc/dhcp/dhclient-enter-hooks.d/no-default-route \ + args='unset new_routers' + ++salt -C 'kvm*' state.apply armband.salt_minion + salt -C 'kvm* or cmp*' system.reboot + wait_for 90.0 "salt -C 'kvm* or cmp*' 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..9e74c240 +--- /dev/null ++++ b/mcp/salt-formulas/armband/files/salt-minion-aarch64-rollup.diff +@@ -0,0 +1,101 @@ ++From: Alexandru Avadanii ++Date: Sun Aug 20 18:18:53 2017 +0200 ++Subject: [PATCH] cloud.py: Allow AArch64 arch in salt 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`. ++ ++[1] http://bootstrap.saltstack.com ++ ++Signed-off-by: Alexandru Avadanii ++--- ++ ++diff --git a/salt/utils/cloud.py b/salt/utils/cloud.py ++--- a/salt/utils/cloud.py +++++ b/salt/utils/cloud.py ++@@ -2772,6 +2772,9 @@ ++ if not script_content: ++ raise ValueError('No content in bootstrap script !') ++ +++ # NOTE(armband): edit bootstrap script on the fly to allow AArch64 +++ script_content = script_content.replace('"amd64")', '"amd64"|"arm64")') +++ ++ # Get the path to the built-in deploy scripts directory ++ builtin_deploy_dir = os.path.join( ++ os.path.dirname(__file__), ++-- ++ ++From: Alexandru Avadanii ++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 ++--- ++ ++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 @@ ++ {{ cpu }} ++ {{ mem }} ++ +++ {% if custom_virt_machine %} +++ hvm +++ {% else %} ++ hvm +++ {% endif %} +++ {% if os_loader_type == 'pflash' %} +++ {{ os_loader }} +++ {{ os_loader_nvram }} +++ {% endif %} ++ {% for dev in boot_dev %} ++ ++ {% endfor %} ++ +++ {% if cpu_mode == 'custom' %} +++ +++ {% endif %} ++ ++ {% for diskname, disk in disks.items() %} ++ ++-- ++ ++From: Alexandru Avadanii ++Date: Sun Nov 19 02:18:53 2017 +0200 ++Subject: [PATCH] virt.py: undefine: NVRAM flag support ++ ++Signed-off-by: Alexandru Avadanii ++--- ++ ++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 ++ ''' ++ 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/0006-maas-boot-resources-Add-arm64-architecture.patch b/patches/opnfv-fuel/0006-maas-boot-resources-Add-arm64-architecture.patch deleted file mode 100644 index b13390f4..00000000 --- a/patches/opnfv-fuel/0006-maas-boot-resources-Add-arm64-architecture.patch +++ /dev/null @@ -1,39 +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 -Date: Fri, 11 Aug 2017 00:07:29 +0200 -Subject: [PATCH] maas: boot-resources: Add arm64 architecture - -Signed-off-by: Alexandru Avadanii ---- - mcp/patches/0003-maas-region-force-artifact-download.patch | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/mcp/patches/0003-maas-region-force-artifact-download.patch b/mcp/patches/0003-maas-region-force-artifact-download.patch -index b61a3d1b..e38b6c1a 100644 ---- a/mcp/patches/0003-maas-region-force-artifact-download.patch -+++ b/mcp/patches/0003-maas-region-force-artifact-download.patch -@@ -50,7 +50,7 @@ diff --git a/maas/files/maas-artifact-sync.sh b/maas/files/maas-artifact-sync.sh - new file mode 100644 - --- /dev/null - +++ b/maas/files/maas-artifact-sync.sh --@@ -0,0 +1,20 @@ -+@@ -0,0 +1,25 @@ - +{%- from "maas/map.jinja" import region with context %} - +#!/bin/bash - +function wait_for { -@@ -71,3 +71,8 @@ new file mode 100644 - +wait_for 90 "! maas opnfv boot-resources is-importing | grep -q 'true'" - +maas opnfv rack-controllers import-boot-images || exit 3 - +wait_for 30 "test -d /var/lib/maas/boot-resources/current/ubuntu/amd64" -++maas opnfv boot-source-selection update 1 1 arches='amd64' arches='arm64' || exit 4 -++maas opnfv boot-resources import || exit 2 -++wait_for 90 "! maas opnfv boot-resources is-importing | grep -q 'true'" -++maas opnfv rack-controllers import-boot-images || exit 3 -++wait_for 30 "test -d /var/lib/maas/boot-resources/current/ubuntu/arm64" diff --git a/patches/opnfv-fuel/0006-virtng.py-virt.sls-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0006-virtng.py-virt.sls-Extend-libvirt_domain.patch new file mode 100644 index 00000000..09dda594 --- /dev/null +++ b/patches/opnfv-fuel/0006-virtng.py-virt.sls-Extend-libvirt_domain.patch @@ -0,0 +1,223 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: 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 +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 +--- + ...-virtng-module-Extend-libvirt_domain.patch | 54 +++++++++++++++++++ + ...t-control-virt-Extend-libvirt_domain.patch | 51 ++++++++++++++++++ + mcp/patches/patches.list | 2 + + .../cluster/mcp-pike-common-ha/infra/kvm.yml | 15 ++++++ + .../cluster/mcp-pike-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 ++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 ++--- ++ ++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 ++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 ++--- ++ ++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 ce59395c..39e737d6 100644 +--- a/mcp/patches/patches.list ++++ b/mcp/patches/patches.list +@@ -16,3 +16,5 @@ + /usr/share/salt-formulas/env: 0012-routes-Skip-network-restart-on-noifupdown.patch + /usr/share/salt-formulas/env: 0015-Set-ovs-bridges-as-L3-interfaces.patch + /usr/share/salt-formulas/env: 0016-Set-boot-source-selections.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-pike-common-ha/infra/kvm.yml b/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/kvm.yml +index df230452..3548155f 100644 +--- a/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/kvm.yml ++++ b/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/kvm.yml +@@ -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-pike-odl-ha/infra/kvm.yml.j2 b/mcp/reclass/classes/cluster/mcp-pike-odl-ha/infra/kvm.yml.j2 +index 5fc4776d..b19789e3 100644 +--- a/mcp/reclass/classes/cluster/mcp-pike-odl-ha/infra/kvm.yml.j2 ++++ b/mcp/reclass/classes/cluster/mcp-pike-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: diff --git a/patches/opnfv-fuel/0007-Add-opnfv-user-to-the-deployment.patch b/patches/opnfv-fuel/0007-Add-opnfv-user-to-the-deployment.patch new file mode 100644 index 00000000..a5196f38 --- /dev/null +++ b/patches/opnfv-fuel/0007-Add-opnfv-user-to-the-deployment.patch @@ -0,0 +1,72 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: 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: Charalampos Kominos +Date: Fri, 1 Sep 2017 12:24:35 +0200 +Subject: [PATCH] Add opnfv user to the deployment + +Signed-off-by: Alexandru Avadanii +Signed-off-by: Charalampos Kominos +Signed-off-by: Guillermo Herrero +--- + mcp/config/states/baremetal_init | 1 + + mcp/config/states/virtual_control_plane | 1 + + mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml | 4 ++++ + mcp/salt-formulas/opnfv/adduser.sls | 7 +++++++ + 4 files changed, 13 insertions(+) + create mode 100644 mcp/salt-formulas/opnfv/adduser.sls + +diff --git a/mcp/config/states/baremetal_init b/mcp/config/states/baremetal_init +index 54ffb873..07dcef27 100755 +--- a/mcp/config/states/baremetal_init ++++ b/mcp/config/states/baremetal_init +@@ -23,6 +23,7 @@ salt -C 'kvm* or cmp*' file.replace $debian_ip_source \ + repl="\n if not __salt__['pkg.version']('vlan'):\n __salt__['pkg.install']('vlan')" + + salt -C 'kvm*' pkg.install bridge-utils ++salt -C 'kvm* or cmp*' state.apply opnfv.adduser + salt -C 'kvm*' state.apply linux.network,linux.system.kernel + salt -C 'kvm* or cmp*' state.apply salt.minion + wait_for 5.0 "salt -C 'cmp*' state.apply linux.system" +diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane +index 02a813c9..a179b22c 100755 +--- a/mcp/config/states/virtual_control_plane ++++ b/mcp/config/states/virtual_control_plane +@@ -39,6 +39,7 @@ vcp_nodes=$(salt --out yaml 'kvm01*' pillar.get salt:control:cluster:internal:no + # Check all vcp nodes are available + wait_for 25.0 "(for n in ${vcp_nodes}; do salt \${n} test.ping 2>/dev/null || exit; done)" + ++wait_for 5.0 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' state.apply opnfv.adduser" + wait_for 10.0 "salt -C '* and not cfg01* and not mas01*' saltutil.sync_all" + + # Propagate APT proxy config created by curtin on baremetal nodes to VCP VMs +diff --git a/mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml b/mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml +index f9aeb71a..21a5de4e 100644 +--- a/mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml ++++ b/mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml +@@ -9,3 +9,7 @@ + classes: + - cluster.all-mcp-arch-common.arch + - cluster.all-mcp-arch-common.opnfv ++parameters: ++ _param: ++ opnfv_user_username: opnfv ++ opnfv_user_password: $1$5/pIEHT1$XFBhNWW4Q8gYd19hczgPF1 +diff --git a/mcp/salt-formulas/opnfv/adduser.sls b/mcp/salt-formulas/opnfv/adduser.sls +new file mode 100644 +index 00000000..78ef993d +--- /dev/null ++++ b/mcp/salt-formulas/opnfv/adduser.sls +@@ -0,0 +1,7 @@ ++add_opnfv_user: ++ user.present: ++ - name: {{ salt['pillar.get']('_param:opnfv_user_username') }} ++ - password: {{ salt['pillar.get']('_param:opnfv_user_password') }} ++ - createhome: True ++ - groups: ++ - sudo diff --git a/patches/opnfv-fuel/0007-mcp-salt-formulas-armband-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0007-mcp-salt-formulas-armband-Extend-libvirt_domain.patch deleted file mode 100644 index 37fb9dd4..00000000 --- a/patches/opnfv-fuel/0007-mcp-salt-formulas-armband-Extend-libvirt_domain.patch +++ /dev/null @@ -1,174 +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 -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 ---- - mcp/config/states/baremetal_init | 1 + - .../armband/files/salt-minion-aarch64-rollup.diff | 101 +++++++++++++++++++++ - mcp/salt-formulas/armband/salt_minion.sls | 7 ++ - 3 files changed, 109 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 891eae36..54ffb873 100755 ---- a/mcp/config/states/baremetal_init -+++ b/mcp/config/states/baremetal_init -@@ -35,6 +35,7 @@ wait_for 30.0 "salt -C 'kvm* or cmp*' test.ping" - salt -C 'cmp*' file.write /etc/dhcp/dhclient-enter-hooks.d/no-default-route \ - args='unset new_routers' - -+salt -C 'kvm*' state.apply armband.salt_minion - salt -C 'kvm* or cmp*' system.reboot - wait_for 90.0 "salt -C 'kvm* or cmp*' 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..9e74c240 ---- /dev/null -+++ b/mcp/salt-formulas/armband/files/salt-minion-aarch64-rollup.diff -@@ -0,0 +1,101 @@ -+From: Alexandru Avadanii -+Date: Sun Aug 20 18:18:53 2017 +0200 -+Subject: [PATCH] cloud.py: Allow AArch64 arch in salt 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`. -+ -+[1] http://bootstrap.saltstack.com -+ -+Signed-off-by: Alexandru Avadanii -+--- -+ -+diff --git a/salt/utils/cloud.py b/salt/utils/cloud.py -+--- a/salt/utils/cloud.py -++++ b/salt/utils/cloud.py -+@@ -2772,6 +2772,9 @@ -+ if not script_content: -+ raise ValueError('No content in bootstrap script !') -+ -++ # NOTE(armband): edit bootstrap script on the fly to allow AArch64 -++ script_content = script_content.replace('"amd64")', '"amd64"|"arm64")') -++ -+ # Get the path to the built-in deploy scripts directory -+ builtin_deploy_dir = os.path.join( -+ os.path.dirname(__file__), -+-- -+ -+From: Alexandru Avadanii -+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 -+--- -+ -+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 @@ -+ {{ cpu }} -+ {{ mem }} -+ -++ {% if custom_virt_machine %} -++ hvm -++ {% else %} -+ hvm -++ {% endif %} -++ {% if os_loader_type == 'pflash' %} -++ {{ os_loader }} -++ {{ os_loader_nvram }} -++ {% endif %} -+ {% for dev in boot_dev %} -+ -+ {% endfor %} -+ -++ {% if cpu_mode == 'custom' %} -++ -++ {% endif %} -+ -+ {% for diskname, disk in disks.items() %} -+ -+-- -+ -+From: Alexandru Avadanii -+Date: Sun Nov 19 02:18:53 2017 +0200 -+Subject: [PATCH] virt.py: undefine: NVRAM flag support -+ -+Signed-off-by: Alexandru Avadanii -+--- -+ -+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 -+ ''' -+ 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/0008-Revert-Get-back-to-the-GA-kernel.patch b/patches/opnfv-fuel/0008-Revert-Get-back-to-the-GA-kernel.patch new file mode 100644 index 00000000..f570a9bf --- /dev/null +++ b/patches/opnfv-fuel/0008-Revert-Get-back-to-the-GA-kernel.patch @@ -0,0 +1,42 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: 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 +Date: Mon, 22 Jan 2018 19:41:37 +0100 +Subject: [PATCH] Revert "Get back to the GA kernel" + +This partially reverts commit b3b4b2e1bcd42f4628e53796c3dab81151f56bc2 +This reverts commit d06bcfb72c44b507c3efee4de00f415869f48450. +--- + mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas.yml | 2 +- + mcp/reclass/classes/cluster/mcp-pike-odl-ha/infra/maas.yml | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas.yml b/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas.yml +index 238ae95a..3cdb8bf0 100644 +--- a/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas.yml ++++ b/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas.yml +@@ -25,7 +25,7 @@ parameters: + maas_db_password: opnfv_secret + dns_server01: ${_param:opnfv_dns_server01} + single_address: ${_param:infra_maas_node01_deploy_address} +- hwe_kernel: 'hwe-16.04' ++ hwe_kernel: 'hwe-16.04-edge' + maas: + region: + salt_master_ip: ${_param:reclass_config_master} +diff --git a/mcp/reclass/classes/cluster/mcp-pike-odl-ha/infra/maas.yml b/mcp/reclass/classes/cluster/mcp-pike-odl-ha/infra/maas.yml +index 6662f1fa..be18e212 100644 +--- a/mcp/reclass/classes/cluster/mcp-pike-odl-ha/infra/maas.yml ++++ b/mcp/reclass/classes/cluster/mcp-pike-odl-ha/infra/maas.yml +@@ -11,4 +11,4 @@ classes: + - cluster.mcp-pike-odl-ha.infra + parameters: + _param: +- hwe_kernel: 'ga-16.04' ++ hwe_kernel: 'hwe-16.04-edge' 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 bb8a947b..00000000 --- a/patches/opnfv-fuel/0008-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 -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 ---- - .../0103-virtng-module-Extend-libvirt_domain.patch | 54 ++++++++++++++++++++++ - ...4-salt-control-virt-Extend-libvirt_domain.patch | 51 ++++++++++++++++++++ - mcp/patches/patches.list | 2 + - .../cluster/mcp-pike-common-ha/infra/kvm.yml | 15 ++++++ - .../cluster/mcp-pike-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 -+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 -+--- -+ -+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 -+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 -+--- -+ -+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 3632a92b..5bbacf56 100644 ---- a/mcp/patches/patches.list -+++ b/mcp/patches/patches.list -@@ -18,3 +18,5 @@ - /usr/share/salt-formulas/env: 0015-Set-ovs-bridges-as-L3-interfaces.patch - /usr/share/salt-formulas/env: 0016-Set-boot-source-selections.patch - /usr/share/salt-formulas/env: 0101-maas-Add-curtin_userdata_arm64_generic_xenial.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-pike-common-ha/infra/kvm.yml b/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/kvm.yml -index 5bbe0fe4..84b392e6 100644 ---- a/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/kvm.yml -+++ b/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/kvm.yml -@@ -53,21 +53,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: -@@ -88,6 +100,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-pike-odl-ha/infra/kvm.yml.j2 b/mcp/reclass/classes/cluster/mcp-pike-odl-ha/infra/kvm.yml.j2 -index 5fc4776d..b19789e3 100644 ---- a/mcp/reclass/classes/cluster/mcp-pike-odl-ha/infra/kvm.yml.j2 -+++ b/mcp/reclass/classes/cluster/mcp-pike-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: diff --git a/patches/opnfv-fuel/0009-Set-volume-name-in-source-file-to-sdX.patch b/patches/opnfv-fuel/0009-Set-volume-name-in-source-file-to-sdX.patch new file mode 100644 index 00000000..65d58a78 --- /dev/null +++ b/patches/opnfv-fuel/0009-Set-volume-name-in-source-file-to-sdX.patch @@ -0,0 +1,44 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: 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: Charalampos Kominos +Date: Fri, 27 Apr 2018 14:54:22 +0200 +Subject: [PATCH] Set volume name in source file to sdX + +Signed-off-by: Charalampos Kominos +--- + .../classes/cluster/mcp-pike-common-ha/openstack_control.yml.j2 | 2 +- + .../classes/cluster/mcp-pike-common-noha/openstack_control.yml | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/mcp/reclass/classes/cluster/mcp-pike-common-ha/openstack_control.yml.j2 b/mcp/reclass/classes/cluster/mcp-pike-common-ha/openstack_control.yml.j2 +index 599c48e8..018253bb 100644 +--- a/mcp/reclass/classes/cluster/mcp-pike-common-ha/openstack_control.yml.j2 ++++ b/mcp/reclass/classes/cluster/mcp-pike-common-ha/openstack_control.yml.j2 +@@ -130,7 +130,7 @@ parameters: + server: + cacert: /etc/ssl/certs/mcp_os_cacert + openrc_extra: +- volume_device_name: vdc ++ volume_device_name: sdc + bind: + server: + control: +diff --git a/mcp/reclass/classes/cluster/mcp-pike-common-noha/openstack_control.yml b/mcp/reclass/classes/cluster/mcp-pike-common-noha/openstack_control.yml +index 29b2d627..3a994b8d 100644 +--- a/mcp/reclass/classes/cluster/mcp-pike-common-noha/openstack_control.yml ++++ b/mcp/reclass/classes/cluster/mcp-pike-common-noha/openstack_control.yml +@@ -71,7 +71,7 @@ parameters: + server: + admin_email: ${_param:admin_email} + openrc_extra: +- volume_device_name: vdc ++ volume_device_name: sdc + pkgs: + - keystone + - python-psycopg2 diff --git a/patches/opnfv-fuel/0009-seedng-module-Add-AArch64-repo.patch b/patches/opnfv-fuel/0009-seedng-module-Add-AArch64-repo.patch deleted file mode 100644 index 48c05725..00000000 --- a/patches/opnfv-fuel/0009-seedng-module-Add-AArch64-repo.patch +++ /dev/null @@ -1,59 +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 -Date: Mon, 21 Aug 2017 20:42:00 +0200 -Subject: [PATCH] seedng: module: Add AArch64 repo - -salt custom py module seedng.py should use custom repo arg -"-R linux.enea.com/saltstack" on AArch64 nodes. - -Signed-off-by: Alexandru Avadanii ---- - .../0105-seedng-module-Add-AArch64-repo.patch | 22 ++++++++++++++++++++++ - mcp/patches/patches.list | 1 + - 2 files changed, 23 insertions(+) - create mode 100644 mcp/patches/0105-seedng-module-Add-AArch64-repo.patch - -diff --git a/mcp/patches/0105-seedng-module-Add-AArch64-repo.patch b/mcp/patches/0105-seedng-module-Add-AArch64-repo.patch -new file mode 100644 -index 00000000..d40e63b2 ---- /dev/null -+++ b/mcp/patches/0105-seedng-module-Add-AArch64-repo.patch -@@ -0,0 +1,22 @@ -+From: Alexandru Avadanii -+Date: Mon, 21 Aug 2017 02:03:01 +0200 -+Subject: [PATCH] seedng: module: Add AArch64 repo -+ -+salt custom py module seedng.py should use custom repo arg -+"-R linux.enea.com/saltstack" on AArch64 nodes. -+ -+Signed-off-by: Alexandru Avadanii -+--- -+ -+diff --git a/_modules/seedng.py b/_modules/seedng.py -+--- a/_modules/seedng.py -++++ b/_modules/seedng.py -+@@ -257,6 +257,7 @@ -+ or salt.syspaths.BOOTSTRAP) -+ # Exec the chroot command -+- arg = 'stable {0}'.format('.'.join(salt.version.__version__.split('.')[:2])) -++ arg = '-R linux.enea.com/saltstack ' if os.uname()[-1] == 'aarch64' else '' -++ arg += 'stable {0}'.format('.'.join(salt.version.__version__.split('.')[:2])) -+ cmd = 'if type salt-minion; then exit 0; ' -+ cmd += 'else sh {0} -c /tmp {1}; fi'.format( -+ os.path.join(tmppath, 'bootstrap-salt.sh'), arg) -diff --git a/mcp/patches/patches.list b/mcp/patches/patches.list -index 5bbacf56..d6e84a50 100644 ---- a/mcp/patches/patches.list -+++ b/mcp/patches/patches.list -@@ -20,3 +20,4 @@ - /usr/share/salt-formulas/env: 0101-maas-Add-curtin_userdata_arm64_generic_xenial.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 -+/usr/share/salt-formulas/env: 0105-seedng-module-Add-AArch64-repo.patch diff --git a/patches/opnfv-fuel/0010-Add-opnfv-user-to-the-deployment.patch b/patches/opnfv-fuel/0010-Add-opnfv-user-to-the-deployment.patch deleted file mode 100644 index a5196f38..00000000 --- a/patches/opnfv-fuel/0010-Add-opnfv-user-to-the-deployment.patch +++ /dev/null @@ -1,72 +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: Charalampos Kominos -Date: Fri, 1 Sep 2017 12:24:35 +0200 -Subject: [PATCH] Add opnfv user to the deployment - -Signed-off-by: Alexandru Avadanii -Signed-off-by: Charalampos Kominos -Signed-off-by: Guillermo Herrero ---- - mcp/config/states/baremetal_init | 1 + - mcp/config/states/virtual_control_plane | 1 + - mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml | 4 ++++ - mcp/salt-formulas/opnfv/adduser.sls | 7 +++++++ - 4 files changed, 13 insertions(+) - create mode 100644 mcp/salt-formulas/opnfv/adduser.sls - -diff --git a/mcp/config/states/baremetal_init b/mcp/config/states/baremetal_init -index 54ffb873..07dcef27 100755 ---- a/mcp/config/states/baremetal_init -+++ b/mcp/config/states/baremetal_init -@@ -23,6 +23,7 @@ salt -C 'kvm* or cmp*' file.replace $debian_ip_source \ - repl="\n if not __salt__['pkg.version']('vlan'):\n __salt__['pkg.install']('vlan')" - - salt -C 'kvm*' pkg.install bridge-utils -+salt -C 'kvm* or cmp*' state.apply opnfv.adduser - salt -C 'kvm*' state.apply linux.network,linux.system.kernel - salt -C 'kvm* or cmp*' state.apply salt.minion - wait_for 5.0 "salt -C 'cmp*' state.apply linux.system" -diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane -index 02a813c9..a179b22c 100755 ---- a/mcp/config/states/virtual_control_plane -+++ b/mcp/config/states/virtual_control_plane -@@ -39,6 +39,7 @@ vcp_nodes=$(salt --out yaml 'kvm01*' pillar.get salt:control:cluster:internal:no - # Check all vcp nodes are available - wait_for 25.0 "(for n in ${vcp_nodes}; do salt \${n} test.ping 2>/dev/null || exit; done)" - -+wait_for 5.0 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' state.apply opnfv.adduser" - wait_for 10.0 "salt -C '* and not cfg01* and not mas01*' saltutil.sync_all" - - # Propagate APT proxy config created by curtin on baremetal nodes to VCP VMs -diff --git a/mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml b/mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml -index f9aeb71a..21a5de4e 100644 ---- a/mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml -+++ b/mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml -@@ -9,3 +9,7 @@ - classes: - - cluster.all-mcp-arch-common.arch - - cluster.all-mcp-arch-common.opnfv -+parameters: -+ _param: -+ opnfv_user_username: opnfv -+ opnfv_user_password: $1$5/pIEHT1$XFBhNWW4Q8gYd19hczgPF1 -diff --git a/mcp/salt-formulas/opnfv/adduser.sls b/mcp/salt-formulas/opnfv/adduser.sls -new file mode 100644 -index 00000000..78ef993d ---- /dev/null -+++ b/mcp/salt-formulas/opnfv/adduser.sls -@@ -0,0 +1,7 @@ -+add_opnfv_user: -+ user.present: -+ - name: {{ salt['pillar.get']('_param:opnfv_user_username') }} -+ - password: {{ salt['pillar.get']('_param:opnfv_user_password') }} -+ - createhome: True -+ - groups: -+ - sudo diff --git a/patches/opnfv-fuel/0011-Revert-Get-back-to-the-GA-kernel.patch b/patches/opnfv-fuel/0011-Revert-Get-back-to-the-GA-kernel.patch deleted file mode 100644 index 3432e857..00000000 --- a/patches/opnfv-fuel/0011-Revert-Get-back-to-the-GA-kernel.patch +++ /dev/null @@ -1,42 +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 -Date: Mon, 22 Jan 2018 19:41:37 +0100 -Subject: [PATCH] Revert "Get back to the GA kernel" - -This partially reverts commit b3b4b2e1bcd42f4628e53796c3dab81151f56bc2 -This reverts commit d06bcfb72c44b507c3efee4de00f415869f48450. ---- - mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas.yml | 2 +- - mcp/reclass/classes/cluster/mcp-pike-odl-ha/infra/maas.yml | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas.yml b/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas.yml -index 226a4f66..a2987423 100644 ---- a/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas.yml -+++ b/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas.yml -@@ -25,7 +25,7 @@ parameters: - maas_db_password: opnfv_secret - dns_server01: ${_param:opnfv_dns_server01} - single_address: ${_param:infra_maas_node01_deploy_address} -- hwe_kernel: 'hwe-16.04' -+ hwe_kernel: 'hwe-16.04-edge' - maas: - region: - salt_master_ip: ${_param:reclass_config_master} -diff --git a/mcp/reclass/classes/cluster/mcp-pike-odl-ha/infra/maas.yml b/mcp/reclass/classes/cluster/mcp-pike-odl-ha/infra/maas.yml -index 6662f1fa..be18e212 100644 ---- a/mcp/reclass/classes/cluster/mcp-pike-odl-ha/infra/maas.yml -+++ b/mcp/reclass/classes/cluster/mcp-pike-odl-ha/infra/maas.yml -@@ -11,4 +11,4 @@ classes: - - cluster.mcp-pike-odl-ha.infra - parameters: - _param: -- hwe_kernel: 'ga-16.04' -+ hwe_kernel: 'hwe-16.04-edge' diff --git a/patches/opnfv-fuel/0012-Set-volume-name-in-source-file-to-sdX.patch b/patches/opnfv-fuel/0012-Set-volume-name-in-source-file-to-sdX.patch deleted file mode 100644 index 452bd1a8..00000000 --- a/patches/opnfv-fuel/0012-Set-volume-name-in-source-file-to-sdX.patch +++ /dev/null @@ -1,44 +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: Charalampos Kominos -Date: Fri, 27 Apr 2018 14:54:22 +0200 -Subject: [PATCH] Set volume name in source file to sdX - -Signed-off-by: Charalampos Kominos ---- - mcp/reclass/classes/cluster/mcp-pike-common-ha/openstack_control.yml.j2 | 2 +- - mcp/reclass/classes/cluster/mcp-pike-common-noha/openstack_control.yml | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/mcp/reclass/classes/cluster/mcp-pike-common-ha/openstack_control.yml.j2 b/mcp/reclass/classes/cluster/mcp-pike-common-ha/openstack_control.yml.j2 -index 599c48e8..018253bb 100644 ---- a/mcp/reclass/classes/cluster/mcp-pike-common-ha/openstack_control.yml.j2 -+++ b/mcp/reclass/classes/cluster/mcp-pike-common-ha/openstack_control.yml.j2 -@@ -130,7 +130,7 @@ parameters: - server: - cacert: /etc/ssl/certs/mcp_os_cacert - openrc_extra: -- volume_device_name: vdc -+ volume_device_name: sdc - bind: - server: - control: -diff --git a/mcp/reclass/classes/cluster/mcp-pike-common-noha/openstack_control.yml b/mcp/reclass/classes/cluster/mcp-pike-common-noha/openstack_control.yml -index 29b2d627..3a994b8d 100644 ---- a/mcp/reclass/classes/cluster/mcp-pike-common-noha/openstack_control.yml -+++ b/mcp/reclass/classes/cluster/mcp-pike-common-noha/openstack_control.yml -@@ -71,7 +71,7 @@ parameters: - server: - admin_email: ${_param:admin_email} - openrc_extra: -- volume_device_name: vdc -+ volume_device_name: sdc - pkgs: - - keystone - - python-psycopg2 diff --git a/patches/reclass-system-salt-model/0001-linux.system.repo-Drop-arch-for-glusterfs-repo.patch b/patches/reclass-system-salt-model/0001-linux.system.repo-Drop-arch-for-glusterfs-repo.patch new file mode 100644 index 00000000..1500f674 --- /dev/null +++ b/patches/reclass-system-salt-model/0001-linux.system.repo-Drop-arch-for-glusterfs-repo.patch @@ -0,0 +1,35 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2018 Mirantis Inc., 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 +Date: Sun, 26 Nov 2017 17:55:13 +0100 +Subject: [PATCH] linux.system.repo: Drop arch for glusterfs repo + +Extending the arch list to 'amd64,arm64' would lead to doubling repo +metadata downloads on all archs, while dropping it will allow APT to +only download the repo metadata for the current system arch. + +To keep old behavior for amd64 and prevent multiple downloads, let's +just drop the 'architectures' field. + +Signed-off-by: Alexandru Avadanii +--- + linux/system/repo/glusterfs.yml | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/linux/system/repo/glusterfs.yml b/linux/system/repo/glusterfs.yml +index fb331f0f..4646c075 100644 +--- a/linux/system/repo/glusterfs.yml ++++ b/linux/system/repo/glusterfs.yml +@@ -6,6 +6,5 @@ parameters: + repo: + glusterfs-ppa: + source: "deb http://ppa.launchpad.net/gluster/glusterfs-${_param:glusterfs_version}/ubuntu ${_param:linux_system_codename} main" +- architectures: amd64 + key_id: 3FE869A9 + key_server: keyserver.ubuntu.com diff --git a/patches/reclass-system-salt-model/0001-linux.system.repo.mcp-Add-Armband-repos.patch b/patches/reclass-system-salt-model/0001-linux.system.repo.mcp-Add-Armband-repos.patch deleted file mode 100644 index f1b7824b..00000000 --- a/patches/reclass-system-salt-model/0001-linux.system.repo.mcp-Add-Armband-repos.patch +++ /dev/null @@ -1,56 +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 -Date: Mon, 10 Jul 2017 15:31:08 +0000 -Subject: [PATCH] linux.system.repo.mcp: Add Armband repos - -Signed-off-by: Alexandru Avadanii ---- - linux/system/repo/mcp/armband.yml | 12 ++++++++++++ - linux/system/repo/mcp/extra.yml | 10 ++++++++++ - linux/system/repo/mcp/openstack.yml | 17 +++++++++++++++++ - 3 files changed, 39 insertions(+) - create mode 100644 linux/system/repo/mcp/armband.yml - -diff --git a/linux/system/repo/mcp/armband.yml b/linux/system/repo/mcp/armband.yml -new file mode 100644 -index 0000000..d1fa43a ---- /dev/null -+++ b/linux/system/repo/mcp/armband.yml -@@ -0,0 +1,12 @@ -+parameters: -+ linux: -+ system: -+ repo: -+ armband: -+ source: "deb http://linux.enea.com/mcp-repos/${_param:openstack_version}/${_param:linux_system_codename} ${_param:openstack_version}-armband main" -+ architectures: arm64 -+ key_url: "https://linux.enea.com/mcp-repos/${_param:openstack_version}/${_param:linux_system_codename}/archive-mcp${_param:openstack_version}.key" -+ pin: -+ - pin: 'release l=${_param:openstack_version}-armband' -+ priority: 1100 -+ package: '*' -diff --git a/linux/system/repo/mcp/extra.yml b/linux/system/repo/mcp/extra.yml -index 9839a23..ad9b5ce 100644 ---- a/linux/system/repo/mcp/extra.yml -+++ b/linux/system/repo/mcp/extra.yml -@@ -14,3 +14,13 @@ parameters: - - pin: 'release a=${_param:linux_system_repo_mcp_extra_version}' - priority: 1100 - package: '*' -+ # Armband only provides apt_mk_version=nightly for now -+ armband_mcp_extra: -+ source: "deb [arch=arm64] http://linux.enea.com/apt-mk/${_param:linux_system_codename}/ nightly extra" -+ architectures: arm64 -+ key_url: "https://linux.enea.com/apt-mk/public.gpg" -+ clean_file: true -+ pin: -+ - pin: 'release a=nightly' -+ priority: 1100 -+ package: '*' diff --git a/patches/reclass-system-salt-model/0002-linux.system-AArch64-Remove-mcelog.patch b/patches/reclass-system-salt-model/0002-linux.system-AArch64-Remove-mcelog.patch deleted file mode 100644 index 859caeaf..00000000 --- a/patches/reclass-system-salt-model/0002-linux.system-AArch64-Remove-mcelog.patch +++ /dev/null @@ -1,34 +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 -Date: Fri, 14 Jul 2017 19:26:11 +0000 -Subject: [PATCH] linux.system: AArch64: Remove mcelog - -mcelog is not available on AArch64 hardware, so skip trying to install -it. This implies Ceilometer should not use mcelog on AArch64. - -Signed-off-by: Guillermo Herrero -Signed-off-by: Alexandru Avadanii ---- - linux/system/single/debian.yml | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/linux/system/single/debian.yml b/linux/system/single/debian.yml -index b4d08c9..ef8266a 100644 ---- a/linux/system/single/debian.yml -+++ b/linux/system/single/debian.yml -@@ -10,8 +10,6 @@ parameters: - version: latest - cloud-init: - version: purged -- mcelog: -- version: latest - python-msgpack: - version: latest - unattended-upgrades: diff --git a/patches/reclass-system-salt-model/0002-linux.system.repo-Drop-arch-for-openstack-repo.patch b/patches/reclass-system-salt-model/0002-linux.system.repo-Drop-arch-for-openstack-repo.patch new file mode 100644 index 00000000..1da4a212 --- /dev/null +++ b/patches/reclass-system-salt-model/0002-linux.system.repo-Drop-arch-for-openstack-repo.patch @@ -0,0 +1,40 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2018 Mirantis Inc., 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 +Date: Wed, 4 Apr 2018 20:08:55 +0200 +Subject: [PATCH] linux.system.repo: Drop arch for openstack repo + +Now that mcp-repos mirror has arm64 packages too, we can either extend +the current architecture list or just drop it and let APT figure it +out. + +Extending the arch list to 'amd64,arm64' would lead to doubling repo +metadata downloads on all archs, while dropping it will allow APT to +only download the repo metadata for the current system arch. + +To keep old behavior for amd64 and prevent multiple downloads, let's +just drop the 'architectures' field. + +Signed-off-by: Alexandru Avadanii +--- + linux/system/repo/mcp/openstack.yml | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/linux/system/repo/mcp/openstack.yml b/linux/system/repo/mcp/openstack.yml +index 465b75d0..8de17774 100644 +--- a/linux/system/repo/mcp/openstack.yml ++++ b/linux/system/repo/mcp/openstack.yml +@@ -7,7 +7,6 @@ parameters: + repo: + mirantis_openstack: + source: "deb http://mirror.fuel-infra.org/mcp-repos/${_param:openstack_version}/${_param:linux_system_codename} ${_param:openstack_version} main" +- architectures: amd64 + key_url: "http://mirror.fuel-infra.org/mcp-repos/${_param:openstack_version}/${_param:linux_system_codename}/archive-mcp${_param:openstack_version}.key" + pin: + - pin: 'release l=${_param:openstack_version}' diff --git a/patches/reclass-system-salt-model/0003-linux.system.repo.glusterfs-Add-arm64-arch.patch b/patches/reclass-system-salt-model/0003-linux.system.repo.glusterfs-Add-arm64-arch.patch deleted file mode 100644 index a5955091..00000000 --- a/patches/reclass-system-salt-model/0003-linux.system.repo.glusterfs-Add-arm64-arch.patch +++ /dev/null @@ -1,29 +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 -Date: Sun, 26 Nov 2017 17:55:13 +0100 -Subject: [PATCH] linux.system.repo.glusterfs: Add arm64 arch - -Signed-off-by: Alexandru Avadanii ---- - linux/system/repo/glusterfs.yml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/linux/system/repo/glusterfs.yml b/linux/system/repo/glusterfs.yml -index fb331f0..ffad938 100644 ---- a/linux/system/repo/glusterfs.yml -+++ b/linux/system/repo/glusterfs.yml -@@ -6,6 +6,6 @@ parameters: - repo: - glusterfs-ppa: - source: "deb http://ppa.launchpad.net/gluster/glusterfs-${_param:glusterfs_version}/ubuntu ${_param:linux_system_codename} main" -- architectures: amd64 -+ architectures: amd64,arm64 - key_id: 3FE869A9 - key_server: keyserver.ubuntu.com diff --git a/patches/reclass-system-salt-model/0004-linux.system.repo-Drop-arch-for-openstack-repo.patch b/patches/reclass-system-salt-model/0004-linux.system.repo-Drop-arch-for-openstack-repo.patch deleted file mode 100644 index 9fd02fa1..00000000 --- a/patches/reclass-system-salt-model/0004-linux.system.repo-Drop-arch-for-openstack-repo.patch +++ /dev/null @@ -1,40 +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 -Date: Wed, 4 Apr 2018 20:08:55 +0200 -Subject: [PATCH] linux.system.repo: Drop arch for openstack repo - -Now that mcp-repos mirror has arm64 packages too, we can either extend -the current architecture list or just drop it and let APT figure it -out. - -Extending the arch list to 'amd64,arm64' would lead to doubling repo -metadata downloads on all archs, while dropping it will allow APT to -only download the repo metadata for the current system arch. - -To keep old behavior for amd64 and prevent multiple downloads, let's -just drop the 'architectures' field. - -Signed-off-by: Alexandru Avadanii ---- - linux/system/repo/mcp/openstack.yml | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/linux/system/repo/mcp/openstack.yml b/linux/system/repo/mcp/openstack.yml -index 22defb75..302c7cb3 100644 ---- a/linux/system/repo/mcp/openstack.yml -+++ b/linux/system/repo/mcp/openstack.yml -@@ -7,7 +7,6 @@ parameters: - repo: - mirantis_openstack: - source: "deb http://mirror.fuel-infra.org/mcp-repos/${_param:openstack_version}/${_param:linux_system_codename} ${_param:openstack_version} main" -- architectures: amd64 - key_url: "http://mirror.fuel-infra.org/mcp-repos/${_param:openstack_version}/${_param:linux_system_codename}/archive-mcp${_param:openstack_version}.key" - pin: - - pin: 'release l=${_param:openstack_version}' diff --git a/upstream/fuel b/upstream/fuel index a021366c..bd04374d 160000 --- a/upstream/fuel +++ b/upstream/fuel @@ -1 +1 @@ -Subproject commit a021366c0934d74889ac7d64e0857e35bdd0319c +Subproject commit bd04374d931bea88476d4c3d08ac44f46febecce -- cgit 1.2.3-korg