cookiecutter generate iso fixes

Change-Id: I10f20854ec09e105c607909480cf0a0ffc291632
diff --git a/generate-cookiecutter-products.groovy b/generate-cookiecutter-products.groovy
index 0c57300..f6090c0 100644
--- a/generate-cookiecutter-products.groovy
+++ b/generate-cookiecutter-products.groovy
@@ -146,7 +146,6 @@
             sh "wget -O create-config-drive ${config_drive_script_url} && chmod +x create-config-drive"
             sh "wget -O user_data.sh ${user_data_script_url}"
 
-
             // load data from model
             def smc = [:]
             smc['SALT_MASTER_MINION_ID'] = "cfg.${clusterDomain}"
@@ -154,6 +153,8 @@
             smc['DEPLOY_NETWORK_GW'] = templateContext['default_context']['deploy_network_gateway']
             smc['DEPLOY_NETWORK_NETMASK'] = templateContext['default_context']['deploy_network_netmask']
             smc['DNS_SERVERS'] = templateContext['default_context']['dns_server01']
+            smc['CICD_CONTROL_ADDRESS'] = templateContext['default_context']['cicd_control_address']
+            smc['INFRA_CONFIG_ADDRESS'] = templateContext['default_context']['infra_config_address']
 
             for (i in common.entries(smc)) {
                 sh "sed -i \"s,export ${i[0]}=.*,export ${i[0]}=${i[1]},\" user_data.sh"
diff --git a/restore-cassandra.groovy b/restore-cassandra.groovy
index 89afc6c..4b554b0 100644
--- a/restore-cassandra.groovy
+++ b/restore-cassandra.groovy
@@ -58,7 +58,7 @@
 
         // wait until supervisor-database service is up
         salt.commandStatus(saltMaster, 'I@cassandra:backup:client', 'service supervisor-database status', 'running')
-
+        sleep(5)
         // performs restore
         salt.cmdRun(saltMaster, 'I@cassandra:backup:client', "su root -c 'salt-call state.sls cassandra'")
         salt.runSaltProcessStep(saltMaster, 'I@cassandra:backup:client', 'system.reboot', null, null, true, 5)
@@ -73,7 +73,7 @@
 
         // wait until contrail-status is up
         salt.commandStatus(saltMaster, 'I@opencontrail:control', "contrail-status | grep -v == | grep -v \'disabled on boot\' | grep -v nodemgr | grep -v active | grep -v backup", null, false)
-
+        
         salt.cmdRun(saltMaster, 'I@opencontrail:control', "nodetool status")
         salt.cmdRun(saltMaster, 'I@opencontrail:control', "contrail-status")
     }
diff --git a/xtrabackup-restore-mysql-db.groovy b/xtrabackup-restore-mysql-db.groovy
index 6401789..303c282 100644
--- a/xtrabackup-restore-mysql-db.groovy
+++ b/xtrabackup-restore-mysql-db.groovy
@@ -74,8 +74,12 @@
         salt.commandStatus(saltMaster, 'I@galera:master', 'service mysql status', 'running')
 
         salt.runSaltProcessStep(saltMaster, 'I@galera:slave', 'service.start', ['mysql'], null, true)
-        sleep(15)
+        try {
+            salt.commandStatus(saltMaster, 'I@galera:slave', 'service mysql status', 'running')
+        } catch (Exception er) {
+            common.warningMsg('Either there are no galera slaves or something failed when starting mysql on galera slaves')
+        }
+        sleep(5)
         salt.cmdRun(saltMaster, 'I@galera:master', "su root -c 'salt-call mysql.status | grep -A1 wsrep_cluster_size'")
-
     }
 }