Enforce docker states only if target exists
Change-Id: I021e3f422cfb94985bed22c507ceaac07018af0a
Related-PROD: PROD-26355
(cherry picked from commit 1237e176a89def355a25e2644865f2871e334f73)
diff --git a/src/com/mirantis/mk/Orchestrate.groovy b/src/com/mirantis/mk/Orchestrate.groovy
index 0311411..56c5289 100644
--- a/src/com/mirantis/mk/Orchestrate.groovy
+++ b/src/com/mirantis/mk/Orchestrate.groovy
@@ -608,7 +608,7 @@
salt.enforceState([saltId: master, target: "I@kubernetes:master ${extra_tgt}", state: 'salt.minion.cert'])
// Install docker
- salt.enforceState([saltId: master, target: "I@docker:host ${extra_tgt}", state: 'docker.host'])
+ salt.enforceState([saltId: master, target: "I@docker:host ${extra_tgt}", state: 'docker.host', optional: true])
// If network engine is not opencontrail, run addons state for kubernetes
if (!salt.getPillar(master, "I@kubernetes:master ${extra_tgt}", 'kubernetes:master:network:opencontrail:enabled')) {
@@ -662,7 +662,7 @@
salt.enforceState([saltId: master, target: "I@kubernetes:pool and not I@kubernetes:master ${extra_tgt}", state: 'salt.minion.cert'])
// Install docker
- salt.enforceState([saltId: master, target: "I@docker:host ${extra_tgt}", state: 'docker.host'])
+ salt.enforceState([saltId: master, target: "I@docker:host ${extra_tgt}", state: 'docker.host', optional: true])
// Install Kubernetes and Calico
salt.enforceState([saltId: master, target: "I@kubernetes:pool and not I@kubernetes:master ${extra_tgt}", state: 'kubernetes.pool'])