Run packages upgrade on openstack nodes only 17/43017/2
authorMichael Polenchuk <mpolenchuk@mirantis.com>
Mon, 25 Sep 2017 09:25:50 +0000 (13:25 +0400)
committerMichael Polenchuk <mpolenchuk@mirantis.com>
Tue, 26 Sep 2017 06:11:02 +0000 (06:11 +0000)
Change-Id: I53ac0be519df1bb39a6a56e236285fce95228bd4
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
(cherry picked from commit c15004f402555df4886b18bba9a837288c6ef250)

mcp/config/states/maas
mcp/scripts/salt.sh

index de9d699..e184e91 100755 (executable)
@@ -115,6 +115,6 @@ wait_for 10 "! salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' state.apply linux,ntp |
 wait_for 10 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' ssh.set_auth_key ${SUDO_USER} \
   $(awk 'NR==1{print $2}' "$(eval echo "~${SUDO_USER}/.ssh/authorized_keys")")"
 
-# Get the latest packages
-wait_for 10 "! salt '*' pkg.upgrade refresh=False | " \
+# Get the latest packages for openstack nodes
+wait_for 10 "! salt -C 'E@^(?!cfg01|mas01|kvm).*' pkg.upgrade refresh=False | " \
   "tee /dev/stderr | fgrep -q 'Not connected'"
index f184bcd..4effa6b 100755 (executable)
@@ -60,8 +60,7 @@ ssh ${SSH_OPTS} "${SSH_SALT}" bash -s << SALT_INSTALL_END
 
   salt -C 'I@salt:master' state.sls linux
   salt -C '* and not cfg01*' state.sls linux
+  salt -C '* and not cfg01*' pkg.upgrade refresh=False
 
   salt '*' state.sls ntp
-
-  salt '*' pkg.upgrade refresh=False
 SALT_INSTALL_END