From d8dd9847b7a534b3c78af1b3eb772f07a3543d0c Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Sun, 19 Nov 2017 02:13:08 +0100 Subject: u/fuel: Bump & rebase for new deploy arg `-E` Slight refactor of Armband high states, combine all parts touching salt minion into a single `armband.salt_minion` state. Also bring in support for NVRAM-backed domain undefine via `virt.purge` by passing down the proper flag to libvirt. While at it, squash mcp/patches touching the same lines of code in <_modules/seedng.py>, so deploys using `-f` do not fail at the patch stage (due to conflicting patch lines, checking for `patch -R` does not work as expected). Change-Id: Iefca061e641854d28bd8576f2b4547c87c239e32 Signed-off-by: Alexandru Avadanii --- ...lt-formulas-armband-Extend-libvirt_domain.patch | 142 +++++++++++++++------ ...p-salt-formulas-armband-AArch64-bootstrap.patch | 90 ------------- .../0009-seedng-module-Add-AArch64-repo.patch | 57 +++++++++ ...0-aarch64-skip-configuration-of-hugepages.patch | 36 ++++++ .../0010-seedng-module-Add-AArch64-repo.patch | 59 --------- ...1-aarch64-skip-configuration-of-hugepages.patch | 36 ------ ...tal-virtual-Extend-arch-list-for-UCA-repo.patch | 88 +++++++++++++ .../0012-Add-opnfv-user-to-the-deployment.patch | 67 ++++++++++ ...tal-virtual-Extend-arch-list-for-UCA-repo.patch | 88 ------------- .../0013-Add-opnfv-user-to-the-deployment.patch | 67 ---------- ...emetal-linux-image-generic-hwe-16.04-edge.patch | 62 +++++++++ ...emetal-linux-image-generic-hwe-16.04-edge.patch | 62 --------- 12 files changed, 416 insertions(+), 438 deletions(-) delete mode 100644 patches/opnfv-fuel/0009-mcp-salt-formulas-armband-AArch64-bootstrap.patch create mode 100644 patches/opnfv-fuel/0009-seedng-module-Add-AArch64-repo.patch create mode 100644 patches/opnfv-fuel/0010-aarch64-skip-configuration-of-hugepages.patch delete mode 100644 patches/opnfv-fuel/0010-seedng-module-Add-AArch64-repo.patch delete mode 100644 patches/opnfv-fuel/0011-aarch64-skip-configuration-of-hugepages.patch create mode 100644 patches/opnfv-fuel/0011-baremetal-virtual-Extend-arch-list-for-UCA-repo.patch create mode 100644 patches/opnfv-fuel/0012-Add-opnfv-user-to-the-deployment.patch delete mode 100644 patches/opnfv-fuel/0012-baremetal-virtual-Extend-arch-list-for-UCA-repo.patch delete mode 100644 patches/opnfv-fuel/0013-Add-opnfv-user-to-the-deployment.patch create mode 100644 patches/opnfv-fuel/0013-baremetal-linux-image-generic-hwe-16.04-edge.patch delete mode 100644 patches/opnfv-fuel/0014-baremetal-linux-image-generic-hwe-16.04-edge.patch diff --git a/patches/opnfv-fuel/0007-mcp-salt-formulas-armband-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0007-mcp-salt-formulas-armband-Extend-libvirt_domain.patch index a7144f08..1ea8f5af 100644 --- a/patches/opnfv-fuel/0007-mcp-salt-formulas-armband-Extend-libvirt_domain.patch +++ b/patches/opnfv-fuel/0007-mcp-salt-formulas-armband-Extend-libvirt_domain.patch @@ -10,42 +10,85 @@ 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; +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`. -These will later be leveraged via salt virt formula with AArch64 -specific values. +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/virtual_control_plane | 1 + - .../armband/files/libvirt_domain.jinja.diff | 46 ++++++++++++++++++++++ - .../armband/libvirt_domain_template.sls | 4 ++ - 3 files changed, 51 insertions(+) - create mode 100644 mcp/salt-formulas/armband/files/libvirt_domain.jinja.diff - create mode 100644 mcp/salt-formulas/armband/libvirt_domain_template.sls + mcp/config/states/virtual_control_plane | 1 + + .../armband/files/salt-minion-aarch64-rollup.diff | 101 +++++++++++++++++++++ + mcp/salt-formulas/armband/salt_minion.sls | 7 ++ + 3 files changed, 109 insertions(+) + create mode 100644 mcp/salt-formulas/armband/files/salt-minion-aarch64-rollup.diff + create mode 100644 mcp/salt-formulas/armband/salt_minion.sls diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane -index 99fb517..abf46ce 100755 +index 99fb517..88a4488 100755 --- a/mcp/config/states/virtual_control_plane +++ b/mcp/config/states/virtual_control_plane -@@ -47,6 +47,7 @@ wait_for 90 "! salt -C 'kvm* or cmp*' test.ping | " \ - salt -C '* and not cfg01* and not mas01*' state.apply linux,ntp - - salt -C 'kvm*' state.sls armband || true -+salt -C 'kvm*' state.sls armband.libvirt_domain_template || true - wait_for 5 "salt -C 'kvm*' state.sls libvirt" - - salt -C '* and not cfg01* and not mas01*' state.apply salt -diff --git a/mcp/salt-formulas/armband/files/libvirt_domain.jinja.diff b/mcp/salt-formulas/armband/files/libvirt_domain.jinja.diff +@@ -40,6 +40,7 @@ salt -C 'kvm*' pkg.install bridge-utils + salt -C 'kvm*' state.apply linux.network + salt -C 'cmp*' state.apply linux.system + salt -C 'cmp*' state.apply linux.network || true ++salt -C 'kvm*' state.apply armband.salt_minion || true + salt -C 'kvm* or cmp*' system.reboot + wait_for 90 "! salt -C 'kvm* or cmp*' test.ping | " \ + "tee /dev/stderr | grep -Fq 'Not connected'" +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 0000000..4e7fad5 +index 0000000..9e74c24 --- /dev/null -+++ b/mcp/salt-formulas/armband/files/libvirt_domain.jinja.diff -@@ -0,0 +1,46 @@ ++++ 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 @@ -66,9 +109,9 @@ index 0000000..4e7fad5 +Signed-off-by: Alexandru Avadanii +--- + -+diff --git a/usr/lib/python2.7/dist-packages/salt/templates/virt/libvirt_domain.jinja b/usr/lib/python2.7/dist-packages/salt/templates/virt/libvirt_domain.jinja -+--- a/usr/lib/python2.7/dist-packages/salt/templates/virt/libvirt_domain.jinja -++++ b/usr/lib/python2.7/dist-packages/salt/templates/virt/libvirt_domain.jinja ++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 }} @@ -92,13 +135,40 @@ index 0000000..4e7fad5 + + {% for diskname, disk in disks.items() %} + -diff --git a/mcp/salt-formulas/armband/libvirt_domain_template.sls b/mcp/salt-formulas/armband/libvirt_domain_template.sls ++-- ++ ++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 0000000..7cc8e22 +index 0000000..9cce636 --- /dev/null -+++ b/mcp/salt-formulas/armband/libvirt_domain_template.sls -@@ -0,0 +1,4 @@ -+/usr/lib/python2.7/dist-packages/salt/templates/virt/libvirt_domain.jinja: ++++ b/mcp/salt-formulas/armband/salt_minion.sls +@@ -0,0 +1,7 @@ ++salt-minion-aarch64-rollup: + file.patch: -+ - source: salt://armband/files/libvirt_domain.jinja.diff -+ - hash: "9d02cd8aa04497c2d75c72840a5c6c41" ++ - 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 /var/cache/salt/minion/files/base/armband/files/salt-minion-aarch64-rollup.diff' diff --git a/patches/opnfv-fuel/0009-mcp-salt-formulas-armband-AArch64-bootstrap.patch b/patches/opnfv-fuel/0009-mcp-salt-formulas-armband-AArch64-bootstrap.patch deleted file mode 100644 index cdc988ff..00000000 --- a/patches/opnfv-fuel/0009-mcp-salt-formulas-armband-AArch64-bootstrap.patch +++ /dev/null @@ -1,90 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii -Date: Mon, 21 Aug 2017 20:53:03 +0200 -Subject: [PATCH] mcp: salt-formulas: armband: 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/virtual_control_plane | 1 + - .../armband/bootstrap_script_arm64.sls | 4 +++ - mcp/salt-formulas/armband/files/cloud.py.diff | 29 ++++++++++++++++++++++ - 3 files changed, 34 insertions(+) - create mode 100644 mcp/salt-formulas/armband/bootstrap_script_arm64.sls - create mode 100644 mcp/salt-formulas/armband/files/cloud.py.diff - -diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane -index abf46ce..1657d3c 100755 ---- a/mcp/config/states/virtual_control_plane -+++ b/mcp/config/states/virtual_control_plane -@@ -40,6 +40,7 @@ salt -C 'kvm*' pkg.install bridge-utils - salt -C 'kvm*' state.apply linux.network - salt -C 'cmp*' state.apply linux.system - salt -C 'cmp*' state.apply linux.network || true -+salt -C 'kvm*' state.apply armband.bootstrap_script_arm64 || true - salt -C 'kvm* or cmp*' system.reboot - wait_for 90 "! salt -C 'kvm* or cmp*' test.ping | " \ - "tee /dev/stderr | grep -Fq 'Not connected'" -diff --git a/mcp/salt-formulas/armband/bootstrap_script_arm64.sls b/mcp/salt-formulas/armband/bootstrap_script_arm64.sls -new file mode 100644 -index 0000000..845dedd ---- /dev/null -+++ b/mcp/salt-formulas/armband/bootstrap_script_arm64.sls -@@ -0,0 +1,4 @@ -+/usr/lib/python2.7/dist-packages/salt/utils/cloud.py: -+ file.patch: -+ - source: salt://armband/files/cloud.py.diff -+ - hash: "ecd450b187156c1f6a91ea272fd668b0" -diff --git a/mcp/salt-formulas/armband/files/cloud.py.diff b/mcp/salt-formulas/armband/files/cloud.py.diff -new file mode 100644 -index 0000000..75c3281 ---- /dev/null -+++ b/mcp/salt-formulas/armband/files/cloud.py.diff -@@ -0,0 +1,29 @@ -+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//usr/lib/python2.7/dist-packages/salt/utils/cloud.py b//usr/lib/python2.7/dist-packages/salt/utils/cloud.py -+--- a//usr/lib/python2.7/dist-packages/salt/utils/cloud.py -++++ b//usr/lib/python2.7/dist-packages/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__), diff --git a/patches/opnfv-fuel/0009-seedng-module-Add-AArch64-repo.patch b/patches/opnfv-fuel/0009-seedng-module-Add-AArch64-repo.patch new file mode 100644 index 00000000..86a57386 --- /dev/null +++ b/patches/opnfv-fuel/0009-seedng-module-Add-AArch64-repo.patch @@ -0,0 +1,57 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2017 Enea AB and others. +: +: All rights reserved. This program and the accompanying materials +: are made available under the terms of the Apache License, Version 2.0 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Alexandru Avadanii +Date: Mon, 21 Aug 2017 20:42:00 +0200 +Subject: [PATCH] seedng: module: Add AArch64 repo + +salt custom py module seedng.py should use custom repo arg +"-R linux.enea.com/saltstack" on AArch64 nodes. + +Signed-off-by: Alexandru Avadanii +--- + mcp/patches/0009-seedng-module-Sync-salt-version.patch | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/mcp/patches/0009-seedng-module-Sync-salt-version.patch b/mcp/patches/0009-seedng-module-Sync-salt-version.patch +index d116c81..20233a9 100644 +--- a/mcp/patches/0009-seedng-module-Sync-salt-version.patch ++++ b/mcp/patches/0009-seedng-module-Sync-salt-version.patch +@@ -8,23 +8,29 @@ + :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + From: Alexandru Avadanii + Date: Mon, 21 Aug 2017 02:03:01 +0200 +-Subject: [PATCH] seedng: module: Sync salt version ++Subject: [PATCH] seedng: module: Sync salt version, AArch64 repo + + salt custom py module seedng.py should use the same Salt version + when preinstalling minion for salt-controlled VMs via bootstrap + script. + ++While at it, add AArch64 repo. This used to be a separate patch, but ++we'll squash it in, so reverse-apply checks still work: ++- salt custom py module seedng.py should use custom repo arg ++ "-R linux.enea.com/saltstack" on AArch64 nodes. ++ + Signed-off-by: Alexandru Avadanii + --- + + diff --git a/_modules/seedng.py b/_modules/seedng.py + --- a/_modules/seedng.py + +++ b/_modules/seedng.py +-@@ -256,8 +256,10 @@ ++@@ -256,8 +256,11 @@ + boot_, tmppath = (prep_bootstrap(mpt) + or salt.syspaths.BOOTSTRAP) + # Exec the chroot command +-+ arg = 'stable {0}'.format('.'.join(salt.version.__version__.split('.')[:2])) +++ arg = '-R linux.enea.com/saltstack ' if os.uname()[-1] == 'aarch64' else '' +++ arg += 'stable {0}'.format('.'.join(salt.version.__version__.split('.')[:2])) + cmd = 'if type salt-minion; then exit 0; ' + - cmd += 'else sh {0} -c /tmp; fi'.format(os.path.join(tmppath, 'bootstrap-salt.sh')) + + cmd += 'else sh {0} -c /tmp {1}; fi'.format( diff --git a/patches/opnfv-fuel/0010-aarch64-skip-configuration-of-hugepages.patch b/patches/opnfv-fuel/0010-aarch64-skip-configuration-of-hugepages.patch new file mode 100644 index 00000000..7aef2328 --- /dev/null +++ b/patches/opnfv-fuel/0010-aarch64-skip-configuration-of-hugepages.patch @@ -0,0 +1,36 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2017 Enea AB and others. +: +: All rights reserved. This program and the accompanying materials +: are made available under the terms of the Apache License, Version 2.0 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Charalampos Kominos +Date: Thu, 24 Aug 2017 19:28:14 +0200 +Subject: [PATCH] aarch64: skip configuration of hugepages + +The reclass model contains instructions on how to setup nova.conf. +Those instructions need to be overwritten for ARM. + +Signed-off-by: Guillermo Herrero +Signed-off-by: Charalampos Kominos +--- + .../classes/cluster/baremetal-mcp-ocata-common/openstack_compute.yml | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/openstack_compute.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/openstack_compute.yml +index a78850f..ce67588 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/openstack_compute.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/openstack_compute.yml +@@ -12,8 +12,8 @@ classes: + - system.linux.storage.loopback + - system.glusterfs.client.cluster + - system.nova.compute.cluster +- - system.nova.compute.nfv.hugepages +- - system.nova.compute.nfv.cpu_pinning ++ # - system.nova.compute.nfv.hugepages ++ # - system.nova.compute.nfv.cpu_pinning + - system.neutron.gateway.cluster + - system.cinder.volume.single + - system.cinder.volume.backend.lvm diff --git a/patches/opnfv-fuel/0010-seedng-module-Add-AArch64-repo.patch b/patches/opnfv-fuel/0010-seedng-module-Add-AArch64-repo.patch deleted file mode 100644 index c865f078..00000000 --- a/patches/opnfv-fuel/0010-seedng-module-Add-AArch64-repo.patch +++ /dev/null @@ -1,59 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii -Date: Mon, 21 Aug 2017 20:42:00 +0200 -Subject: [PATCH] seedng: module: Add AArch64 repo - -salt custom py module seedng.py should use custom repo arg -"-R linux.enea.com/saltstack" on AArch64 nodes. - -Signed-off-by: Alexandru Avadanii ---- - .../0105-seedng-module-Add-AArch64-repo.patch | 22 ++++++++++++++++++++++ - mcp/patches/patches.list | 1 + - 2 files changed, 23 insertions(+) - create mode 100644 mcp/patches/0105-seedng-module-Add-AArch64-repo.patch - -diff --git a/mcp/patches/0105-seedng-module-Add-AArch64-repo.patch b/mcp/patches/0105-seedng-module-Add-AArch64-repo.patch -new file mode 100644 -index 0000000..d40e63b ---- /dev/null -+++ b/mcp/patches/0105-seedng-module-Add-AArch64-repo.patch -@@ -0,0 +1,22 @@ -+From: Alexandru Avadanii -+Date: Mon, 21 Aug 2017 02:03:01 +0200 -+Subject: [PATCH] seedng: module: Add AArch64 repo -+ -+salt custom py module seedng.py should use custom repo arg -+"-R linux.enea.com/saltstack" on AArch64 nodes. -+ -+Signed-off-by: Alexandru Avadanii -+--- -+ -+diff --git a/_modules/seedng.py b/_modules/seedng.py -+--- a/_modules/seedng.py -++++ b/_modules/seedng.py -+@@ -257,6 +257,7 @@ -+ or salt.syspaths.BOOTSTRAP) -+ # Exec the chroot command -+- arg = 'stable {0}'.format('.'.join(salt.version.__version__.split('.')[:2])) -++ arg = '-R linux.enea.com/saltstack ' if os.uname()[-1] == 'aarch64' else '' -++ arg += 'stable {0}'.format('.'.join(salt.version.__version__.split('.')[:2])) -+ cmd = 'if type salt-minion; then exit 0; ' -+ cmd += 'else sh {0} -c /tmp {1}; fi'.format( -+ os.path.join(tmppath, 'bootstrap-salt.sh'), arg) -diff --git a/mcp/patches/patches.list b/mcp/patches/patches.list -index e618d57..62e3cc6 100644 ---- a/mcp/patches/patches.list -+++ b/mcp/patches/patches.list -@@ -22,3 +22,4 @@ - /usr/share/salt-formulas/env: 0102-libvirt-unix_sock_group-s-libvirtd-libvirt.patch - /usr/share/salt-formulas/env: 0103-virtng-module-Extend-libvirt_domain.patch - /usr/share/salt-formulas/env: 0104-salt-control-virt-Extend-libvirt_domain.patch -+/usr/share/salt-formulas/env: 0105-seedng-module-Add-AArch64-repo.patch diff --git a/patches/opnfv-fuel/0011-aarch64-skip-configuration-of-hugepages.patch b/patches/opnfv-fuel/0011-aarch64-skip-configuration-of-hugepages.patch deleted file mode 100644 index 7aef2328..00000000 --- a/patches/opnfv-fuel/0011-aarch64-skip-configuration-of-hugepages.patch +++ /dev/null @@ -1,36 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Charalampos Kominos -Date: Thu, 24 Aug 2017 19:28:14 +0200 -Subject: [PATCH] aarch64: skip configuration of hugepages - -The reclass model contains instructions on how to setup nova.conf. -Those instructions need to be overwritten for ARM. - -Signed-off-by: Guillermo Herrero -Signed-off-by: Charalampos Kominos ---- - .../classes/cluster/baremetal-mcp-ocata-common/openstack_compute.yml | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/openstack_compute.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/openstack_compute.yml -index a78850f..ce67588 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/openstack_compute.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/openstack_compute.yml -@@ -12,8 +12,8 @@ classes: - - system.linux.storage.loopback - - system.glusterfs.client.cluster - - system.nova.compute.cluster -- - system.nova.compute.nfv.hugepages -- - system.nova.compute.nfv.cpu_pinning -+ # - system.nova.compute.nfv.hugepages -+ # - system.nova.compute.nfv.cpu_pinning - - system.neutron.gateway.cluster - - system.cinder.volume.single - - system.cinder.volume.backend.lvm diff --git a/patches/opnfv-fuel/0011-baremetal-virtual-Extend-arch-list-for-UCA-repo.patch b/patches/opnfv-fuel/0011-baremetal-virtual-Extend-arch-list-for-UCA-repo.patch new file mode 100644 index 00000000..3bc5d324 --- /dev/null +++ b/patches/opnfv-fuel/0011-baremetal-virtual-Extend-arch-list-for-UCA-repo.patch @@ -0,0 +1,88 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2017 Enea AB and others. +: +: All rights reserved. This program and the accompanying materials +: are made available under the terms of the Apache License, Version 2.0 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Alexandru Avadanii +Date: Wed, 30 Aug 2017 22:15:07 +0200 +Subject: [PATCH] baremetal, virtual: Extend arch list for UCA repo + +JIRA: https://jira.opnfv.org/browse/ARMBAND-304 + +Signed-off-by: Alexandru Avadanii +--- + .../classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml | 2 +- + .../cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/compute.yml | 2 +- + .../classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/init.yml | 2 +- + .../classes/cluster/virtual-mcp-ocata-common/openstack_compute.yml | 2 +- + .../classes/cluster/virtual-mcp-ocata-odl-router/openstack/init.yml | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml +index 9a04c84..80e5bb7 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml +@@ -27,7 +27,7 @@ parameters: + repo: + uca: + source: "deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/ocata main" +- architectures: amd64 ++ architectures: amd64,arm64 + key_id: EC4926EA + key_server: keyserver.ubuntu.com + kernel: +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/compute.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/compute.yml +index aa6b4e3..5b6752e 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/compute.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/compute.yml +@@ -25,7 +25,7 @@ parameters: + repo: + uca: + source: "deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/ocata main" +- architectures: amd64 ++ architectures: amd64,arm64 + key_id: EC4926EA + key_server: keyserver.ubuntu.com + network: +diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/init.yml +index 5e855ac..2392cf0 100644 +--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/init.yml ++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/init.yml +@@ -27,7 +27,7 @@ parameters: + repo: + uca: + source: "deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/ocata main" +- architectures: amd64 ++ architectures: amd64,arm64 + key_id: EC4926EA + key_server: keyserver.ubuntu.com + kernel: +diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_compute.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_compute.yml +index ad06754..d4e1c40 100644 +--- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_compute.yml ++++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_compute.yml +@@ -65,7 +65,7 @@ parameters: + repo: + uca: + source: "deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/ocata main" +- architectures: amd64 ++ architectures: amd64,arm64 + key_id: EC4926EA + key_server: keyserver.ubuntu.com + kernel: +diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/openstack/init.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/openstack/init.yml +index 5be63e5..1cfd5a3 100644 +--- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/openstack/init.yml ++++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/openstack/init.yml +@@ -17,7 +17,7 @@ parameters: + repo: + uca: + source: "deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/ocata main" +- architectures: amd64 ++ architectures: amd64,arm64 + key_id: EC4926EA + key_server: keyserver.ubuntu.com + network: diff --git a/patches/opnfv-fuel/0012-Add-opnfv-user-to-the-deployment.patch b/patches/opnfv-fuel/0012-Add-opnfv-user-to-the-deployment.patch new file mode 100644 index 00000000..42fba2e0 --- /dev/null +++ b/patches/opnfv-fuel/0012-Add-opnfv-user-to-the-deployment.patch @@ -0,0 +1,67 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2017 Enea AB and others. +: +: All rights reserved. This program and the accompanying materials +: are made available under the terms of the Apache License, Version 2.0 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: 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/virtual_control_plane | 2 ++ + mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/init.yml | 4 ++++ + mcp/salt-formulas/opnfv/adduser.sls | 7 +++++++ + 3 files changed, 13 insertions(+) + create mode 100644 mcp/salt-formulas/opnfv/adduser.sls + +diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane +index 88a4488..298a9de 100755 +--- a/mcp/config/states/virtual_control_plane ++++ b/mcp/config/states/virtual_control_plane +@@ -37,6 +37,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 '*' state.apply opnfv.adduser + salt -C 'kvm*' state.apply linux.network + salt -C 'cmp*' state.apply linux.system + salt -C 'cmp*' state.apply linux.network || true +@@ -66,6 +67,7 @@ while [ $rc -ne 0 ] && [ ${attempt} -lt ${total_attempts} ]; do + rc=0 + for node in $vcp_nodes; do + salt "$node" test.ping 2>/dev/null || { rc=$?; break; }; ++ salt -C "$node" state.apply opnfv.adduser + done + sleep 5 + ((attempt+=1)) +diff --git a/mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/init.yml b/mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/init.yml +index aa780e6..e4069c0 100644 +--- a/mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/init.yml ++++ b/mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/init.yml +@@ -9,3 +9,7 @@ + classes: + - cluster.all-mcp-ocata-common.opnfv.runtime + - cluster.all-mcp-ocata-common.opnfv.pod_config ++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 0000000..78ef993 +--- /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/0012-baremetal-virtual-Extend-arch-list-for-UCA-repo.patch b/patches/opnfv-fuel/0012-baremetal-virtual-Extend-arch-list-for-UCA-repo.patch deleted file mode 100644 index 3bc5d324..00000000 --- a/patches/opnfv-fuel/0012-baremetal-virtual-Extend-arch-list-for-UCA-repo.patch +++ /dev/null @@ -1,88 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii -Date: Wed, 30 Aug 2017 22:15:07 +0200 -Subject: [PATCH] baremetal, virtual: Extend arch list for UCA repo - -JIRA: https://jira.opnfv.org/browse/ARMBAND-304 - -Signed-off-by: Alexandru Avadanii ---- - .../classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml | 2 +- - .../cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/compute.yml | 2 +- - .../classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/init.yml | 2 +- - .../classes/cluster/virtual-mcp-ocata-common/openstack_compute.yml | 2 +- - .../classes/cluster/virtual-mcp-ocata-odl-router/openstack/init.yml | 2 +- - 5 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml -index 9a04c84..80e5bb7 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/openstack/init.yml -@@ -27,7 +27,7 @@ parameters: - repo: - uca: - source: "deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/ocata main" -- architectures: amd64 -+ architectures: amd64,arm64 - key_id: EC4926EA - key_server: keyserver.ubuntu.com - kernel: -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/compute.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/compute.yml -index aa6b4e3..5b6752e 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/compute.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/compute.yml -@@ -25,7 +25,7 @@ parameters: - repo: - uca: - source: "deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/ocata main" -- architectures: amd64 -+ architectures: amd64,arm64 - key_id: EC4926EA - key_server: keyserver.ubuntu.com - network: -diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/init.yml -index 5e855ac..2392cf0 100644 ---- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/init.yml -+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-dpdk-ha/openstack/init.yml -@@ -27,7 +27,7 @@ parameters: - repo: - uca: - source: "deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/ocata main" -- architectures: amd64 -+ architectures: amd64,arm64 - key_id: EC4926EA - key_server: keyserver.ubuntu.com - kernel: -diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_compute.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_compute.yml -index ad06754..d4e1c40 100644 ---- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_compute.yml -+++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-common/openstack_compute.yml -@@ -65,7 +65,7 @@ parameters: - repo: - uca: - source: "deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/ocata main" -- architectures: amd64 -+ architectures: amd64,arm64 - key_id: EC4926EA - key_server: keyserver.ubuntu.com - kernel: -diff --git a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/openstack/init.yml b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/openstack/init.yml -index 5be63e5..1cfd5a3 100644 ---- a/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/openstack/init.yml -+++ b/mcp/reclass/classes/cluster/virtual-mcp-ocata-odl-router/openstack/init.yml -@@ -17,7 +17,7 @@ parameters: - repo: - uca: - source: "deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/ocata main" -- architectures: amd64 -+ architectures: amd64,arm64 - key_id: EC4926EA - key_server: keyserver.ubuntu.com - network: diff --git a/patches/opnfv-fuel/0013-Add-opnfv-user-to-the-deployment.patch b/patches/opnfv-fuel/0013-Add-opnfv-user-to-the-deployment.patch deleted file mode 100644 index 7c58ec3d..00000000 --- a/patches/opnfv-fuel/0013-Add-opnfv-user-to-the-deployment.patch +++ /dev/null @@ -1,67 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: 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/virtual_control_plane | 2 ++ - mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/init.yml | 4 ++++ - mcp/salt-formulas/opnfv/adduser.sls | 7 +++++++ - 3 files changed, 13 insertions(+) - create mode 100644 mcp/salt-formulas/opnfv/adduser.sls - -diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane -index 1657d3c..4b3ec42 100755 ---- a/mcp/config/states/virtual_control_plane -+++ b/mcp/config/states/virtual_control_plane -@@ -37,6 +37,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 '*' state.apply opnfv.adduser - salt -C 'kvm*' state.apply linux.network - salt -C 'cmp*' state.apply linux.system - salt -C 'cmp*' state.apply linux.network || true -@@ -67,6 +68,7 @@ while [ $rc -ne 0 ] && [ ${attempt} -lt ${total_attempts} ]; do - rc=0 - for node in $vcp_nodes; do - salt "$node" test.ping 2>/dev/null || { rc=$?; break; }; -+ salt -C "$node" state.apply opnfv.adduser - done - sleep 5 - ((attempt+=1)) -diff --git a/mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/init.yml b/mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/init.yml -index aa780e6..e4069c0 100644 ---- a/mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/init.yml -+++ b/mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/init.yml -@@ -9,3 +9,7 @@ - classes: - - cluster.all-mcp-ocata-common.opnfv.runtime - - cluster.all-mcp-ocata-common.opnfv.pod_config -+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 0000000..78ef993 ---- /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/0013-baremetal-linux-image-generic-hwe-16.04-edge.patch b/patches/opnfv-fuel/0013-baremetal-linux-image-generic-hwe-16.04-edge.patch new file mode 100644 index 00000000..58718995 --- /dev/null +++ b/patches/opnfv-fuel/0013-baremetal-linux-image-generic-hwe-16.04-edge.patch @@ -0,0 +1,62 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: Copyright (c) 2017 Enea AB and others. +: +: All rights reserved. This program and the accompanying materials +: are made available under the terms of the Apache License, Version 2.0 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Alexandru Avadanii +Date: Sun, 5 Nov 2017 21:02:17 +0100 +Subject: [PATCH] baremetal: linux-image-generic-hwe-16.04-edge + +The Salt way to pin the kernel version is via its reclass model, by +defining system.kernel.version. However, this only works with +explicit kernel package names and not with meta package names +(e.g. linux-image-4.13.0-9916-generic is expected instead of + linux-image-generic-hwe-16.04-edge, which would break the +`linux_kernel_old_absent` state). + +For now, let's explicitly call `pkg.install` for the kernel and +headers packages, using the meta package name to ensure automatic +fallback to Ubuntu packages if Armband repos are missing, +respectively to automatically pick up new kernel package names +in case of meta + kernel packages bump later. + +JIRA: ARMBAND-280 +JIRA: ARMBAND-330 + +Signed-off-by: Alexandru Avadanii +--- + mcp/config/states/virtual_control_plane | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane +index 298a9de..c07d342 100755 +--- a/mcp/config/states/virtual_control_plane ++++ b/mcp/config/states/virtual_control_plane +@@ -39,9 +39,12 @@ salt -C 'kvm* or cmp*' file.replace $debian_ip_source \ + salt -C 'kvm*' pkg.install bridge-utils + salt -C '*' state.apply opnfv.adduser + salt -C 'kvm*' state.apply linux.network +-salt -C 'cmp*' state.apply linux.system ++salt -C 'kvm* or cmp*' state.apply linux.system + salt -C 'cmp*' state.apply linux.network || true + salt -C 'kvm*' state.apply armband.salt_minion || true ++# NOTE(armband): Should be later moved to reclass as system.kernel.version ++salt -C 'kvm* or cmp*' pkg.install \ ++ linux-image-generic-hwe-16.04-edge,linux-headers-generic-hwe-16.04-edge + salt -C 'kvm* or cmp*' system.reboot + wait_for 90 "! salt -C 'kvm* or cmp*' test.ping | " \ + "tee /dev/stderr | grep -Fq 'Not connected'" +@@ -84,3 +87,10 @@ wait_for 10 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' ssh.set_auth_key ${SUDO_US + # Disable proxy dhcp routes after installation + salt -C 'prx*' file.write /etc/dhcp/dhclient-enter-hooks.d/no-default-route \ + args='unset new_routers' ++ ++# NOTE(armband): Should be later moved to reclass as system.kernel.version ++salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' pkg.install \ ++ linux-image-generic-hwe-16.04-edge,linux-headers-generic-hwe-16.04-edge ++salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' system.reboot ++wait_for 90 "! salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' test.ping | " \ ++ "tee /dev/stderr | grep -Fq 'Not connected'" diff --git a/patches/opnfv-fuel/0014-baremetal-linux-image-generic-hwe-16.04-edge.patch b/patches/opnfv-fuel/0014-baremetal-linux-image-generic-hwe-16.04-edge.patch deleted file mode 100644 index 9ba9a67a..00000000 --- a/patches/opnfv-fuel/0014-baremetal-linux-image-generic-hwe-16.04-edge.patch +++ /dev/null @@ -1,62 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii -Date: Sun, 5 Nov 2017 21:02:17 +0100 -Subject: [PATCH] baremetal: linux-image-generic-hwe-16.04-edge - -The Salt way to pin the kernel version is via its reclass model, by -defining system.kernel.version. However, this only works with -explicit kernel package names and not with meta package names -(e.g. linux-image-4.13.0-9916-generic is expected instead of - linux-image-generic-hwe-16.04-edge, which would break the -`linux_kernel_old_absent` state). - -For now, let's explicitly call `pkg.install` for the kernel and -headers packages, using the meta package name to ensure automatic -fallback to Ubuntu packages if Armband repos are missing, -respectively to automatically pick up new kernel package names -in case of meta + kernel packages bump later. - -JIRA: ARMBAND-280 -JIRA: ARMBAND-330 - -Signed-off-by: Alexandru Avadanii ---- - mcp/config/states/virtual_control_plane | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane -index 4b3ec42..ad8218e 100755 ---- a/mcp/config/states/virtual_control_plane -+++ b/mcp/config/states/virtual_control_plane -@@ -39,9 +39,12 @@ salt -C 'kvm* or cmp*' file.replace $debian_ip_source \ - salt -C 'kvm*' pkg.install bridge-utils - salt -C '*' state.apply opnfv.adduser - salt -C 'kvm*' state.apply linux.network --salt -C 'cmp*' state.apply linux.system -+salt -C 'kvm* or cmp*' state.apply linux.system - salt -C 'cmp*' state.apply linux.network || true - salt -C 'kvm*' state.apply armband.bootstrap_script_arm64 || true -+# NOTE(armband): Should be later moved to reclass as system.kernel.version -+salt -C 'kvm* or cmp*' pkg.install \ -+ linux-image-generic-hwe-16.04-edge,linux-headers-generic-hwe-16.04-edge - salt -C 'kvm* or cmp*' system.reboot - wait_for 90 "! salt -C 'kvm* or cmp*' test.ping | " \ - "tee /dev/stderr | grep -Fq 'Not connected'" -@@ -85,3 +88,10 @@ wait_for 10 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' ssh.set_auth_key ${SUDO_US - # Disable proxy dhcp routes after installation - salt -C 'prx*' file.write /etc/dhcp/dhclient-enter-hooks.d/no-default-route \ - args='unset new_routers' -+ -+# NOTE(armband): Should be later moved to reclass as system.kernel.version -+salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' pkg.install \ -+ linux-image-generic-hwe-16.04-edge,linux-headers-generic-hwe-16.04-edge -+salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' system.reboot -+wait_for 90 "! salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' test.ping | " \ -+ "tee /dev/stderr | grep -Fq 'Not connected'" -- cgit 1.2.3-korg