summaryrefslogtreecommitdiffstats
path: root/mcp/config
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-08-22 22:04:28 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-08-23 04:43:32 +0200
commit4497ce6b74f1ca08b7f2d9c785fa7b4b0a6831a0 (patch)
tree81004b3df0170871c986312033275560d90e091c /mcp/config
parentf021e694f6cae29d245f8455daad8d608d6af1ae (diff)
states/maas: Add mcp.rsa.pub to authorized_keys
Add our mcp.rsa.pub RSA key to all nodes, including VCP VMs. This is required for functest to be able to fetch openrc. While at it, add retry wrappers for more VCP VM state.sls calls. Change-Id: I34f79848c52e36de8d981055880321a081420874 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> Signed-off-by: Guillermo Herrero <Guillermo.Herrero@enea.com>
Diffstat (limited to 'mcp/config')
-rwxr-xr-xmcp/config/states/maas5
1 files changed, 4 insertions, 1 deletions
diff --git a/mcp/config/states/maas b/mcp/config/states/maas
index 52a9b7731..fecd991c1 100755
--- a/mcp/config/states/maas
+++ b/mcp/config/states/maas
@@ -69,6 +69,9 @@ while [ $rc -ne 0 ]; do
sleep 5
done
-salt -C '* and not cfg01* and not mas01*' saltutil.sync_all
+wait_for "salt -C '* and not cfg01* and not mas01*' ssh.set_auth_key ${SUDO_USER} \
+ $(awk 'NR==1{print $2}' $(eval echo ~${SUDO_USER}/.ssh/authorized_keys))"
+
+wait_for "salt -C '* and not cfg01* and not mas01*' saltutil.sync_all"
salt -C '* and not cfg01* and not mas01*' state.apply salt
wait_for "salt -C '* and not cfg01* and not mas01*' state.apply linux,ntp"