Try to workaround issue with node loosing leader status

Change-Id: I6c0769674e1d18ea3b59c4e9eabb947a3f8f7070
diff --git a/cicd-lab-pipeline.groovy b/cicd-lab-pipeline.groovy
index 08b21eb..e538c83 100644
--- a/cicd-lab-pipeline.groovy
+++ b/cicd-lab-pipeline.groovy
@@ -140,6 +140,13 @@
                 salt.runSaltProcessStep(saltMaster, 'I@docker:swarm:role:master', 'mine.flush')
                 salt.runSaltProcessStep(saltMaster, 'I@docker:swarm:role:master', 'mine.update')
                 salt.enforceState(saltMaster, 'I@docker:swarm', 'docker.swarm', true)
+                // Workaround "node lost leader status" issue by restarting
+                //  leader on our own
+                //  (https://github.com/moby/moby/issues/24643)
+                sleep(5)
+                salt.cmdRun(saltMaster, 'I@docker:swarm:role:master', 'service docker restart')
+                sleep(10)
+                // -- end workaround --
                 print common.prettyPrint(salt.cmdRun(saltMaster, 'I@docker:swarm:role:master', 'docker node ls'))
             }
 
@@ -148,7 +155,7 @@
             }
 
             stage("Deploy Docker services") {
-                retry(2) {
+                retry(3) {
                     sleep(5)
                     salt.enforceState(saltMaster, 'I@docker:swarm:role:master', 'docker.client')
                 }