From 4270458ba464057578f2bbc7360fb8d0f8fa89cc Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Tue, 29 May 2018 17:32:56 +0200 Subject: u/fuel: Bump & rebase for upstream ODL leveldbjni JIRA: ARMBAND-387 Change-Id: Id24c15f7390bb63b6c422f1da8548effd5aa885a Signed-off-by: Alexandru Avadanii --- ...lt-formulas-armband-Extend-libvirt_domain.patch | 174 ++++++++++++++++ ...alt-formulas-opendaylight-AArch64-leveldb.patch | 48 ----- ...lt-formulas-armband-Extend-libvirt_domain.patch | 174 ---------------- ...-virtng.py-virt.sls-Extend-libvirt_domain.patch | 223 +++++++++++++++++++++ .../0005-Add-opnfv-user-to-the-deployment.patch | 72 +++++++ ...-virtng.py-virt.sls-Extend-libvirt_domain.patch | 223 --------------------- .../0006-Add-opnfv-user-to-the-deployment.patch | 72 ------- ...006-Set-volume-name-in-source-file-to-sdX.patch | 44 ++++ ...007-Set-volume-name-in-source-file-to-sdX.patch | 44 ---- .../0007-curtin-arm64-Fix-missing-newline.patch | 56 ++++++ .../0008-curtin-arm64-Fix-missing-newline.patch | 56 ------ 11 files changed, 569 insertions(+), 617 deletions(-) create mode 100644 patches/opnfv-fuel/0003-mcp-salt-formulas-armband-Extend-libvirt_domain.patch delete mode 100644 patches/opnfv-fuel/0003-mcp-salt-formulas-opendaylight-AArch64-leveldb.patch delete mode 100644 patches/opnfv-fuel/0004-mcp-salt-formulas-armband-Extend-libvirt_domain.patch create mode 100644 patches/opnfv-fuel/0004-virtng.py-virt.sls-Extend-libvirt_domain.patch create mode 100644 patches/opnfv-fuel/0005-Add-opnfv-user-to-the-deployment.patch delete mode 100644 patches/opnfv-fuel/0005-virtng.py-virt.sls-Extend-libvirt_domain.patch delete mode 100644 patches/opnfv-fuel/0006-Add-opnfv-user-to-the-deployment.patch create mode 100644 patches/opnfv-fuel/0006-Set-volume-name-in-source-file-to-sdX.patch delete mode 100644 patches/opnfv-fuel/0007-Set-volume-name-in-source-file-to-sdX.patch create mode 100644 patches/opnfv-fuel/0007-curtin-arm64-Fix-missing-newline.patch delete mode 100644 patches/opnfv-fuel/0008-curtin-arm64-Fix-missing-newline.patch (limited to 'patches') diff --git a/patches/opnfv-fuel/0003-mcp-salt-formulas-armband-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0003-mcp-salt-formulas-armband-Extend-libvirt_domain.patch new file mode 100644 index 00000000..07c447be --- /dev/null +++ b/patches/opnfv-fuel/0003-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/0003-mcp-salt-formulas-opendaylight-AArch64-leveldb.patch b/patches/opnfv-fuel/0003-mcp-salt-formulas-opendaylight-AArch64-leveldb.patch deleted file mode 100644 index c2f2c36f..00000000 --- a/patches/opnfv-fuel/0003-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/0004-mcp-salt-formulas-armband-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0004-mcp-salt-formulas-armband-Extend-libvirt_domain.patch deleted file mode 100644 index 07c447be..00000000 --- a/patches/opnfv-fuel/0004-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/0004-virtng.py-virt.sls-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0004-virtng.py-virt.sls-Extend-libvirt_domain.patch new file mode 100644 index 00000000..09dda594 --- /dev/null +++ b/patches/opnfv-fuel/0004-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/0005-Add-opnfv-user-to-the-deployment.patch b/patches/opnfv-fuel/0005-Add-opnfv-user-to-the-deployment.patch new file mode 100644 index 00000000..a5196f38 --- /dev/null +++ b/patches/opnfv-fuel/0005-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/0005-virtng.py-virt.sls-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0005-virtng.py-virt.sls-Extend-libvirt_domain.patch deleted file mode 100644 index 09dda594..00000000 --- a/patches/opnfv-fuel/0005-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/0006-Add-opnfv-user-to-the-deployment.patch b/patches/opnfv-fuel/0006-Add-opnfv-user-to-the-deployment.patch deleted file mode 100644 index a5196f38..00000000 --- a/patches/opnfv-fuel/0006-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/0006-Set-volume-name-in-source-file-to-sdX.patch b/patches/opnfv-fuel/0006-Set-volume-name-in-source-file-to-sdX.patch new file mode 100644 index 00000000..65d58a78 --- /dev/null +++ b/patches/opnfv-fuel/0006-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/0007-Set-volume-name-in-source-file-to-sdX.patch b/patches/opnfv-fuel/0007-Set-volume-name-in-source-file-to-sdX.patch deleted file mode 100644 index 65d58a78..00000000 --- a/patches/opnfv-fuel/0007-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/0007-curtin-arm64-Fix-missing-newline.patch b/patches/opnfv-fuel/0007-curtin-arm64-Fix-missing-newline.patch new file mode 100644 index 00000000..7d830cc3 --- /dev/null +++ b/patches/opnfv-fuel/0007-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/0008-curtin-arm64-Fix-missing-newline.patch b/patches/opnfv-fuel/0008-curtin-arm64-Fix-missing-newline.patch deleted file mode 100644 index 7d830cc3..00000000 --- a/patches/opnfv-fuel/0008-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