blob: 1273d6e425bd0260574a76b17f55c01d25c05642 [file] [log] [blame]
Jiri Broulikbb447ac2017-05-04 15:36:22 +02001/**
2 * Update packages on given nodes
3 *
4 * Expected parameters:
5 * SALT_MASTER_CREDENTIALS Credentials to the Salt API.
6 * SALT_MASTER_URL Full Salt API address [http://10.10.10.1:8000].
Jiri Broulik3792c962017-05-17 18:26:36 +02007 * STAGE_TEST_UPGRADE Run test upgrade stage (bool)
8 * STAGE_REAL_UPGRADE Run real upgrade stage (bool)
9 * STAGE_ROLLBACK_UPGRADE Run rollback upgrade stage (bool)
Jiri Broulikbb447ac2017-05-04 15:36:22 +020010 *
11**/
12
13def common = new com.mirantis.mk.Common()
14def salt = new com.mirantis.mk.Salt()
15
16
17def saltMaster
18
19timestamps {
20 node() {
21
22 stage('Connect to Salt API') {
23 saltMaster = salt.connection(SALT_MASTER_URL, SALT_MASTER_CREDENTIALS)
24 }
25
Jiri Broulik3792c962017-05-17 18:26:36 +020026 if (STAGE_TEST_UPGRADE.toBoolean() == true) {
27 stage('Test upgrade') {
28
29 //salt.enforceState(saltMaster, 'I@salt:master', 'reclass')
30
31 // salt.runSaltProcessStep(saltMaster, '*', 'saltutil.refresh_pillar', [], null, true)
32 // salt '*' saltutil.sync_all
33 // salt.runSaltProcessStep(saltMaster, '*', 'saltutil.sync_all', [], null, true)
34
35
36 def _pillar = salt.getGrain(saltMaster, 'I@salt:master', 'domain')
37 def domain = _pillar['return'][0].values()[0].values()[0]
38 print(_pillar)
39 print(domain)
40
41 // read backupninja variable
42 _pillar = salt.getPillar(saltMaster, 'I@backupninja:client', '_param:backupninja_backup_host')
43 def backupninja_backup_host = _pillar['return'][0].values()[0]
44 print(_pillar)
45 print(backupninja_backup_host)
46
47 _pillar = salt.getGrain(saltMaster, 'I@salt:control', 'id')
48 def kvm01 = _pillar['return'][0].values()[0].values()[0]
49 def kvm03 = _pillar['return'][0].values()[2].values()[0]
50 def kvm02 = _pillar['return'][0].values()[1].values()[0]
51 print(_pillar)
52 print(kvm01)
53 print(kvm02)
54 print(kvm03)
55
56 _pillar = salt.getPillar(saltMaster, "${kvm01}", 'salt:control:cluster:internal:node:upg01:provider')
57 def upgNodeProvider = _pillar['return'][0].values()[0]
58 print(_pillar)
59 print(upgNodeProvider)
Jiri Broulikbb447ac2017-05-04 15:36:22 +020060
Jiri Broulik6fc9d3f2017-05-12 07:11:29 +020061
Jiri Broulik3792c962017-05-17 18:26:36 +020062 salt.runSaltProcessStep(saltMaster, "${upgNodeProvider}", 'virt.destroy', ["upg01.${domain}"], null, true)
63 salt.runSaltProcessStep(saltMaster, "${upgNodeProvider}", 'virt.undefine', ["upg01.${domain}"], null, true)
Jiri Broulik6fc9d3f2017-05-12 07:11:29 +020064
Jiri Broulik3792c962017-05-17 18:26:36 +020065
66 try {
Jiri Broulikd6bc1382017-05-17 18:46:27 +020067 salt.cmdRun(saltMaster, 'I@salt:master', "salt-key -d upg01.${domain} -y")
Jiri Broulik3792c962017-05-17 18:26:36 +020068 } catch (Exception e) {
Jiri Broulikd6bc1382017-05-17 18:46:27 +020069 common.warningMsg("upg01.${domain} does not match any accepted, unaccepted or rejected keys. The key did not exist yet or was already removed. We should continue to run")
Jiri Broulik3792c962017-05-17 18:26:36 +020070 }
Jiri Broulik6fc9d3f2017-05-12 07:11:29 +020071
72
Jiri Broulik3792c962017-05-17 18:26:36 +020073 // salt 'kvm02*' state.sls salt.control
74 salt.enforceState(saltMaster, "${upgNodeProvider}", 'salt.control')
Jiri Broulikbb447ac2017-05-04 15:36:22 +020075
Jiri Broulik3792c962017-05-17 18:26:36 +020076 sleep(60)
Jiri Broulikbb447ac2017-05-04 15:36:22 +020077
Jiri Broulik3792c962017-05-17 18:26:36 +020078 // salt '*' saltutil.refresh_pillar
79 salt.runSaltProcessStep(saltMaster, 'upg*', 'saltutil.refresh_pillar', [], null, true)
80 // salt '*' saltutil.sync_all
81 salt.runSaltProcessStep(saltMaster, 'upg*', 'saltutil.sync_all', [], null, true)
Jiri Broulikbb447ac2017-05-04 15:36:22 +020082
Jiri Broulik3792c962017-05-17 18:26:36 +020083 // salt "upg*" state.sls linux,openssh,salt.minion,ntp,rsyslog
84 try {
85 salt.enforceState(saltMaster, 'upg*', ['linux', 'openssh', 'salt.minion', 'ntp', 'rsyslog'])
86 } catch (Exception e) {
87 common.warningMsg('Received no response because salt-minion was restarted. We should continue to run')
88 }
89 salt.enforceState(saltMaster, 'upg*', ['linux', 'openssh', 'salt.minion', 'ntp', 'rsyslog'])
Jiri Broulikbb447ac2017-05-04 15:36:22 +020090
Jiri Broulik3792c962017-05-17 18:26:36 +020091 // salt "upg*" state.sls rabbitmq
92 salt.enforceState(saltMaster, 'upg*', ['rabbitmq', 'memcached'])
93 try {
94 salt.enforceState(saltMaster, 'I@backupninja:client', ['openssh.client', 'salt.minion'])
95 } catch (Exception e) {
96 common.warningMsg('salt-minion was restarted. We should continue to run')
97 }
98 try {
99 salt.enforceState(saltMaster, 'I@backupninja:server', ['salt.minion'])
100 } catch (Exception e) {
101 common.warningMsg('salt-minion was restarted. We should continue to run')
102 }
103 // salt '*' state.apply salt.minion.grains
104 //salt.enforceState(saltMaster, '*', 'salt.minion.grains')
105 // salt -C 'I@backupninja:server' state.sls backupninja
106 salt.enforceState(saltMaster, 'I@backupninja:server', 'backupninja')
107 // salt -C 'I@backupninja:client' state.sls backupninja
108 salt.enforceState(saltMaster, 'I@backupninja:client', 'backupninja')
109 salt.runSaltProcessStep(saltMaster, 'I@backupninja:client', 'ssh.rm_known_host', ["root", "${backupninja_backup_host}"], null, true)
110 salt.cmdRun(saltMaster, 'I@backupninja:client', "arp -d ${backupninja_backup_host}")
111 salt.runSaltProcessStep(saltMaster, 'I@backupninja:client', 'ssh.set_known_host', ["root", "${backupninja_backup_host}"], null, true)
112 salt.cmdRun(saltMaster, 'I@backupninja:client', 'backupninja -n --run /etc/backup.d/101.mysql')
113 salt.cmdRun(saltMaster, 'I@backupninja:client', 'backupninja -n --run /etc/backup.d/200.backup.rsync')
Jiri Broulik6fc9d3f2017-05-12 07:11:29 +0200114
115
Jiri Broulik3792c962017-05-17 18:26:36 +0200116 def databases = salt.cmdRun(saltMaster, 'I@mysql:client','salt-call mysql.db_list | grep upgrade | awk \'/-/ {print \$2}\'')
117 if(databases && databases != ""){
118 def databasesList = databases['return'][0].values()[0].trim().tokenize("\n")
119 for( i = 0; i < databasesList.size(); i++){
120 if(databasesList[i].toLowerCase().contains('upgrade')){
121 salt.runSaltProcessStep(saltMaster, 'I@mysql:client', 'mysql.db_remove', ["${databasesList[i]}"], null, true)
122 common.warningMsg("removing database ${databasesList[i]}")
123 salt.runSaltProcessStep(saltMaster, 'I@mysql:client', 'file.remove', ["/root/mysql/flags/${databasesList[i]}-installed"], null, true)
124 }
125 }
126 }else{
127 common.errorMsg("No _upgrade databases were returned")
128 }
Jiri Broulikbb447ac2017-05-04 15:36:22 +0200129
Jiri Broulik3792c962017-05-17 18:26:36 +0200130 salt.enforceState(saltMaster, 'I@mysql:client', 'mysql.client')
Jiri Broulik6fc9d3f2017-05-12 07:11:29 +0200131
Jiri Broulik3792c962017-05-17 18:26:36 +0200132 try {
133 salt.enforceState(saltMaster, 'upg*', 'keystone.server')
134 } catch (Exception e) {
135 salt.runSaltProcessStep(saltMaster, 'upg*', 'service.reload', ['apache2'], null, true)
136 common.warningMsg('reload of apache2. We should continue to run')
137 }
138 salt.enforceState(saltMaster, 'upg*', ['keystone.client', 'glance', 'keystone.server'])
139 salt.enforceState(saltMaster, 'upg*', 'nova')
Jiri Broulike2f1e4a2017-05-17 23:59:52 +0200140 salt.enforceState(saltMaster, 'upg*', 'nova')
Jiri Broulik3792c962017-05-17 18:26:36 +0200141 salt.enforceState(saltMaster, 'upg*', ['cinder', 'neutron', 'heat'])
Jiri Broulikbb447ac2017-05-04 15:36:22 +0200142
Jiri Broulik3792c962017-05-17 18:26:36 +0200143 salt.cmdRun(saltMaster, 'upg01*', '. /root/keystonercv3; openstack service list; openstack image list; openstack flavor list; openstack compute service list; openstack server list; openstack network list; openstack volume list; openstack orchestration service list')
144 }
Jiri Broulikbb447ac2017-05-04 15:36:22 +0200145 }
146
Jiri Broulik3792c962017-05-17 18:26:36 +0200147 if (STAGE_TEST_UPGRADE.toBoolean() == true && STAGE_REAL_UPGRADE.toBoolean() == true) {
148 stage('Ask for manual confirmation') {
149 input message: "Do you want to continue with upgrade?"
150 }
Jiri Broulikbb447ac2017-05-04 15:36:22 +0200151 }
152
Jiri Broulik3792c962017-05-17 18:26:36 +0200153
154 if (STAGE_REAL_UPGRADE.toBoolean() == true) {
155 stage('Real upgrade') {
156 // # actual upgrade
157
Jiri Broulike2f1e4a2017-05-17 23:59:52 +0200158 _pillar = salt.getGrain(saltMaster, 'I@salt:master', 'domain')
159 domain = _pillar['return'][0].values()[0].values()[0]
160 print(_pillar)
161 print(domain)
162
163 _pillar = salt.getGrain(saltMaster, 'I@salt:control', 'id')
164 kvm01 = _pillar['return'][0].values()[0].values()[0]
165 kvm03 = _pillar['return'][0].values()[2].values()[0]
166 kvm02 = _pillar['return'][0].values()[1].values()[0]
167 print(_pillar)
168 print(kvm01)
169 print(kvm02)
170 print(kvm03)
171
Jiri Broulik3792c962017-05-17 18:26:36 +0200172 _pillar = salt.getPillar(saltMaster, "${kvm01}", 'salt:control:cluster:internal:node:ctl01:provider')
173 def ctl01NodeProvider = _pillar['return'][0].values()[0]
174
175 _pillar = salt.getPillar(saltMaster, "${kvm01}", 'salt:control:cluster:internal:node:ctl02:provider')
176 def ctl02NodeProvider = _pillar['return'][0].values()[0]
177
178 _pillar = salt.getPillar(saltMaster, "${kvm01}", 'salt:control:cluster:internal:node:ctl03:provider')
179 def ctl03NodeProvider = _pillar['return'][0].values()[0]
180
181 _pillar = salt.getPillar(saltMaster, "${kvm01}", 'salt:control:cluster:internal:node:prx01:provider')
182 def prx01NodeProvider = _pillar['return'][0].values()[0]
183
184 _pillar = salt.getPillar(saltMaster, "${kvm01}", 'salt:control:cluster:internal:node:prx02:provider')
185 def prx02NodeProvider = _pillar['return'][0].values()[0]
186
187
188 salt.runSaltProcessStep(saltMaster, "${prx01NodeProvider}", 'virt.destroy', ["prx01.${domain}"], null, true)
189 salt.runSaltProcessStep(saltMaster, "${prx02NodeProvider}", 'virt.destroy', ["prx02.${domain}"], null, true)
190 salt.runSaltProcessStep(saltMaster, "${ctl01NodeProvider}", 'virt.destroy', ["ctl01.${domain}"], null, true)
191 salt.runSaltProcessStep(saltMaster, "${ctl02NodeProvider}", 'virt.destroy', ["ctl02.${domain}"], null, true)
192 salt.runSaltProcessStep(saltMaster, "${ctl03NodeProvider}", 'virt.destroy', ["ctl03.${domain}"], null, true)
193
194
195 try {
196 salt.cmdRun(saltMaster, "${prx01NodeProvider}", "[ ! -f /root/prx01.${domain}.qcow2.bak ] && cp /var/lib/libvirt/images/prx01.${domain}/system.qcow2 ./prx01.${domain}.qcow2.bak")
197 } catch (Exception e) {
198 common.warningMsg('File already exists')
199 }
200 try {
201 salt.cmdRun(saltMaster, "${prx02NodeProvider}", "[ ! -f /root/prx02.${domain}.qcow2.bak ] && cp /var/lib/libvirt/images/prx02.${domain}/system.qcow2 ./prx02.${domain}.qcow2.bak")
202 } catch (Exception e) {
203 common.warningMsg('File already exists')
204 }
205 try {
206 salt.cmdRun(saltMaster, "${ctl01NodeProvider}", "[ ! -f /root/ctl01.${domain}.qcow2.bak ] && cp /var/lib/libvirt/images/ctl01.${domain}/system.qcow2 ./ctl01.${domain}.qcow2.bak")
207 } catch (Exception e) {
208 common.warningMsg('File already exists')
209 }
210 try {
211 salt.cmdRun(saltMaster, "${ctl02NodeProvider}", "[ ! -f /root/ctl02.${domain}.qcow2.bak ] && cp /var/lib/libvirt/images/ctl02.${domain}/system.qcow2 ./ctl02.${domain}.qcow2.bak")
212 } catch (Exception e) {
213 common.warningMsg('File already exists')
214 }
215 try {
216 salt.cmdRun(saltMaster, "${ctl03NodeProvider}", "[ ! -f /root/ctl03.${domain}.qcow2.bak ] && cp /var/lib/libvirt/images/ctl03.${domain}/system.qcow2 ./ctl03.${domain}.qcow2.bak")
217 } catch (Exception e) {
218 common.warningMsg('File already exists')
219 }
220
221
222 salt.runSaltProcessStep(saltMaster, "${prx01NodeProvider}", 'virt.undefine', ["prx01.${domain}"], null, true)
223 salt.runSaltProcessStep(saltMaster, "${prx02NodeProvider}", 'virt.undefine', ["prx02.${domain}"], null, true)
224 salt.runSaltProcessStep(saltMaster, "${ctl01NodeProvider}", 'virt.undefine', ["ctl01.${domain}"], null, true)
225 salt.runSaltProcessStep(saltMaster, "${ctl02NodeProvider}", 'virt.undefine', ["ctl02.${domain}"], null, true)
226 salt.runSaltProcessStep(saltMaster, "${ctl03NodeProvider}", 'virt.undefine', ["ctl03.${domain}"], null, true)
227
228
229 salt.cmdRun(saltMaster, 'I@backupninja:client', 'backupninja -n --run /etc/backup.d/101.mysql')
230 salt.cmdRun(saltMaster, 'I@backupninja:client', 'backupninja -n --run /etc/backup.d/200.backup.rsync')
231
232
233 try {
234 salt.cmdRun(saltMaster, 'I@salt:master', "salt-key -d ctl01.${domain},ctl02.${domain},ctl03.${domain},prx01.${domain},prx02.${domain} -y")
235 } catch (Exception e) {
236 common.warningMsg('does not match any accepted, unaccepted or rejected keys. They were probably already removed. We should continue to run')
237 }
238
239 // salt 'kvm*' state.sls salt.control
240 salt.enforceState(saltMaster, 'I@salt:control', 'salt.control')
241
242 sleep(60)
243
244 // salt '*' saltutil.refresh_pillar
245 salt.runSaltProcessStep(saltMaster, '*', 'saltutil.refresh_pillar', [], null, true)
246 // salt '*' saltutil.sync_all
247 salt.runSaltProcessStep(saltMaster, '*', 'saltutil.sync_all', [], null, true)
248
249 try {
250 salt.enforceState(saltMaster, 'ctl* or prx* or ctl*', ['linux', 'openssh', 'salt.minion', 'ntp', 'rsyslog'])
251 } catch (Exception e) {
252 common.warningMsg('Received no response because salt-minion was restarted. We should continue to run')
253 }
254 salt.enforceState(saltMaster, 'ctl* or prx* or ctl*', ['linux', 'openssh', 'salt.minion', 'ntp', 'rsyslog'])
255
256 // salt 'ctl*' state.sls keepalived
257 // salt 'ctl*' state.sls haproxy
258 salt.enforceState(saltMaster, 'ctl*', ['keepalived', 'haproxy'])
259 // salt 'ctl*' service.restart rsyslog
260 salt.runSaltProcessStep(saltMaster, 'ctl*', 'service.restart', ['rsyslog'], null, true)
261 // salt "ctl*" state.sls memcached
262 // salt "ctl*" state.sls keystone.server
263 try {
264 salt.enforceState(saltMaster, 'ctl*', ['memcached', 'keystone.server'])
265 } catch (Exception e) {
266 salt.runSaltProcessStep(saltMaster, 'ctl*', 'service.reload', ['apache2'], null, true)
267 common.warningMsg('reload of apache2. We should continue to run')
268 }
269 // salt 'ctl01*' state.sls keystone.client
270 salt.enforceState(saltMaster, 'I@keystone:client and ctl*', 'keystone.client')
271 // salt 'ctl*' state.sls glance
272 salt.enforceState(saltMaster, 'ctl*', 'glance')
273 // salt 'ctl*' state.sls glusterfs.client
274 salt.enforceState(saltMaster, 'ctl*', 'glusterfs.client')
275 // salt 'ctl*' state.sls keystone.server
276 salt.enforceState(saltMaster, 'ctl*', 'keystone.server')
277 // salt 'ctl*' state.sls nova
278 salt.enforceState(saltMaster, 'ctl*', 'nova')
279 // salt 'ctl*' state.sls cinder
280 salt.enforceState(saltMaster, 'ctl*', 'cinder')
281 // salt 'ctl*' state.sls neutron
282 salt.enforceState(saltMaster, 'ctl*', 'neutron')
283 // salt 'ctl*' state.sls heat
284 salt.enforceState(saltMaster, 'ctl*', 'heat')
285
286 // salt 'cmp*' cmd.run 'service nova-compute restart'
287 salt.runSaltProcessStep(saltMaster, 'cmp*', 'service.restart', ['nova-compute'], null, true)
288
289 // salt 'prx*' state.sls linux,openssh,salt.minion,ntp,rsyslog - TODO: proč? už to jednou projelo
290 // salt 'ctl*' state.sls keepalived
291 // salt 'prx*' state.sls keepalived
292 salt.enforceState(saltMaster, 'prx*', 'keepalived')
293 // salt 'prx*' state.sls horizon
294 salt.enforceState(saltMaster, 'prx*', 'horizon')
295 // salt 'prx*' state.sls nginx
296 salt.enforceState(saltMaster, 'prx*', 'nginx')
297
298 salt.cmdRun(saltMaster, 'ctl01*', '. /root/keystonercv3; openstack service list; openstack image list; openstack flavor list; openstack compute service list; openstack server list; openstack network list; openstack volume list; openstack orchestration service list')
299 }
300
301 }
302
303
304 if (STAGE_REAL_UPGRADE.toBoolean() == true && STAGE_ROLLBACK_UPGRADE.toBoolean() == true) {
305 stage('Ask for manual confirmation') {
306 input message: "Please verify that control upgrade was successful. If it did not succeed, in the worst scenario, you can click YES to continue with control-upgrade-rollback. Do you want to continue with the rollback?"
307 }
308 stage('Ask for manual confirmation') {
309 input message: "Do you really want to continue with the rollback?"
310 }
311 }
312
313 if (STAGE_ROLLBACK_UPGRADE.toBoolean() == true) {
314 stage('Rollback upgrade') {
315
Jiri Broulike2f1e4a2017-05-17 23:59:52 +0200316 _pillar = salt.getGrain(saltMaster, 'I@salt:master', 'domain')
317 domain = _pillar['return'][0].values()[0].values()[0]
318 print(_pillar)
319 print(domain)
320
Jiri Broulik3792c962017-05-17 18:26:36 +0200321 salt.runSaltProcessStep(saltMaster, "${prx01NodeProvider}", 'virt.destroy', ["prx01.${domain}"], null, true)
322 salt.runSaltProcessStep(saltMaster, "${prx02NodeProvider}", 'virt.destroy', ["prx02.${domain}"], null, true)
323 salt.runSaltProcessStep(saltMaster, "${ctl01NodeProvider}", 'virt.destroy', ["ctl01.${domain}"], null, true)
324 salt.runSaltProcessStep(saltMaster, "${ctl02NodeProvider}", 'virt.destroy', ["ctl02.${domain}"], null, true)
325 salt.runSaltProcessStep(saltMaster, "${ctl03NodeProvider}", 'virt.destroy', ["ctl03.${domain}"], null, true)
326
327 salt.runSaltProcessStep(saltMaster, "${prx01NodeProvider}", 'file.copy', ["/root/prx01.${domain}.qcow2.bak", "/var/lib/libvirt/images/prx01.${domain}/system.qcow2"], null, true)
328 salt.runSaltProcessStep(saltMaster, "${prx02NodeProvider}", 'file.copy', ["/root/prx02.${domain}.qcow2.bak", "/var/lib/libvirt/images/prx02.${domain}/system.qcow2"], null, true)
329 salt.runSaltProcessStep(saltMaster, "${ctl01NodeProvider}", 'file.copy', ["/root/ctl01.${domain}.qcow2.bak", "/var/lib/libvirt/images/ctl01.${domain}/system.qcow2"], null, true)
330 salt.runSaltProcessStep(saltMaster, "${ctl02NodeProvider}", 'file.copy', ["/root/ctl02.${domain}.qcow2.bak", "/var/lib/libvirt/images/ctl02.${domain}/system.qcow2"], null, true)
331 salt.runSaltProcessStep(saltMaster, "${ctl03NodeProvider}", 'file.copy', ["/root/ctl03.${domain}.qcow2.bak", "/var/lib/libvirt/images/ctl03.${domain}/system.qcow2"], null, true)
332
333 try {
334 salt.cmdRun(saltMaster, 'I@salt:master', "salt-key -d ctl01.${domain},ctl02.${domain},ctl03.${domain},prx01.${domain},prx02.${domain} -y")
335 } catch (Exception e) {
336 common.warningMsg('does not match any accepted, unaccepted or rejected keys. They were probably already removed. We should continue to run')
337 }
338
339 databases = salt.cmdRun(saltMaster, 'I@mysql:client','salt-call mysql.db_list | grep -v \'upgrade\' | grep -v \'schema\' | awk \'/-/ {print \$2}\'')
340 if(databases && databases != ""){
341 databasesList = databases['return'][0].values()[0].trim().tokenize("\n")
342 for( i = 0; i < databasesList.size(); i++){
343 if(!databasesList[i].toLowerCase().contains('upgrade') && !databasesList[i].toLowerCase().contains('command execution')){
344 salt.runSaltProcessStep(saltMaster, 'I@mysql:client', 'mysql.db_remove', ["${databasesList[i]}"], null, true)
345 common.warningMsg("removing database ${databasesList[i]}")
346 salt.runSaltProcessStep(saltMaster, 'I@mysql:client', 'file.remove', ["/root/mysql/flags/${databasesList[i]}-installed"], null, true)
347 }
348 }
349 }else{
350 common.errorMsg("No none _upgrade databases were returned")
351 }
352
353 salt.enforceState(saltMaster, 'I@mysql:client', 'mysql.client')
354
355 salt.runSaltProcessStep(saltMaster, "${prx01NodeProvider}", 'virt.start', ["prx01.${domain}"], null, true)
356 salt.runSaltProcessStep(saltMaster, "${prx02NodeProvider}", 'virt.start', ["prx02.${domain}"], null, true)
357 salt.runSaltProcessStep(saltMaster, "${ctl01NodeProvider}", 'virt.start', ["ctl01.${domain}"], null, true)
358 salt.runSaltProcessStep(saltMaster, "${ctl02NodeProvider}", 'virt.start', ["ctl02.${domain}"], null, true)
359 salt.runSaltProcessStep(saltMaster, "${ctl03NodeProvider}", 'virt.start', ["ctl03.${domain}"], null, true)
360
361 // salt 'cmp*' cmd.run 'service nova-compute restart'
362 salt.runSaltProcessStep(saltMaster, 'cmp*', 'service.restart', ['nova-compute'], null, true)
363
364 sleep(60)
365
366 salt.cmdRun(saltMaster, 'ctl01*', '. /root/keystonerc; nova service-list; glance image-list; nova flavor-list; nova hypervisor-list; nova list; neutron net-list; cinder list; heat service-list')
367 }
Jiri Broulik6fc9d3f2017-05-12 07:11:29 +0200368 }
Jiri Broulikbb447ac2017-05-04 15:36:22 +0200369 }
370}