summaryrefslogtreecommitdiffstats
path: root/patches/opnfv-fuel/0009-mcp-salt-formulas-armband-AArch64-bootstrap.patch
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-10-19 01:15:15 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-10-18 23:49:18 +0000
commit9ab869c0eb50fde3d8ccdf20bdd86c68995f59db (patch)
treeff9adc21a38de306152a3f05eba2c8b6d60b1130 /patches/opnfv-fuel/0009-mcp-salt-formulas-armband-AArch64-bootstrap.patch
parente459998934a11ddafb62a0b011448b1bf295f370 (diff)
u/fuel: Bump & rebase for PDF-based network config
Change-Id: If970bbc8735d38542a90b2cbdbb2523ae644a29c Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> (cherry picked from commit 7bcfc857535346a72708b1166759e8480e676a38)
Diffstat (limited to 'patches/opnfv-fuel/0009-mcp-salt-formulas-armband-AArch64-bootstrap.patch')
-rw-r--r--patches/opnfv-fuel/0009-mcp-salt-formulas-armband-AArch64-bootstrap.patch90
1 files changed, 90 insertions, 0 deletions
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
new file mode 100644
index 00000000..a9e65337
--- /dev/null
+++ b/patches/opnfv-fuel/0009-mcp-salt-formulas-armband-AArch64-bootstrap.patch
@@ -0,0 +1,90 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+: 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 <Alexandru.Avadanii@enea.com>
+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 <Alexandru.Avadanii@enea.com>
+---
+ 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 fe84222..75386a7 100755
+--- a/mcp/config/states/virtual_control_plane
++++ b/mcp/config/states/virtual_control_plane
+@@ -16,6 +16,7 @@ source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/lib.sh"
+ salt -C 'kvm*' pkg.install bridge-utils
+ salt -C 'kvm*' state.apply linux.network
+ salt -C 'cmp*' state.apply linux.system
++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 <Alexandru.Avadanii@enea.com>
++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 <Alexandru.Avadanii@enea.com>
++---
++
++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__),