Fix k8s install steps
* Fixed step of check etcd cluster status.
* Added exeption block for step of reboot nodes.
Change-Id: I1222efeb8e0dc6c6e42404d6452a28c15412101c
diff --git a/src/com/mirantis/mk/Orchestrate.groovy b/src/com/mirantis/mk/Orchestrate.groovy
index 1c074cc..4fdb5a8 100644
--- a/src/com/mirantis/mk/Orchestrate.groovy
+++ b/src/com/mirantis/mk/Orchestrate.groovy
@@ -262,7 +262,7 @@
// Install etcd
salt.enforceState(master, 'I@etcd:server', 'etcd.server.service')
- salt.runSaltProcessStep(master, 'I@etcd:server', 'cmd.run', ['./var/lib/etcd/configenv && etcdctl cluster-health'])
+ salt.runSaltProcessStep(master, 'I@etcd:server', 'cmd.run', ['source /var/lib/etcd/configenv && etcdctl cluster-health'])
}
@@ -317,7 +317,11 @@
// Install opencontrail
salt.runSaltProcessStep(master, 'I@opencontrail:compute', 'state.sls', ['opencontrail'])
// Reboot compute nodes
- salt.runSaltProcessStep(master, 'I@opencontrail:compute', 'system.reboot')
+ try {
+ salt.runSaltProcessStep(master, 'I@opencontrail:compute', 'system.reboot')
+ } catch (Exception e) {
+ common.warningMsg('Exception in state system.reboot on I@opencontrail:compute')
+ }
}
def installDockerSwarm(master) {