p/fuel: Rebase: openstack_ha upstream sync
[armband.git] / patches / opnfv-fuel / 0018-seedng-module-Add-AArch64-repo.patch
1 From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2 Date: Mon, 21 Aug 2017 20:42:00 +0200
3 Subject: [PATCH] seedng: module: Add AArch64 repo
4
5 salt custom py module seedng.py should use custom repo arg
6 "-R linux.enea.com/saltstack" on AArch64 nodes.
7
8 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
9 ---
10  .../0105-seedng-module-Add-AArch64-repo.patch      | 25 ++++++++++++++++++++++
11  mcp/patches/patches.list                           |  1 +
12  2 files changed, 26 insertions(+)
13  create mode 100644 mcp/patches/0105-seedng-module-Add-AArch64-repo.patch
14
15 diff --git a/mcp/patches/0105-seedng-module-Add-AArch64-repo.patch b/mcp/patches/0105-seedng-module-Add-AArch64-repo.patch
16 new file mode 100644
17 index 0000000..e191421
18 --- /dev/null
19 +++ b/mcp/patches/0105-seedng-module-Add-AArch64-repo.patch
20 @@ -0,0 +1,25 @@
21 +From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
22 +Date: Mon, 21 Aug 2017 02:03:01 +0200
23 +Subject: [PATCH] seedng: module: Add AArch64 repo
24 +
25 +salt custom py module seedng.py should use custom repo arg
26 +"-R linux.enea.com/saltstack" on AArch64 nodes.
27 +
28 +Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
29 +---
30 +
31 +diff --git a/_modules/seedng.py b/_modules/seedng.py
32 +--- a/_modules/seedng.py
33 ++++ b/_modules/seedng.py
34 +@@ -256,8 +256,10 @@
35 +     boot_, tmppath = (prep_bootstrap(mpt)
36 +              or salt.syspaths.BOOTSTRAP)
37 +     # Exec the chroot command
38 ++    cmdR = '-R linux.enea.com/saltstack' if os.uname()[-1] == 'aarch64' else ''
39 +     cmd = 'if type salt-minion; then exit 0; '
40 +-    cmd += 'else sh {0} -c /tmp; fi'.format(os.path.join(tmppath, 'bootstrap-salt.sh'))
41 ++    cmd += 'else sh {0} {1} -c /tmp; fi'.format(
42 ++        os.path.join(tmppath, 'bootstrap-salt.sh'), cmdR)
43 +     return not __salt__['cmd.run_chroot'](mpt, cmd, python_shell=True)['retcode']
44 +
45 +
46 diff --git a/mcp/patches/patches.list b/mcp/patches/patches.list
47 index 67b9c82..b4b2b30 100644
48 --- a/mcp/patches/patches.list
49 +++ b/mcp/patches/patches.list
50 @@ -9,3 +9,4 @@
51  /usr/share/salt-formulas/env: 0102-libvirt-unix_sock_group-s-libvirtd-libvirt.patch
52  /usr/share/salt-formulas/env: 0103-virtng-module-Extend-libvirt_domain.patch
53  /usr/share/salt-formulas/env: 0104-salt-control-virt-Extend-libvirt_domain.patch
54 +/usr/share/salt-formulas/env: 0105-seedng-module-Add-AArch64-repo.patch