diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2020-01-28 15:06:25 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2020-01-28 15:06:25 +0000 |
commit | 1f874e5ea342c221b5cf3c9a544020be9a820481 (patch) | |
tree | 4f51619c2ab40869b0e5d33b70cebeeb44fcc851 /mcp/patches/salt-formula-maas | |
parent | 86f501765778cb0b345603ff993ce690be787e58 (diff) | |
parent | 2600894360be0dd0676680e3ced73c4f361a58c0 (diff) |
Merge "all: Pin Ubuntu kernel to 5.0.0-37 for Bionic" into stable/iruya
Diffstat (limited to 'mcp/patches/salt-formula-maas')
-rw-r--r-- | mcp/patches/salt-formula-maas/0006-curtin-Add-Bionic-support.patch | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/mcp/patches/salt-formula-maas/0006-curtin-Add-Bionic-support.patch b/mcp/patches/salt-formula-maas/0006-curtin-Add-Bionic-support.patch index 1f53697ad..a279e019d 100644 --- a/mcp/patches/salt-formula-maas/0006-curtin-Add-Bionic-support.patch +++ b/mcp/patches/salt-formula-maas/0006-curtin-Add-Bionic-support.patch @@ -12,19 +12,19 @@ Subject: [PATCH] curtin: Add Bionic support Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> --- - .../curtin_userdata_amd64_generic_bionic | 80 +++++++++++++++++++ - .../curtin_userdata_arm64_generic_bionic | 65 +++++++++++++++ + .../curtin_userdata_amd64_generic_bionic | 83 +++++++++++++++++++ + .../curtin_userdata_arm64_generic_bionic | 78 +++++++++++++++++ maas/region.sls | 24 ++++++ - 3 files changed, 169 insertions(+) + 3 files changed, 185 insertions(+) create mode 100644 maas/files/curtin_userdata_amd64_generic_bionic create mode 100644 maas/files/curtin_userdata_arm64_generic_bionic diff --git a/maas/files/curtin_userdata_amd64_generic_bionic b/maas/files/curtin_userdata_amd64_generic_bionic new file mode 100644 -index 0000000..0b6fd15 +index 0000000..6b01a58 --- /dev/null +++ b/maas/files/curtin_userdata_amd64_generic_bionic -@@ -0,0 +1,80 @@ +@@ -0,0 +1,83 @@ +{%- from "maas/map.jinja" import cluster with context %} +{%- raw %} +#cloud-config @@ -63,6 +63,9 @@ index 0000000..0b6fd15 + apt_04_install_pkgs_{{ loop.index }}: ["curtin", "in-target", "--", "apt-get", "-y", "install", "{{ pkg }}"] + {% endfor %} +{%- endif %} ++{%- if salt['pillar.get']('maas:cluster:curtin_vars:amd64:bionic:kernel_package:enabled')|default(false) %} ++ apt_05_kernel_old_absent: ["curtin", "in-target", "--", "sh", "-c", "dpkg -l '*linux-generic-*[0-9]*' '*linux-image-*[0-9]*' '*linux-headers-*[0-9]*' '*linux-image-extra-*[0-9]*' '*linux-modules-extra-*[0-9]*' 2>/dev/null | grep -E '^ii' | awk '{print $2}' | grep -v '{{ pillar.maas.cluster.curtin_vars.amd64.bionic.kernel_package.value.split('-')[2:-1] | join('-') }}' | xargs dpkg --purge --force-depends"] ++{%- endif %} + salt_01_install: ["curtin", "in-target", "--", "apt-get", "-y", "install", "salt-minion", "ifupdown", "cloud-init", "dnsmasq"] + salt_02_hostname_set: ["curtin", "in-target", "--", "echo", "{% raw %}{{node.hostname}}{% endraw %}.{{pillar.linux.system.domain}}"] + salt_03_hostname_get: ["curtin", "in-target", "--", "sh", "-c", "echo 'id: {% raw %}{{node.hostname}}{% endraw %}.{{pillar.linux.system.domain}}' >> /etc/salt/minion.d/minion.conf"] @@ -107,10 +110,10 @@ index 0000000..0b6fd15 +#} diff --git a/maas/files/curtin_userdata_arm64_generic_bionic b/maas/files/curtin_userdata_arm64_generic_bionic new file mode 100644 -index 0000000..c7cb997 +index 0000000..54c908c --- /dev/null +++ b/maas/files/curtin_userdata_arm64_generic_bionic -@@ -0,0 +1,65 @@ +@@ -0,0 +1,78 @@ +{%- from "maas/map.jinja" import cluster with context %} +{% raw %} +#cloud-config @@ -143,6 +146,14 @@ index 0000000..c7cb997 +{#- NOTE: Re-use amd64 repos on arm64 since most packages are arch independent #} + apt_01_set_repo: ["curtin", "in-target", "--", "sh", "-c", "echo '{{ saltstack_repo }}' >> /etc/apt/sources.list.d/mcp_saltstack.list"] + apt_03_update: ["curtin", "in-target", "--", "apt-get", "update"] ++{%- if salt['pillar.get']('maas:cluster:curtin_vars:arm64:bionic:extra_pkgs:enabled')|default(false) %} ++ {% for pkg in pillar.maas.cluster.curtin_vars.arm64.bionic.extra_pkgs.pkgs -%} ++ apt_04_install_pkgs_{{ loop.index }}: ["curtin", "in-target", "--", "apt-get", "-y", "install", "{{ pkg }}"] ++ {% endfor %} ++{%- endif %} ++{%- if salt['pillar.get']('maas:cluster:curtin_vars:arm64:bionic:kernel_package:enabled')|default(false) %} ++ apt_05_kernel_old_absent: ["curtin", "in-target", "--", "sh", "-c", "dpkg -l '*linux-generic-*[0-9]*' '*linux-image-*[0-9]*' '*linux-headers-*[0-9]*' '*linux-image-extra-*[0-9]*' '*linux-modules-extra-*[0-9]*' 2>/dev/null | grep -E '^ii' | awk '{print $2}' | grep -v '{{ pillar.maas.cluster.curtin_vars.arm64.bionic.kernel_package.value.split('-')[2:-1] | join('-') }}' | xargs dpkg --purge --force-depends"] ++{%- endif %} + salt_01_install: ["curtin", "in-target", "--", "apt-get", "-y", "install", "salt-minion", "python-futures", "ifupdown", "cloud-init", "dnsmasq"] + salt_02_hostname_set: ["curtin", "in-target", "--", "echo", "{% raw %}{{node.hostname}}{% endraw %}.{{pillar.linux.system.domain}}"] + salt_03_hostname_get: ["curtin", "in-target", "--", "sh", "-c", "echo 'id: {% raw %}{{node.hostname}}{% endraw %}.{{pillar.linux.system.domain}}' >> /etc/salt/minion.d/minion.conf"] @@ -165,6 +176,11 @@ index 0000000..c7cb997 + salt_26_bionic_networking_enable: ["curtin", "in-target", "--", "systemctl", "enable", "networking.service"] + salt_27_bionic_networking_start: ["curtin", "in-target", "--", "systemctl", "start", "networking.service"] + ++{%- if salt['pillar.get']('maas:cluster:curtin_vars:arm64:bionic:kernel_package:enabled')|default(false) %} ++kernel: ++ package: {{ pillar.maas.cluster.curtin_vars.arm64.bionic.kernel_package.value }} ++{%- endif %} ++ +{% raw %} +{{if third_party_drivers and driver}} + driver_00_key_get: curtin in-target -- sh -c "/bin/echo -en '{{key_string}}' > /tmp/maas-{{driver['package']}}.gpg" |