Use enforceStateWithTest for k8s docker installation
- Replace optional:true arg of enforceState with enforceStateWithTest
Change-Id: I89169249b6d884e300b5949f16ebabc7e86165a2
Related-PROD: PROD-26355
diff --git a/src/com/mirantis/mk/Orchestrate.groovy b/src/com/mirantis/mk/Orchestrate.groovy
index 56c5289..419c363 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', optional: true])
+ salt.enforceStateWithTest([saltId: master, target: "I@docker:host ${extra_tgt}", state: 'docker.host'])
// 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', optional: true])
+ salt.enforceStateWithTest([saltId: master, target: "I@docker:host ${extra_tgt}", state: 'docker.host'])
// Install Kubernetes and Calico
salt.enforceState([saltId: master, target: "I@kubernetes:pool and not I@kubernetes:master ${extra_tgt}", state: 'kubernetes.pool'])