Fix of configuration vhost0.
Fixed configuration of contrail bribge vhost0.
Change-Id: Ib48189190f516e55b39aee4e82b1c294b8656b6e
diff --git a/src/com/mirantis/mk/Orchestrate.groovy b/src/com/mirantis/mk/Orchestrate.groovy
index cba61c9..71925bc 100644
--- a/src/com/mirantis/mk/Orchestrate.groovy
+++ b/src/com/mirantis/mk/Orchestrate.groovy
@@ -359,9 +359,20 @@
salt.enforceState(master, 'I@opencontrail:database:id:1', 'opencontrail.client', true)
// Provision opencontrail virtual routers
+ // Generate script /usr/lib/contrail/if-vhost0 for up vhost0
+ try {
+ salt.enforceState(master, 'I@opencontrail:compute', 'opencontrail', true)
+ } catch (Exception e) {
+ common.warningMsg('Exception in state opencontrail on I@opencontrail:compute')
+ }
+
salt.runSaltProcessStep(master, 'I@nova:compute', 'cmd.run', ['exec 0>&-; exec 1>&-; exec 2>&-; nohup bash -c "ip link | grep vhost && echo no_reboot || sleep 5 && reboot & "'], null, true)
- sleep(300)
- salt.enforceState(master, 'I@opencontrail:compute', 'opencontrail.client', true)
+
+ if (salt.testTarget(master, 'I@opencontrail:compute')) {
+ sleep(300)
+ salt.enforceState(master, 'I@opencontrail:compute', 'opencontrail.client', true)
+ salt.enforceState(master, 'I@opencontrail:compute', 'opencontrail', true)
+ }
}
@@ -417,18 +428,6 @@
}
-def installKubernetesContrailCompute(master) {
- def salt = new com.mirantis.mk.Salt()
- // Install opencontrail
- salt.runSaltProcessStep(master, 'I@opencontrail:compute', 'state.sls', ['opencontrail'])
- // Reboot compute nodes
- 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) {
def salt = new com.mirantis.mk.Salt()