reclass: virtual-mcp-ocata-ovs: Fix yaml typo
[fuel.git] / mcp / patches / 0009-seedng-module-Sync-salt-version.patch
1 From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2 Date: Mon, 21 Aug 2017 02:03:01 +0200
3 Subject: [PATCH] seedng: module: Sync salt version
4
5 salt custom py module seedng.py should use the same Salt version
6 when preinstalling minion for salt-controlled VMs via bootstrap
7 script.
8
9 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
10 ---
11
12 diff --git a/_modules/seedng.py b/_modules/seedng.py
13 --- a/_modules/seedng.py
14 +++ b/_modules/seedng.py
15 @@ -256,8 +256,10 @@
16      boot_, tmppath = (prep_bootstrap(mpt)
17               or salt.syspaths.BOOTSTRAP)
18      # Exec the chroot command
19 +    arg = 'stable {0}'.format('.'.join(salt.version.__version__.split('.')[:2]))
20      cmd = 'if type salt-minion; then exit 0; '
21 -    cmd += 'else sh {0} -c /tmp; fi'.format(os.path.join(tmppath, 'bootstrap-salt.sh'))
22 +    cmd += 'else sh {0} {1} -c /tmp; fi'.format(
23 +        os.path.join(tmppath, 'bootstrap-salt.sh'), arg)
24      return not __salt__['cmd.run_chroot'](mpt, cmd, python_shell=True)['retcode']
25
26