From 1e6be0b7a685fe5c3575bb49843dfa1a12c071fd Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Wed, 23 May 2018 19:29:25 +0200 Subject: u/fuel: Bump & rebase for maas.machines.storage Change-Id: I22781c20f353a81e546b1d6de390e6c58b31a494 Signed-off-by: Alexandru Avadanii (cherry picked from commit 0bd1adfbf11d58414b96d0277386b039a3117a9e) --- ...-salt-formulas-Add-enable-armband-formula.patch | 13 +- ...aas-boot-resources-Add-arm64-architecture.patch | 39 ---- ...lt-formulas-armband-Extend-libvirt_domain.patch | 174 ++++++++++++++++ ...lt-formulas-armband-Extend-libvirt_domain.patch | 174 ---------------- ...-virtng.py-virt.sls-Extend-libvirt_domain.patch | 223 +++++++++++++++++++++ .../0006-Add-opnfv-user-to-the-deployment.patch | 72 +++++++ ...-virtng.py-virt.sls-Extend-libvirt_domain.patch | 223 --------------------- .../0007-Add-opnfv-user-to-the-deployment.patch | 72 ------- ...007-Set-volume-name-in-source-file-to-sdX.patch | 44 ++++ .../0008-Revert-Get-back-to-the-GA-kernel.patch | 42 ---- .../0008-curtin-arm64-Fix-missing-newline.patch | 56 ++++++ ...009-Set-volume-name-in-source-file-to-sdX.patch | 44 ---- .../0010-curtin-arm64-Fix-missing-newline.patch | 56 ------ 13 files changed, 574 insertions(+), 658 deletions(-) delete mode 100644 patches/opnfv-fuel/0004-maas-boot-resources-Add-arm64-architecture.patch create mode 100644 patches/opnfv-fuel/0004-mcp-salt-formulas-armband-Extend-libvirt_domain.patch delete mode 100644 patches/opnfv-fuel/0005-mcp-salt-formulas-armband-Extend-libvirt_domain.patch create mode 100644 patches/opnfv-fuel/0005-virtng.py-virt.sls-Extend-libvirt_domain.patch create mode 100644 patches/opnfv-fuel/0006-Add-opnfv-user-to-the-deployment.patch delete mode 100644 patches/opnfv-fuel/0006-virtng.py-virt.sls-Extend-libvirt_domain.patch delete mode 100644 patches/opnfv-fuel/0007-Add-opnfv-user-to-the-deployment.patch create mode 100644 patches/opnfv-fuel/0007-Set-volume-name-in-source-file-to-sdX.patch delete mode 100644 patches/opnfv-fuel/0008-Revert-Get-back-to-the-GA-kernel.patch create mode 100644 patches/opnfv-fuel/0008-curtin-arm64-Fix-missing-newline.patch delete mode 100644 patches/opnfv-fuel/0009-Set-volume-name-in-source-file-to-sdX.patch delete mode 100644 patches/opnfv-fuel/0010-curtin-arm64-Fix-missing-newline.patch (limited to 'patches/opnfv-fuel') 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 index a04780b5..e228b805 100644 --- a/patches/opnfv-fuel/0001-salt-formulas-Add-enable-armband-formula.patch +++ b/patches/opnfv-fuel/0001-salt-formulas-Add-enable-armband-formula.patch @@ -44,7 +44,7 @@ Signed-off-by: Alexandru Avadanii 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 +index 73c44bb6..4ac5d6d5 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 @@ -56,18 +56,15 @@ index a30f9af6..600aa76b 100755 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 +index 70db238b..52d643df 100755 --- a/mcp/config/states/openstack_noha +++ b/mcp/config/states/openstack_noha -@@ -55,6 +55,8 @@ salt -I 'ceilometer:agent' state.sls ceilometer +@@ -54,3 +54,5 @@ salt -I 'ceilometer:server' state.sls ceilometer + 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 \ ++salt -I 'nova:compute' state.sls armband 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 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 deleted file mode 100644 index b13390f4..00000000 --- a/patches/opnfv-fuel/0004-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/0004-mcp-salt-formulas-armband-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0004-mcp-salt-formulas-armband-Extend-libvirt_domain.patch new file mode 100644 index 00000000..07c447be --- /dev/null +++ b/patches/opnfv-fuel/0004-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/0005-mcp-salt-formulas-armband-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0005-mcp-salt-formulas-armband-Extend-libvirt_domain.patch deleted file mode 100644 index 07c447be..00000000 --- a/patches/opnfv-fuel/0005-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 + - .../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/0005-virtng.py-virt.sls-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0005-virtng.py-virt.sls-Extend-libvirt_domain.patch new file mode 100644 index 00000000..09dda594 --- /dev/null +++ b/patches/opnfv-fuel/0005-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/0006-Add-opnfv-user-to-the-deployment.patch b/patches/opnfv-fuel/0006-Add-opnfv-user-to-the-deployment.patch new file mode 100644 index 00000000..a5196f38 --- /dev/null +++ b/patches/opnfv-fuel/0006-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/0006-virtng.py-virt.sls-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0006-virtng.py-virt.sls-Extend-libvirt_domain.patch deleted file mode 100644 index 09dda594..00000000 --- a/patches/opnfv-fuel/0006-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 ---- - ...-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 deleted file mode 100644 index a5196f38..00000000 --- a/patches/opnfv-fuel/0007-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/0007-Set-volume-name-in-source-file-to-sdX.patch b/patches/opnfv-fuel/0007-Set-volume-name-in-source-file-to-sdX.patch new file mode 100644 index 00000000..65d58a78 --- /dev/null +++ b/patches/opnfv-fuel/0007-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/0008-Revert-Get-back-to-the-GA-kernel.patch b/patches/opnfv-fuel/0008-Revert-Get-back-to-the-GA-kernel.patch deleted file mode 100644 index f570a9bf..00000000 --- a/patches/opnfv-fuel/0008-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 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-curtin-arm64-Fix-missing-newline.patch b/patches/opnfv-fuel/0008-curtin-arm64-Fix-missing-newline.patch new file mode 100644 index 00000000..7d830cc3 --- /dev/null +++ b/patches/opnfv-fuel/0008-curtin-arm64-Fix-missing-newline.patch @@ -0,0 +1,56 @@ +From: Alexandru Avadanii +Date: Wed, 23 May 2018 18:53:04 +0200 +Subject: [PATCH] curtin: arm64: Fix missing newline + +Signed-off-by: Alexandru Avadanii +--- + ...4-Fix-missing-newline-after-j2-parse.patch | 30 +++++++++++++++++++ + mcp/patches/patches.list | 1 + + 2 files changed, 31 insertions(+) + create mode 100644 mcp/patches/0105-curtin-arm64-Fix-missing-newline-after-j2-parse.patch + +diff --git a/mcp/patches/0105-curtin-arm64-Fix-missing-newline-after-j2-parse.patch b/mcp/patches/0105-curtin-arm64-Fix-missing-newline-after-j2-parse.patch +new file mode 100644 +index 00000000..f16ed9e7 +--- /dev/null ++++ b/mcp/patches/0105-curtin-arm64-Fix-missing-newline-after-j2-parse.patch +@@ -0,0 +1,30 @@ ++:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ++: 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, 23 May 2018 05:28:00 +0200 ++Subject: [PATCH] curtin: arm64: Fix missing newline after j2 parse ++ ++Signed-off-by: Alexandru Avadanii ++--- ++ maas/files/curtin_userdata_arm64_generic_xenial | 2 +- ++ 1 file changed, 1 insertion(+), 1 deletion(-) ++ ++diff --git a/maas/files/curtin_userdata_arm64_generic_xenial b/maas/files/curtin_userdata_arm64_generic_xenial ++index b070aaa..21877b2 100644 ++--- a/maas/files/curtin_userdata_arm64_generic_xenial +++++ b/maas/files/curtin_userdata_arm64_generic_xenial ++@@ -22,7 +22,7 @@ late_commands: ++ {% set salt_repo_key = salt['hashutil.base64_b64encode'](cluster.saltstack_repo_key) %} ++ apt_00_set_gpg: ["curtin", "in-target", "--", "sh", "-c", "echo '{{salt_repo_key}}' | base64 -d | apt-key add -"] ++ {%- endif %} ++-{#- NOTE: Re-use amd64 repos on arm64 since most packages are arch independent -#} +++{#- NOTE: Re-use amd64 repos on arm64 since most packages are arch independent #} ++ apt_01_set_repo: ["curtin", "in-target", "--", "sh", "-c", "echo 'deb [arch=amd64] {{ cluster.saltstack_repo_xenial }}' >> /etc/apt/sources.list"] ++ {% raw %} ++ apt_03_update: ["curtin", "in-target", "--", "apt-get", "update"] +diff --git a/mcp/patches/patches.list b/mcp/patches/patches.list +index 39e737d6..b3aa013e 100644 +--- a/mcp/patches/patches.list ++++ b/mcp/patches/patches.list +@@ -18,3 +18,4 @@ + /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 ++/usr/share/salt-formulas/env: 0105-curtin-arm64-Fix-missing-newline-after-j2-parse.patch 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 deleted file mode 100644 index 65d58a78..00000000 --- a/patches/opnfv-fuel/0009-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 ---- - .../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/0010-curtin-arm64-Fix-missing-newline.patch b/patches/opnfv-fuel/0010-curtin-arm64-Fix-missing-newline.patch deleted file mode 100644 index 7d830cc3..00000000 --- a/patches/opnfv-fuel/0010-curtin-arm64-Fix-missing-newline.patch +++ /dev/null @@ -1,56 +0,0 @@ -From: Alexandru Avadanii -Date: Wed, 23 May 2018 18:53:04 +0200 -Subject: [PATCH] curtin: arm64: Fix missing newline - -Signed-off-by: Alexandru Avadanii ---- - ...4-Fix-missing-newline-after-j2-parse.patch | 30 +++++++++++++++++++ - mcp/patches/patches.list | 1 + - 2 files changed, 31 insertions(+) - create mode 100644 mcp/patches/0105-curtin-arm64-Fix-missing-newline-after-j2-parse.patch - -diff --git a/mcp/patches/0105-curtin-arm64-Fix-missing-newline-after-j2-parse.patch b/mcp/patches/0105-curtin-arm64-Fix-missing-newline-after-j2-parse.patch -new file mode 100644 -index 00000000..f16ed9e7 ---- /dev/null -+++ b/mcp/patches/0105-curtin-arm64-Fix-missing-newline-after-j2-parse.patch -@@ -0,0 +1,30 @@ -+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -+: 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, 23 May 2018 05:28:00 +0200 -+Subject: [PATCH] curtin: arm64: Fix missing newline after j2 parse -+ -+Signed-off-by: Alexandru Avadanii -+--- -+ maas/files/curtin_userdata_arm64_generic_xenial | 2 +- -+ 1 file changed, 1 insertion(+), 1 deletion(-) -+ -+diff --git a/maas/files/curtin_userdata_arm64_generic_xenial b/maas/files/curtin_userdata_arm64_generic_xenial -+index b070aaa..21877b2 100644 -+--- a/maas/files/curtin_userdata_arm64_generic_xenial -++++ b/maas/files/curtin_userdata_arm64_generic_xenial -+@@ -22,7 +22,7 @@ late_commands: -+ {% set salt_repo_key = salt['hashutil.base64_b64encode'](cluster.saltstack_repo_key) %} -+ apt_00_set_gpg: ["curtin", "in-target", "--", "sh", "-c", "echo '{{salt_repo_key}}' | base64 -d | apt-key add -"] -+ {%- endif %} -+-{#- NOTE: Re-use amd64 repos on arm64 since most packages are arch independent -#} -++{#- NOTE: Re-use amd64 repos on arm64 since most packages are arch independent #} -+ apt_01_set_repo: ["curtin", "in-target", "--", "sh", "-c", "echo 'deb [arch=amd64] {{ cluster.saltstack_repo_xenial }}' >> /etc/apt/sources.list"] -+ {% raw %} -+ apt_03_update: ["curtin", "in-target", "--", "apt-get", "update"] -diff --git a/mcp/patches/patches.list b/mcp/patches/patches.list -index 39e737d6..b3aa013e 100644 ---- a/mcp/patches/patches.list -+++ b/mcp/patches/patches.list -@@ -18,3 +18,4 @@ - /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 -+/usr/share/salt-formulas/env: 0105-curtin-arm64-Fix-missing-newline-after-j2-parse.patch -- cgit 1.2.3-korg