[VCP] Reboot all VCP VMs after network config 59/65759/1
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Wed, 12 Dec 2018 19:37:27 +0000 (20:37 +0100)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Wed, 12 Dec 2018 19:37:27 +0000 (20:37 +0100)
Currently, PXE/admin on VCP nodes still uses MaaS DHCP before
the new network configuration is enforced. A live network
refresh would break minion registration with the Salt master,
so perform a node reboot instead.

Change-Id: I1c25f63f6c98a9fff98108d3fad9550dd4468355
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
mcp/config/states/virtual_control_plane

index 5b54bb8..ffb2c59 100755 (executable)
@@ -58,7 +58,7 @@ wait_for 10.0 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' state.apply linux,ntp"
 wait_for 10.0 "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")")"
 
-salt -C 'prx*' system.reboot
-wait_for 30.0 "salt -C 'prx*' test.ping"
+salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' system.reboot
+wait_for 30.0 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' test.ping"
 
 salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' pkg.upgrade refresh=False dist_upgrade=True