Jiri Broulik | bb447ac | 2017-05-04 15:36:22 +0200 | [diff] [blame] | 1 | /** |
| 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 Broulik | 3792c96 | 2017-05-17 18:26:36 +0200 | [diff] [blame] | 7 | * 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 Broulik | 7cadf58 | 2017-11-13 17:35:31 +0100 | [diff] [blame] | 10 | * SKIP_VM_RELAUNCH Set to true if vms should not be recreated |
Jiri Broulik | bb447ac | 2017-05-04 15:36:22 +0200 | [diff] [blame] | 11 | * |
| 12 | **/ |
| 13 | |
| 14 | def common = new com.mirantis.mk.Common() |
| 15 | def salt = new com.mirantis.mk.Salt() |
chnyda | 625f4b4 | 2017-10-11 14:10:31 +0200 | [diff] [blame] | 16 | def python = new com.mirantis.mk.Python() |
Jiri Broulik | bb447ac | 2017-05-04 15:36:22 +0200 | [diff] [blame] | 17 | |
chnyda | 625f4b4 | 2017-10-11 14:10:31 +0200 | [diff] [blame] | 18 | def pepperEnv = "pepperEnv" |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 19 | timeout(time: 12, unit: 'HOURS') { |
| 20 | node() { |
Jiri Broulik | bb447ac | 2017-05-04 15:36:22 +0200 | [diff] [blame] | 21 | |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 22 | stage('Setup virtualenv for Pepper') { |
| 23 | python.setupPepperVirtualenv(pepperEnv, SALT_MASTER_URL, SALT_MASTER_CREDENTIALS) |
| 24 | } |
Jiri Broulik | bb447ac | 2017-05-04 15:36:22 +0200 | [diff] [blame] | 25 | |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 26 | if (STAGE_TEST_UPGRADE.toBoolean() == true) { |
| 27 | stage('Test upgrade') { |
Jiri Broulik | 6fc9d3f | 2017-05-12 07:11:29 +0200 | [diff] [blame] | 28 | |
Jiri Broulik | 7cadf58 | 2017-11-13 17:35:31 +0100 | [diff] [blame] | 29 | try { |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 30 | salt.enforceState(pepperEnv, 'I@salt:master', 'reclass') |
Jiri Broulik | 7cadf58 | 2017-11-13 17:35:31 +0100 | [diff] [blame] | 31 | } catch (Exception e) { |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 32 | common.warningMsg("Some parts of Reclass state failed. The most probable reasons were uncommited changes. We should continue to run") |
Jiri Broulik | 7cadf58 | 2017-11-13 17:35:31 +0100 | [diff] [blame] | 33 | } |
Jiri Broulik | 6fc9d3f | 2017-05-12 07:11:29 +0200 | [diff] [blame] | 34 | |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 35 | try { |
| 36 | salt.runSaltProcessStep(pepperEnv, '*', 'saltutil.refresh_pillar', [], null, true) |
| 37 | } catch (Exception e) { |
| 38 | common.warningMsg("No response from some minions. We should continue to run") |
| 39 | } |
Jiri Broulik | bb447ac | 2017-05-04 15:36:22 +0200 | [diff] [blame] | 40 | |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 41 | try { |
| 42 | salt.runSaltProcessStep(pepperEnv, '*', 'saltutil.sync_all', [], null, true) |
| 43 | } catch (Exception e) { |
| 44 | common.warningMsg("No response from some minions. We should continue to run") |
| 45 | } |
Jiri Broulik | bb447ac | 2017-05-04 15:36:22 +0200 | [diff] [blame] | 46 | |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 47 | def domain = salt.getPillar(pepperEnv, 'I@salt:master', '_param:cluster_domain') |
| 48 | domain = domain['return'][0].values()[0] |
Jiri Broulik | 6fc9d3f | 2017-05-12 07:11:29 +0200 | [diff] [blame] | 49 | |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 50 | // read backupninja variable |
| 51 | _pillar = salt.getPillar(pepperEnv, 'I@backupninja:client', '_param:backupninja_backup_host') |
| 52 | def backupninja_backup_host = _pillar['return'][0].values()[0] |
Jiri Broulik | 6fc9d3f | 2017-05-12 07:11:29 +0200 | [diff] [blame] | 53 | |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 54 | if (SKIP_VM_RELAUNCH.toBoolean() == false) { |
| 55 | |
| 56 | _pillar = salt.getGrain(pepperEnv, 'I@salt:control', 'id') |
| 57 | def kvm01 = _pillar['return'][0].values()[0].values()[0] |
| 58 | print(_pillar) |
| 59 | print(kvm01) |
| 60 | |
| 61 | _pillar = salt.getPillar(pepperEnv, "${kvm01}", 'salt:control:cluster:internal:node:upg01:provider') |
| 62 | def upgNodeProvider = _pillar['return'][0].values()[0] |
| 63 | print(_pillar) |
| 64 | print(upgNodeProvider) |
| 65 | |
| 66 | salt.runSaltProcessStep(pepperEnv, "${upgNodeProvider}", 'virt.destroy', ["upg01.${domain}"], null, true) |
| 67 | salt.runSaltProcessStep(pepperEnv, "${upgNodeProvider}", 'virt.undefine', ["upg01.${domain}"], null, true) |
| 68 | |
| 69 | try { |
| 70 | salt.cmdRun(pepperEnv, 'I@salt:master', "salt-key -d upg01.${domain} -y") |
| 71 | } catch (Exception e) { |
| 72 | 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 Broulik | 3792c96 | 2017-05-17 18:26:36 +0200 | [diff] [blame] | 73 | } |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 74 | |
| 75 | // salt 'kvm02*' state.sls salt.control |
| 76 | salt.enforceState(pepperEnv, "${upgNodeProvider}", 'salt.control') |
| 77 | // wait until upg node is registered in salt-key |
| 78 | salt.minionPresent(pepperEnv, 'I@salt:master', 'upg01') |
| 79 | // salt '*' saltutil.refresh_pillar |
| 80 | salt.runSaltProcessStep(pepperEnv, 'upg*', 'saltutil.refresh_pillar', [], null, true) |
| 81 | // salt '*' saltutil.sync_all |
| 82 | salt.runSaltProcessStep(pepperEnv, 'upg*', 'saltutil.sync_all', [], null, true) |
Jiri Broulik | 3792c96 | 2017-05-17 18:26:36 +0200 | [diff] [blame] | 83 | } |
Jiri Broulik | bb447ac | 2017-05-04 15:36:22 +0200 | [diff] [blame] | 84 | |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 85 | // salt "upg*" state.sls linux,openssh,salt.minion,ntp,rsyslog |
| 86 | try { |
| 87 | salt.enforceState(pepperEnv, 'upg*', ['linux', 'openssh']) |
| 88 | } catch (Exception e) { |
| 89 | common.warningMsg(e) |
| 90 | } |
| 91 | try { |
| 92 | salt.runSaltProcessStep(master, 'upg*', 'state.sls', ["salt.minion"], null, true, 60) |
| 93 | } catch (Exception e) { |
| 94 | common.warningMsg(e) |
| 95 | } |
| 96 | try { |
| 97 | salt.enforceState(pepperEnv, 'upg*', ['ntp', 'rsyslog']) |
| 98 | } catch (Exception e) { |
| 99 | common.warningMsg(e) |
| 100 | } |
| 101 | salt.enforceState(pepperEnv, 'upg*', ['linux', 'openssh', 'salt.minion', 'ntp', 'rsyslog']) |
| 102 | |
| 103 | // salt "upg*" state.sls rabbitmq |
| 104 | salt.enforceState(pepperEnv, 'upg*', ['rabbitmq', 'memcached']) |
| 105 | try { |
| 106 | salt.enforceState(pepperEnv, 'I@backupninja:client', ['openssh.client', 'salt.minion']) |
| 107 | } catch (Exception e) { |
| 108 | common.warningMsg('salt-minion was restarted. We should continue to run') |
| 109 | } |
| 110 | try { |
| 111 | salt.enforceState(pepperEnv, 'I@backupninja:server', ['salt.minion']) |
| 112 | } catch (Exception e) { |
| 113 | common.warningMsg('salt-minion was restarted. We should continue to run') |
| 114 | } |
| 115 | // salt '*' state.apply salt.minion.grains |
| 116 | //salt.enforceState(pepperEnv, '*', 'salt.minion.grains') |
| 117 | // salt -C 'I@backupninja:server' state.sls backupninja |
| 118 | salt.enforceState(pepperEnv, 'I@backupninja:server', 'backupninja') |
| 119 | // salt -C 'I@backupninja:client' state.sls backupninja |
| 120 | salt.enforceState(pepperEnv, 'I@backupninja:client', 'backupninja') |
| 121 | salt.runSaltProcessStep(pepperEnv, 'I@backupninja:client', 'ssh.rm_known_host', ["root", "${backupninja_backup_host}"], null, true) |
| 122 | try { |
| 123 | salt.cmdRun(pepperEnv, 'I@backupninja:client', "arp -d ${backupninja_backup_host}") |
| 124 | } catch (Exception e) { |
| 125 | common.warningMsg('The ARP entry does not exist. We should continue to run.') |
| 126 | } |
| 127 | salt.runSaltProcessStep(pepperEnv, 'I@backupninja:client', 'ssh.set_known_host', ["root", "${backupninja_backup_host}"], null, true) |
| 128 | salt.cmdRun(pepperEnv, 'I@backupninja:client', 'backupninja -n --run /etc/backup.d/101.mysql') |
| 129 | salt.cmdRun(pepperEnv, 'I@backupninja:client', 'backupninja -n --run /etc/backup.d/200.backup.rsync > /tmp/backupninjalog') |
| 130 | |
| 131 | salt.enforceState(pepperEnv, 'I@xtrabackup:server', 'xtrabackup') |
| 132 | salt.enforceState(pepperEnv, 'I@xtrabackup:client', 'openssh.client') |
| 133 | salt.cmdRun(pepperEnv, 'I@xtrabackup:client', "su root -c 'salt-call state.sls xtrabackup'") |
| 134 | salt.cmdRun(pepperEnv, 'I@xtrabackup:client', "su root -c '/usr/local/bin/innobackupex-runner.sh'") |
| 135 | |
| 136 | def databases = salt.cmdRun(pepperEnv, 'I@mysql:client','salt-call mysql.db_list | grep upgrade | awk \'/-/ {print \$2}\'') |
| 137 | if(databases && databases != ""){ |
| 138 | def databasesList = databases['return'][0].values()[0].trim().tokenize("\n") |
| 139 | for( i = 0; i < databasesList.size(); i++){ |
| 140 | if(databasesList[i].toLowerCase().contains('upgrade')){ |
| 141 | salt.runSaltProcessStep(pepperEnv, 'I@mysql:client', 'mysql.db_remove', ["${databasesList[i]}"], null, true) |
| 142 | common.warningMsg("removing database ${databasesList[i]}") |
| 143 | salt.runSaltProcessStep(pepperEnv, 'I@mysql:client', 'file.remove', ["/root/mysql/flags/${databasesList[i]}-installed"], null, true) |
| 144 | } |
| 145 | } |
| 146 | salt.enforceState(pepperEnv, 'I@mysql:client', 'mysql.client') |
| 147 | }else{ |
| 148 | common.errorMsg("No _upgrade databases were returned") |
| 149 | } |
| 150 | |
| 151 | try { |
| 152 | salt.enforceState(pepperEnv, 'upg*', 'keystone.server') |
| 153 | salt.runSaltProcessStep(pepperEnv, 'upg*', 'service.restart', ['apache2'], null, true) |
| 154 | } catch (Exception e) { |
| 155 | common.warningMsg('Restarting Apache2') |
| 156 | salt.runSaltProcessStep(pepperEnv, 'upg*', 'service.restart', ['apache2'], null, true) |
| 157 | } |
| 158 | try { |
| 159 | salt.enforceState(pepperEnv, 'upg*', 'keystone.client') |
| 160 | } catch (Exception e) { |
| 161 | common.warningMsg('running keystone.client state again') |
| 162 | salt.enforceState(pepperEnv, 'upg*', 'keystone.client') |
| 163 | } |
| 164 | try { |
| 165 | salt.enforceState(pepperEnv, 'upg*', 'glance') |
| 166 | } catch (Exception e) { |
| 167 | common.warningMsg('running glance state again') |
| 168 | salt.enforceState(pepperEnv, 'upg*', 'glance') |
| 169 | } |
chnyda | 625f4b4 | 2017-10-11 14:10:31 +0200 | [diff] [blame] | 170 | salt.enforceState(pepperEnv, 'upg*', 'keystone.server') |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 171 | try { |
| 172 | salt.enforceState(pepperEnv, 'upg*', 'nova') |
| 173 | } catch (Exception e) { |
| 174 | common.warningMsg('running nova state again') |
| 175 | salt.enforceState(pepperEnv, 'upg*', 'nova') |
| 176 | } |
| 177 | // run nova state again as sometimes nova does not enforce itself for some reason |
| 178 | try { |
| 179 | salt.enforceState(pepperEnv, 'upg*', 'nova') |
| 180 | } catch (Exception e) { |
| 181 | common.warningMsg('running nova state again') |
| 182 | salt.enforceState(pepperEnv, 'upg*', 'nova') |
| 183 | } |
| 184 | try { |
| 185 | salt.enforceState(pepperEnv, 'upg*', 'cinder') |
| 186 | } catch (Exception e) { |
| 187 | common.warningMsg('running cinder state again') |
| 188 | salt.enforceState(pepperEnv, 'upg*', 'cinder') |
| 189 | } |
| 190 | try { |
| 191 | salt.enforceState(pepperEnv, 'upg*', 'neutron') |
| 192 | } catch (Exception e) { |
| 193 | common.warningMsg('running neutron state again') |
| 194 | salt.enforceState(pepperEnv, 'upg*', 'neutron') |
| 195 | } |
| 196 | try { |
| 197 | salt.enforceState(pepperEnv, 'upg*', 'heat') |
| 198 | } catch (Exception e) { |
| 199 | common.warningMsg('running heat state again') |
| 200 | salt.enforceState(pepperEnv, 'upg*', 'heat') |
| 201 | } |
| 202 | salt.cmdRun(pepperEnv, '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') |
Ruslan Kamaldinov | 6feef40 | 2017-08-02 16:55:58 +0400 | [diff] [blame] | 203 | |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 204 | if (STAGE_TEST_UPGRADE.toBoolean() == true && STAGE_REAL_UPGRADE.toBoolean() == true) { |
| 205 | stage('Ask for manual confirmation') { |
| 206 | input message: "Do you want to continue with upgrade?" |
| 207 | } |
Jiri Broulik | 3792c96 | 2017-05-17 18:26:36 +0200 | [diff] [blame] | 208 | } |
Ruslan Kamaldinov | 6feef40 | 2017-08-02 16:55:58 +0400 | [diff] [blame] | 209 | } |
| 210 | } |
Ruslan Kamaldinov | 6feef40 | 2017-08-02 16:55:58 +0400 | [diff] [blame] | 211 | |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 212 | if (STAGE_REAL_UPGRADE.toBoolean() == true) { |
| 213 | stage('Real upgrade') { |
| 214 | // # actual upgrade |
Ruslan Kamaldinov | 6feef40 | 2017-08-02 16:55:58 +0400 | [diff] [blame] | 215 | |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 216 | def domain = salt.getPillar(pepperEnv, 'I@salt:master', '_param:cluster_domain') |
| 217 | domain = domain['return'][0].values()[0] |
Ruslan Kamaldinov | 6feef40 | 2017-08-02 16:55:58 +0400 | [diff] [blame] | 218 | |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 219 | _pillar = salt.getGrain(pepperEnv, 'I@salt:control', 'id') |
| 220 | kvm01 = _pillar['return'][0].values()[0].values()[0] |
| 221 | print(_pillar) |
| 222 | print(kvm01) |
Ruslan Kamaldinov | 6feef40 | 2017-08-02 16:55:58 +0400 | [diff] [blame] | 223 | |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 224 | def errorOccured = false |
Ruslan Kamaldinov | 6feef40 | 2017-08-02 16:55:58 +0400 | [diff] [blame] | 225 | |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 226 | def proxy_general_target = "" |
| 227 | def proxy_target_hosts = salt.getMinions(pepperEnv, 'I@horizon:server').sort() |
| 228 | def node_count = 1 |
Ruslan Kamaldinov | 6feef40 | 2017-08-02 16:55:58 +0400 | [diff] [blame] | 229 | |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 230 | for (t in proxy_target_hosts) { |
| 231 | def target = t.split("\\.")[0] |
| 232 | proxy_general_target = target.replaceAll('\\d+$', "") |
| 233 | if (SKIP_VM_RELAUNCH.toBoolean() == true) { |
| 234 | break |
| 235 | } |
| 236 | _pillar = salt.getPillar(pepperEnv, "${kvm01}", "salt:control:cluster:internal:node:prx0${node_count}:provider") |
| 237 | def nodeProvider = _pillar['return'][0].values()[0] |
| 238 | salt.runSaltProcessStep(pepperEnv, "${nodeProvider}", 'virt.destroy', ["${target}.${domain}"], null, true) |
| 239 | sleep(2) |
| 240 | try { |
| 241 | salt.cmdRun(pepperEnv, "${nodeProvider}", "[ ! -f /root/${target}.${domain}.qcow2.bak ] && cp /var/lib/libvirt/images/${target}.${domain}/system.qcow2 ./${target}.${domain}.qcow2.bak") |
| 242 | } catch (Exception e) { |
| 243 | common.warningMsg('File already exists') |
| 244 | } |
| 245 | salt.runSaltProcessStep(pepperEnv, "${nodeProvider}", 'virt.undefine', ["${target}.${domain}"], null, true) |
| 246 | try { |
| 247 | salt.cmdRun(pepperEnv, 'I@salt:master', "salt-key -d ${target}.${domain} -y") |
| 248 | } catch (Exception e) { |
| 249 | common.warningMsg('does not match any accepted, unaccepted or rejected keys. They were probably already removed. We should continue to run') |
| 250 | } |
| 251 | node_count++ |
Jiri Broulik | 7cadf58 | 2017-11-13 17:35:31 +0100 | [diff] [blame] | 252 | } |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 253 | def control_general_target = "" |
| 254 | def control_target_hosts = salt.getMinions(pepperEnv, 'I@keystone:server and not upg*').sort() |
| 255 | node_count = 1 |
Ruslan Kamaldinov | 6feef40 | 2017-08-02 16:55:58 +0400 | [diff] [blame] | 256 | |
Jiri Broulik | 7cadf58 | 2017-11-13 17:35:31 +0100 | [diff] [blame] | 257 | for (t in control_target_hosts) { |
| 258 | def target = t.split("\\.")[0] |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 259 | control_general_target = target.replaceAll('\\d+$', "") |
| 260 | if (SKIP_VM_RELAUNCH.toBoolean() == true) { |
| 261 | break |
| 262 | } |
| 263 | _pillar = salt.getPillar(pepperEnv, "${kvm01}", "salt:control:cluster:internal:node:ctl0${node_count}:provider") |
| 264 | def nodeProvider = _pillar['return'][0].values()[0] |
| 265 | salt.runSaltProcessStep(pepperEnv, "${nodeProvider}", 'virt.destroy', ["${target}.${domain}"], null, true) |
| 266 | sleep(2) |
| 267 | try { |
| 268 | salt.cmdRun(pepperEnv, "${nodeProvider}", "[ ! -f /root/${target}.${domain}.qcow2.bak ] && cp /var/lib/libvirt/images/${target}.${domain}/system.qcow2 ./${target}.${domain}.qcow2.bak") |
| 269 | } catch (Exception e) { |
| 270 | common.warningMsg('File already exists') |
| 271 | } |
| 272 | salt.runSaltProcessStep(pepperEnv, "${nodeProvider}", 'virt.undefine', ["${target}.${domain}"], null, true) |
| 273 | try { |
| 274 | salt.cmdRun(pepperEnv, 'I@salt:master', "salt-key -d ${target}.${domain} -y") |
| 275 | } catch (Exception e) { |
| 276 | common.warningMsg('does not match any accepted, unaccepted or rejected keys. They were probably already removed. We should continue to run') |
| 277 | } |
| 278 | node_count++ |
Jiri Broulik | 7cadf58 | 2017-11-13 17:35:31 +0100 | [diff] [blame] | 279 | } |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 280 | |
| 281 | if (SKIP_VM_RELAUNCH.toBoolean() == false) { |
| 282 | salt.cmdRun(pepperEnv, 'I@xtrabackup:client', "su root -c '/usr/local/bin/innobackupex-runner.sh'") |
| 283 | |
| 284 | // salt 'kvm*' state.sls salt.control |
| 285 | salt.enforceState(pepperEnv, 'I@salt:control', 'salt.control') |
| 286 | |
| 287 | for (t in control_target_hosts) { |
| 288 | def target = t.split("\\.")[0] |
| 289 | // wait until ctl and prx nodes are registered in salt-key |
| 290 | salt.minionPresent(pepperEnv, 'I@salt:master', "${target}") |
| 291 | } |
| 292 | for (t in proxy_target_hosts) { |
| 293 | def target = t.split("\\.")[0] |
| 294 | // wait until ctl and prx nodes are registered in salt-key |
| 295 | salt.minionPresent(pepperEnv, 'I@salt:master', "${target}") |
| 296 | } |
| 297 | |
| 298 | // salt '*' saltutil.refresh_pillar |
| 299 | salt.runSaltProcessStep(pepperEnv, '*', 'saltutil.refresh_pillar', [], null, true) |
| 300 | // salt '*' saltutil.sync_all |
| 301 | salt.runSaltProcessStep(pepperEnv, '*', 'saltutil.sync_all', [], null, true) |
| 302 | } |
| 303 | try { |
| 304 | salt.enforceState(pepperEnv, "${proxy_general_target}* or ${control_general_target}*", ['linux', 'openssh']) |
| 305 | } catch (Exception e) { |
| 306 | common.warningMsg(e) |
| 307 | } |
| 308 | try { |
| 309 | salt.runSaltProcessStep(master, "${proxy_general_target}* or ${control_general_target}*", 'state.sls', ["salt.minion"], null, true, 60) |
| 310 | } catch (Exception e) { |
| 311 | common.warningMsg(e) |
| 312 | } |
| 313 | try { |
| 314 | salt.enforceState(pepperEnv, "${proxy_general_target}* or ${control_general_target}*", ['ntp', 'rsyslog']) |
| 315 | } catch (Exception e) { |
| 316 | common.warningMsg(e) |
| 317 | } |
| 318 | |
| 319 | salt.enforceState(pepperEnv, "${proxy_general_target}* or ${control_general_target}*", ['linux', 'openssh', 'salt.minion', 'ntp', 'rsyslog']) |
| 320 | |
| 321 | // salt 'ctl*' state.sls keepalived |
| 322 | // salt 'ctl*' state.sls haproxy |
| 323 | salt.enforceState(pepperEnv, "${control_general_target}*", ['keepalived', 'haproxy']) |
| 324 | // salt 'ctl*' service.restart rsyslog |
| 325 | salt.runSaltProcessStep(pepperEnv, "${control_general_target}*", 'service.restart', ['rsyslog'], null, true) |
| 326 | // salt "ctl*" state.sls memcached |
| 327 | // salt "ctl*" state.sls keystone.server |
| 328 | try { |
| 329 | try { |
| 330 | salt.enforceState(pepperEnv, "${control_general_target}*", ['memcached', 'keystone.server']) |
| 331 | salt.runSaltProcessStep(pepperEnv, "${control_general_target}*", 'service.restart', ['apache2'], null, true) |
| 332 | } catch (Exception e) { |
| 333 | common.warningMsg('Restarting Apache2 and enforcing keystone.server state again') |
| 334 | salt.runSaltProcessStep(pepperEnv, "${control_general_target}*", 'service.restart', ['apache2'], null, true) |
| 335 | salt.enforceState(pepperEnv, "${control_general_target}*", 'keystone.server') |
| 336 | } |
| 337 | // salt 'ctl01*' state.sls keystone.client |
| 338 | try { |
| 339 | salt.enforceState(pepperEnv, "I@keystone:client and ${control_general_target}*", 'keystone.client') |
| 340 | } catch (Exception e) { |
| 341 | common.warningMsg('running keystone.client state again') |
| 342 | salt.enforceState(pepperEnv, "I@keystone:client and ${control_general_target}*", 'keystone.client') |
| 343 | } |
| 344 | try { |
| 345 | salt.enforceState(pepperEnv, "${control_general_target}*", 'glance') |
| 346 | } catch (Exception e) { |
| 347 | common.warningMsg('running glance state again') |
| 348 | salt.enforceState(pepperEnv, "${control_general_target}*", 'glance') |
| 349 | } // salt 'ctl*' state.sls glusterfs.client |
| 350 | salt.enforceState(pepperEnv, "${control_general_target}*", 'glusterfs.client') |
| 351 | // salt 'ctl*' state.sls keystone.server |
| 352 | salt.enforceState(pepperEnv, "${control_general_target}*", 'keystone.server') |
| 353 | // salt 'ctl*' state.sls nova |
| 354 | try { |
| 355 | salt.enforceState(pepperEnv, "${control_general_target}*", 'nova') |
| 356 | } catch (Exception e) { |
| 357 | common.warningMsg('running nova state again') |
| 358 | salt.enforceState(pepperEnv, "${control_general_target}*", 'nova') |
| 359 | } |
| 360 | // salt 'ctl*' state.sls cinder |
| 361 | try { |
| 362 | salt.enforceState(pepperEnv, "${control_general_target}*", 'cinder') |
| 363 | } catch (Exception e) { |
| 364 | common.warningMsg('running cinder state again') |
| 365 | salt.enforceState(pepperEnv, "${control_general_target}*", 'cinder') |
| 366 | } |
| 367 | try { |
| 368 | salt.enforceState(pepperEnv, "${control_general_target}*", 'neutron') |
| 369 | } catch (Exception e) { |
| 370 | common.warningMsg('running neutron state again') |
| 371 | salt.enforceState(pepperEnv, "${control_general_target}*", 'neutron') |
| 372 | } |
| 373 | // salt 'ctl*' state.sls heat |
| 374 | try { |
| 375 | salt.enforceState(pepperEnv, "${control_general_target}*", 'heat') |
| 376 | } catch (Exception e) { |
| 377 | common.warningMsg('running heat state again') |
| 378 | salt.enforceState(pepperEnv, "${control_general_target}*", 'heat') |
| 379 | } |
| 380 | |
| 381 | } catch (Exception e) { |
| 382 | errorOccured = true |
| 383 | input message: "Some states that require syncdb failed. Please check the reason and click proceed only if you want to restore database into it's pre-upgrade state. Otherwise, click abort." |
| 384 | common.warningMsg('Some states that require syncdb failed. Restoring production databases') |
| 385 | |
| 386 | // database restore section |
| 387 | try { |
| 388 | salt.runSaltProcessStep(pepperEnv, 'I@galera:slave', 'service.stop', ['mysql'], null, true) |
| 389 | } catch (Exception er) { |
| 390 | common.warningMsg('Mysql service already stopped') |
| 391 | } |
| 392 | try { |
| 393 | salt.runSaltProcessStep(pepperEnv, 'I@galera:master', 'service.stop', ['mysql'], null, true) |
| 394 | } catch (Exception er) { |
| 395 | common.warningMsg('Mysql service already stopped') |
| 396 | } |
| 397 | try { |
| 398 | salt.cmdRun(pepperEnv, 'I@galera:slave', "rm /var/lib/mysql/ib_logfile*") |
| 399 | } catch (Exception er) { |
| 400 | common.warningMsg('Files are not present') |
| 401 | } |
| 402 | try { |
| 403 | salt.cmdRun(pepperEnv, 'I@galera:master', "mkdir /root/mysql/mysql.bak") |
| 404 | } catch (Exception er) { |
| 405 | common.warningMsg('Directory already exists') |
| 406 | } |
| 407 | try { |
| 408 | salt.cmdRun(pepperEnv, 'I@galera:master', "rm -rf /root/mysql/mysql.bak/*") |
| 409 | } catch (Exception er) { |
| 410 | common.warningMsg('Directory already empty') |
| 411 | } |
| 412 | try { |
| 413 | salt.cmdRun(pepperEnv, 'I@galera:master', "mv /var/lib/mysql/* /root/mysql/mysql.bak") |
| 414 | } catch (Exception er) { |
| 415 | common.warningMsg('Files were already moved') |
| 416 | } |
| 417 | try { |
| 418 | salt.runSaltProcessStep(pepperEnv, 'I@galera:master', 'file.remove', ["/var/lib/mysql/.galera_bootstrap"], null, true) |
| 419 | } catch (Exception er) { |
| 420 | common.warningMsg('File is not present') |
| 421 | } |
| 422 | salt.cmdRun(pepperEnv, 'I@galera:master', "sed -i '/gcomm/c\\wsrep_cluster_address=\"gcomm://\"' /etc/mysql/my.cnf") |
| 423 | _pillar = salt.getPillar(pepperEnv, "I@galera:master", 'xtrabackup:client:backup_dir') |
| 424 | backup_dir = _pillar['return'][0].values()[0] |
| 425 | if(backup_dir == null || backup_dir.isEmpty()) { backup_dir='/var/backups/mysql/xtrabackup' } |
| 426 | print(backup_dir) |
| 427 | salt.runSaltProcessStep(pepperEnv, 'I@galera:master', 'file.remove', ["${backup_dir}/dbrestored"], null, true) |
| 428 | salt.cmdRun(pepperEnv, 'I@xtrabackup:client', "su root -c 'salt-call state.sls xtrabackup'") |
| 429 | salt.runSaltProcessStep(pepperEnv, 'I@galera:master', 'service.start', ['mysql'], null, true) |
| 430 | |
| 431 | // wait until mysql service on galera master is up |
| 432 | salt.commandStatus(pepperEnv, 'I@galera:master', 'service mysql status', 'running') |
| 433 | |
| 434 | salt.runSaltProcessStep(pepperEnv, 'I@galera:slave', 'service.start', ['mysql'], null, true) |
| 435 | // |
| 436 | |
| 437 | common.errorMsg("Stage Real control upgrade failed") |
| 438 | } |
| 439 | if(!errorOccured){ |
| 440 | |
| 441 | ceph = null |
| 442 | |
| 443 | try { |
| 444 | ceph = salt.cmdRun(pepperEnv, "${control_general_target}*", "salt-call grains.item roles | grep ceph.client") |
| 445 | |
| 446 | } catch (Exception er) { |
| 447 | common.infoMsg("Ceph is not used") |
| 448 | } |
| 449 | |
| 450 | if(ceph != null) { |
| 451 | try { |
| 452 | salt.enforceState(pepperEnv, "${control_general_target}*", 'ceph.client') |
| 453 | } catch (Exception er) { |
| 454 | common.warningMsg("Ceph client state on controllers failed. Please fix it manually") |
| 455 | } |
| 456 | } |
| 457 | |
| 458 | // salt 'cmp*' cmd.run 'service nova-compute restart' |
| 459 | salt.runSaltProcessStep(pepperEnv, 'I@nova:compute', 'service.restart', ['nova-compute'], null, true) |
| 460 | salt.runSaltProcessStep(pepperEnv, "${control_general_target}*", 'service.restart', ['nova-conductor'], null, true) |
| 461 | salt.runSaltProcessStep(pepperEnv, "${control_general_target}*", 'service.restart', ['nova-scheduler'], null, true) |
| 462 | |
| 463 | |
| 464 | // salt 'prx*' state.sls linux,openssh,salt.minion,ntp,rsyslog |
| 465 | // salt 'ctl*' state.sls keepalived |
| 466 | // salt 'prx*' state.sls keepalived |
| 467 | salt.enforceState(pepperEnv, "${proxy_general_target}*", 'keepalived') |
| 468 | // salt 'prx*' state.sls horizon |
| 469 | salt.enforceState(pepperEnv, "${proxy_general_target}*", 'horizon') |
| 470 | // salt 'prx*' state.sls nginx |
| 471 | salt.enforceState(pepperEnv, "${proxy_general_target}*", 'nginx') |
| 472 | // salt "prx*" state.sls memcached |
| 473 | salt.enforceState(pepperEnv, "${proxy_general_target}*", 'memcached') |
| 474 | |
| 475 | try { |
| 476 | salt.enforceHighstate(pepperEnv, "${control_general_target}*") |
| 477 | } catch (Exception er) { |
| 478 | common.errorMsg("Highstate was executed on controller nodes but something failed. Please check it and fix it accordingly.") |
| 479 | } |
| 480 | |
| 481 | try { |
| 482 | salt.enforceHighstate(pepperEnv, "${proxy_general_target}*") |
| 483 | } catch (Exception er) { |
| 484 | common.errorMsg("Highstate was executed on proxy nodes but something failed. Please check it and fix it accordingly.") |
| 485 | } |
| 486 | |
| 487 | salt.cmdRun(pepperEnv, "${control_general_target}01*", '. /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') |
| 488 | } |
| 489 | } |
| 490 | |
| 491 | if (STAGE_REAL_UPGRADE.toBoolean() == true && STAGE_ROLLBACK_UPGRADE.toBoolean() == true) { |
| 492 | stage('Ask for manual confirmation') { |
| 493 | input message: "Please verify if the 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?" |
| 494 | } |
| 495 | } |
| 496 | } |
| 497 | |
| 498 | if (STAGE_ROLLBACK_UPGRADE.toBoolean() == true) { |
| 499 | stage('Rollback upgrade') { |
| 500 | |
| 501 | stage('Ask for manual confirmation') { |
| 502 | input message: "Do you really want to continue with the rollback?" |
| 503 | } |
| 504 | |
| 505 | def domain = salt.getPillar(pepperEnv, 'I@salt:master', '_param:cluster_domain') |
| 506 | domain = domain['return'][0].values()[0] |
| 507 | |
| 508 | _pillar = salt.getGrain(pepperEnv, 'I@salt:control', 'id') |
| 509 | kvm01 = _pillar['return'][0].values()[0].values()[0] |
| 510 | print(_pillar) |
| 511 | print(kvm01) |
| 512 | |
| 513 | def proxy_general_target = "" |
| 514 | def proxy_target_hosts = salt.getMinions(pepperEnv, 'I@horizon:server') |
| 515 | def node_count = 1 |
| 516 | |
Jiri Broulik | 7cadf58 | 2017-11-13 17:35:31 +0100 | [diff] [blame] | 517 | for (t in proxy_target_hosts) { |
| 518 | def target = t.split("\\.")[0] |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 519 | proxy_general_target = target.replaceAll('\\d+$', "") |
| 520 | if (SKIP_VM_RELAUNCH.toBoolean() == true) { |
| 521 | break |
| 522 | } |
| 523 | _pillar = salt.getPillar(pepperEnv, "${kvm01}", "salt:control:cluster:internal:node:prx0${node_count}:provider") |
| 524 | def nodeProvider = _pillar['return'][0].values()[0] |
| 525 | salt.runSaltProcessStep(pepperEnv, "${nodeProvider}", 'virt.destroy', ["${target}.${domain}"], null, true) |
| 526 | sleep(2) |
| 527 | salt.runSaltProcessStep(pepperEnv, "${nodeProvider}", 'file.copy', ["/root/${target}.${domain}.qcow2.bak", "/var/lib/libvirt/images/${target}.${domain}/system.qcow2"], null, true) |
| 528 | try { |
| 529 | salt.cmdRun(pepperEnv, 'I@salt:master', "salt-key -d ${target}.${domain} -y") |
| 530 | } catch (Exception e) { |
| 531 | common.warningMsg('does not match any accepted, unaccepted or rejected keys. They were probably already removed. We should continue to run') |
| 532 | } |
| 533 | node_count++ |
Jiri Broulik | 7cadf58 | 2017-11-13 17:35:31 +0100 | [diff] [blame] | 534 | } |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 535 | def control_general_target = "" |
| 536 | def control_target_hosts = salt.getMinions(pepperEnv, 'I@keystone:server').sort() |
| 537 | node_count = 1 |
Jiri Broulik | 7cadf58 | 2017-11-13 17:35:31 +0100 | [diff] [blame] | 538 | |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 539 | for (t in control_target_hosts) { |
| 540 | def target = t.split("\\.")[0] |
| 541 | control_general_target = target.replaceAll('\\d+$', "") |
| 542 | if (SKIP_VM_RELAUNCH.toBoolean() == true) { |
| 543 | break |
| 544 | } |
| 545 | _pillar = salt.getPillar(pepperEnv, "${kvm01}", "salt:control:cluster:internal:node:ctl0${node_count}:provider") |
| 546 | def nodeProvider = _pillar['return'][0].values()[0] |
| 547 | salt.runSaltProcessStep(pepperEnv, "${nodeProvider}", 'virt.destroy', ["${target}.${domain}"], null, true) |
| 548 | sleep(2) |
| 549 | salt.runSaltProcessStep(pepperEnv, "${nodeProvider}", 'file.copy', ["/root/${target}.${domain}.qcow2.bak", "/var/lib/libvirt/images/${target}.${domain}/system.qcow2"], null, true) |
| 550 | try { |
| 551 | salt.cmdRun(pepperEnv, 'I@salt:master', "salt-key -d ${target}.${domain} -y") |
| 552 | } catch (Exception e) { |
| 553 | common.warningMsg('does not match any accepted, unaccepted or rejected keys. They were probably already removed. We should continue to run') |
| 554 | } |
| 555 | node_count++ |
Ruslan Kamaldinov | 6feef40 | 2017-08-02 16:55:58 +0400 | [diff] [blame] | 556 | } |
Jiri Broulik | 3792c96 | 2017-05-17 18:26:36 +0200 | [diff] [blame] | 557 | |
Jiri Broulik | 00d0109 | 2017-06-01 19:38:15 +0200 | [diff] [blame] | 558 | // database restore section |
| 559 | try { |
chnyda | 625f4b4 | 2017-10-11 14:10:31 +0200 | [diff] [blame] | 560 | salt.runSaltProcessStep(pepperEnv, 'I@galera:slave', 'service.stop', ['mysql'], null, true) |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 561 | } catch (Exception e) { |
Jiri Broulik | 00d0109 | 2017-06-01 19:38:15 +0200 | [diff] [blame] | 562 | common.warningMsg('Mysql service already stopped') |
Jiri Broulik | 3792c96 | 2017-05-17 18:26:36 +0200 | [diff] [blame] | 563 | } |
Jiri Broulik | 00d0109 | 2017-06-01 19:38:15 +0200 | [diff] [blame] | 564 | try { |
chnyda | 625f4b4 | 2017-10-11 14:10:31 +0200 | [diff] [blame] | 565 | salt.runSaltProcessStep(pepperEnv, 'I@galera:master', 'service.stop', ['mysql'], null, true) |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 566 | } catch (Exception e) { |
Jiri Broulik | 00d0109 | 2017-06-01 19:38:15 +0200 | [diff] [blame] | 567 | common.warningMsg('Mysql service already stopped') |
| 568 | } |
| 569 | try { |
chnyda | 625f4b4 | 2017-10-11 14:10:31 +0200 | [diff] [blame] | 570 | salt.cmdRun(pepperEnv, 'I@galera:slave', "rm /var/lib/mysql/ib_logfile*") |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 571 | } catch (Exception e) { |
Jiri Broulik | 00d0109 | 2017-06-01 19:38:15 +0200 | [diff] [blame] | 572 | common.warningMsg('Files are not present') |
| 573 | } |
| 574 | try { |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 575 | salt.cmdRun(pepperEnv, 'I@galera:master', "rm -rf /var/lib/mysql/*") |
| 576 | } catch (Exception e) { |
Jiri Broulik | 00d0109 | 2017-06-01 19:38:15 +0200 | [diff] [blame] | 577 | common.warningMsg('Directory already empty') |
| 578 | } |
| 579 | try { |
chnyda | 625f4b4 | 2017-10-11 14:10:31 +0200 | [diff] [blame] | 580 | salt.runSaltProcessStep(pepperEnv, 'I@galera:master', 'file.remove', ["/var/lib/mysql/.galera_bootstrap"], null, true) |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 581 | } catch (Exception e) { |
Jiri Broulik | 00d0109 | 2017-06-01 19:38:15 +0200 | [diff] [blame] | 582 | common.warningMsg('File is not present') |
| 583 | } |
chnyda | 625f4b4 | 2017-10-11 14:10:31 +0200 | [diff] [blame] | 584 | salt.cmdRun(pepperEnv, 'I@galera:master', "sed -i '/gcomm/c\\wsrep_cluster_address=\"gcomm://\"' /etc/mysql/my.cnf") |
| 585 | _pillar = salt.getPillar(pepperEnv, "I@galera:master", 'xtrabackup:client:backup_dir') |
Jiri Broulik | 00d0109 | 2017-06-01 19:38:15 +0200 | [diff] [blame] | 586 | backup_dir = _pillar['return'][0].values()[0] |
| 587 | if(backup_dir == null || backup_dir.isEmpty()) { backup_dir='/var/backups/mysql/xtrabackup' } |
| 588 | print(backup_dir) |
chnyda | 625f4b4 | 2017-10-11 14:10:31 +0200 | [diff] [blame] | 589 | salt.runSaltProcessStep(pepperEnv, 'I@galera:master', 'file.remove', ["${backup_dir}/dbrestored"], null, true) |
| 590 | salt.cmdRun(pepperEnv, 'I@xtrabackup:client', "su root -c 'salt-call state.sls xtrabackup'") |
| 591 | salt.runSaltProcessStep(pepperEnv, 'I@galera:master', 'service.start', ['mysql'], null, true) |
Jiri Broulik | 8dabbfd | 2017-07-25 10:49:45 +0200 | [diff] [blame] | 592 | |
| 593 | // wait until mysql service on galera master is up |
chnyda | 625f4b4 | 2017-10-11 14:10:31 +0200 | [diff] [blame] | 594 | salt.commandStatus(pepperEnv, 'I@galera:master', 'service mysql status', 'running') |
Jiri Broulik | 8dabbfd | 2017-07-25 10:49:45 +0200 | [diff] [blame] | 595 | |
chnyda | 625f4b4 | 2017-10-11 14:10:31 +0200 | [diff] [blame] | 596 | salt.runSaltProcessStep(pepperEnv, 'I@galera:slave', 'service.start', ['mysql'], null, true) |
Jiri Broulik | 00d0109 | 2017-06-01 19:38:15 +0200 | [diff] [blame] | 597 | // |
Jiri Broulik | 3792c96 | 2017-05-17 18:26:36 +0200 | [diff] [blame] | 598 | |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 599 | node_count = 1 |
| 600 | for (t in control_target_hosts) { |
| 601 | def target = t.split("\\.")[0] |
| 602 | _pillar = salt.getPillar(pepperEnv, "${kvm01}", "salt:control:cluster:internal:node:ctl0${node_count}:provider") |
| 603 | def nodeProvider = _pillar['return'][0].values()[0] |
| 604 | salt.runSaltProcessStep(pepperEnv, "${nodeProvider}", 'virt.start', ["${target}.${domain}"], null, true) |
| 605 | node_count++ |
Ruslan Kamaldinov | 6feef40 | 2017-08-02 16:55:58 +0400 | [diff] [blame] | 606 | } |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 607 | node_count = 1 |
| 608 | for (t in proxy_target_hosts) { |
| 609 | def target = t.split("\\.")[0] |
| 610 | _pillar = salt.getPillar(pepperEnv, "${kvm01}", "salt:control:cluster:internal:node:prx0${node_count}:provider") |
| 611 | def nodeProvider = _pillar['return'][0].values()[0] |
| 612 | salt.runSaltProcessStep(pepperEnv, "${nodeProvider}", 'virt.start', ["${target}.${domain}"], null, true) |
| 613 | node_count++ |
Ruslan Kamaldinov | 6feef40 | 2017-08-02 16:55:58 +0400 | [diff] [blame] | 614 | } |
Jiri Broulik | 3792c96 | 2017-05-17 18:26:36 +0200 | [diff] [blame] | 615 | |
| 616 | // salt 'cmp*' cmd.run 'service nova-compute restart' |
Jiri Broulik | 3f5ed1a | 2017-11-10 17:35:52 +0100 | [diff] [blame] | 617 | salt.runSaltProcessStep(pepperEnv, 'I@nova:compute', 'service.restart', ['nova-compute'], null, true) |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 618 | |
| 619 | for (t in control_target_hosts) { |
| 620 | def target = t.split("\\.")[0] |
| 621 | salt.minionPresent(pepperEnv, 'I@salt:master', "${target}") |
| 622 | } |
| 623 | for (t in proxy_target_hosts) { |
| 624 | def target = t.split("\\.")[0] |
| 625 | salt.minionPresent(pepperEnv, 'I@salt:master', "${target}") |
| 626 | } |
| 627 | |
Jiri Broulik | 3f5ed1a | 2017-11-10 17:35:52 +0100 | [diff] [blame] | 628 | salt.runSaltProcessStep(pepperEnv, "${control_general_target}*", 'service.restart', ['nova-conductor'], null, true) |
| 629 | salt.runSaltProcessStep(pepperEnv, "${control_general_target}*", 'service.restart', ['nova-scheduler'], null, true) |
Jiri Broulik | f20c767 | 2017-06-19 21:20:52 +0200 | [diff] [blame] | 630 | |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 631 | salt.cmdRun(pepperEnv, "${control_general_target}01*", '. /root/keystonerc; nova service-list; glance image-list; nova flavor-list; nova hypervisor-list; nova list; neutron net-list; cinder list; heat service-list') |
Ruslan Kamaldinov | 6feef40 | 2017-08-02 16:55:58 +0400 | [diff] [blame] | 632 | } |
| 633 | } |
| 634 | } |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 635 | } |