Merge "Keep /etc/maas permissions as well" into release/proposed/2019.2.0
diff --git a/opencontrail4-update.groovy b/opencontrail4-update.groovy
index 01aae14..f71b7be 100644
--- a/opencontrail4-update.groovy
+++ b/opencontrail4-update.groovy
@@ -14,6 +14,7 @@
 python = new com.mirantis.mk.Python()
 
 def pepperEnv = "pepperEnv"
+def askConfirmation = (env.getProperty('ASK_CONFIRMATION') ?: true).toBoolean()
 def supportedOcTargetVersions = ['4.0', '4.1']
 def neutronServerPkgs = 'neutron-plugin-contrail,contrail-heat,python-contrail'
 def config4Services = ['zookeeper', 'contrail-webui-middleware', 'contrail-webui', 'contrail-api', 'contrail-schema', 'contrail-svc-monitor', 'contrail-device-manager', 'contrail-config-nodemgr', 'contrail-database']
@@ -280,7 +281,9 @@
                 }
 
                 stage('Confirm update on sample nodes') {
-                    input message: "Do you want to continue with the Opencontrail components update on compute sample nodes? ${cmpTargetFirstSubset}"
+                    if (askConfirmation) {
+                        input message: "Do you want to continue with the Opencontrail components update on compute sample nodes? ${cmpTargetFirstSubset}"
+                    }
                 }
 
                 stage("Opencontrail compute update on sample nodes") {
@@ -289,8 +292,9 @@
                 }
 
                 stage('Confirm update on all remaining target nodes') {
-
-                    input message: "Do you want to continue with the Opencontrail components update on all targeted compute nodes? Node list: ${cmpTargetSecondSubset}"
+                    if (askConfirmation) {
+                        input message: "Do you want to continue with the Opencontrail components update on all targeted compute nodes? Node list: ${cmpTargetSecondSubset}"
+                    }
                 }
 
                 stage("Opencontrail compute update on all targeted nodes") {
diff --git a/stacklight-upgrade.groovy b/stacklight-upgrade.groovy
index 60b8fa5..9b2d760 100644
--- a/stacklight-upgrade.groovy
+++ b/stacklight-upgrade.groovy
@@ -70,10 +70,10 @@
             common.errorMsg('[ERROR] Elasticsearch VIP port could not be retrieved')
         }
 
-        pillar = salt.getPillar(master, "I@elasticsearch:client ${extra_tgt}", 'elasticsearch:client:server:scheme')
+        pillar = salt.getReturnValues(salt.getPillar(master, "I@elasticsearch:client", 'elasticsearch:client:server:scheme'))
         def elasticsearch_scheme
-        if (!pillar['return'].isEmpty()) {
-            elasticsearch_scheme = pillar['return'][0].values()[0]
+        if(pillar) {
+            elasticsearch_scheme = pillar
             common.infoMsg("[INFO] Using elasticsearch scheme: ${elasticsearch_scheme}")
         } else {
             common.infoMsg('[INFO] No pillar with Elasticsearch server scheme, using scheme: http')