Jiri Broulik | dc87d72 | 2017-11-03 15:43:22 +0100 | [diff] [blame] | 1 | /** |
| 2 | * |
| 3 | * Upgrade Ceph mon/mgr/osd/rgw/client |
| 4 | * |
| 5 | * Requred parameters: |
| 6 | * SALT_MASTER_URL URL of Salt master |
| 7 | * SALT_MASTER_CREDENTIALS Credentials to the Salt API |
| 8 | * |
| 9 | * ADMIN_HOST Host (minion id) with admin keyring and /etc/crushmap file present |
| 10 | * CLUSTER_FLAGS Comma separated list of tags to apply to cluster |
| 11 | * WAIT_FOR_HEALTHY Wait for cluster rebalance before stoping daemons |
Denis Egorenko | 1c5db1d | 2021-01-11 15:24:45 +0400 | [diff] [blame] | 12 | * ASK_CONFIRMATION Ask for manual confirmation |
Jiri Broulik | dc87d72 | 2017-11-03 15:43:22 +0100 | [diff] [blame] | 13 | * ORIGIN_RELEASE Ceph release version before upgrade |
| 14 | * TARGET_RELEASE Ceph release version after upgrade |
| 15 | * STAGE_UPGRADE_MON Set to True if Ceph mon nodes upgrade is desired |
| 16 | * STAGE_UPGRADE_MGR Set to True if Ceph mgr nodes upgrade or new deploy is desired |
| 17 | * STAGE_UPGRADE_OSD Set to True if Ceph osd nodes upgrade is desired |
| 18 | * STAGE_UPGRADE_RGW Set to True if Ceph rgw nodes upgrade is desired |
| 19 | * STAGE_UPGRADE_CLIENT Set to True if Ceph client nodes upgrade is desired (includes for example ctl/cmp nodes) |
Michael Vollman | afe9152 | 2019-05-07 08:10:00 -0400 | [diff] [blame] | 20 | * STAGE_FINALIZE Set to True if configs recommended for TARGET_RELEASE should be set after upgrade is done |
| 21 | * BACKUP_ENABLED Select to copy the disks of Ceph VMs before upgrade and backup Ceph directories on OSD nodes |
| 22 | * BACKUP_DIR Select the target dir to backup to when BACKUP_ENABLED |
Jiri Broulik | dc87d72 | 2017-11-03 15:43:22 +0100 | [diff] [blame] | 23 | * |
| 24 | */ |
| 25 | |
| 26 | common = new com.mirantis.mk.Common() |
| 27 | salt = new com.mirantis.mk.Salt() |
| 28 | def python = new com.mirantis.mk.Python() |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 29 | ceph = new com.mirantis.mk.Ceph() |
Denis Egorenko | 1c5db1d | 2021-01-11 15:24:45 +0400 | [diff] [blame] | 30 | askConfirmation = (env.getProperty('ASK_CONFIRMATION') ?: true).toBoolean() |
Jiri Broulik | dc87d72 | 2017-11-03 15:43:22 +0100 | [diff] [blame] | 31 | |
Tomek Jaroszyk | b7c88d5 | 2020-08-18 10:21:54 +0200 | [diff] [blame] | 32 | pepperEnv = "pepperEnv" |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 33 | flags = CLUSTER_FLAGS.tokenize(',') |
Jiri Broulik | dc87d72 | 2017-11-03 15:43:22 +0100 | [diff] [blame] | 34 | |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 35 | def backup(master, target) { |
Jiri Broulik | 96c867a | 2017-11-07 16:14:10 +0100 | [diff] [blame] | 36 | stage("backup ${target}") { |
| 37 | |
Jiri Broulik | fd2dcaf | 2017-12-08 15:19:51 +0100 | [diff] [blame] | 38 | if (target == 'osd') { |
Jiri Broulik | 96c867a | 2017-11-07 16:14:10 +0100 | [diff] [blame] | 39 | try { |
Jiri Broulik | fd2dcaf | 2017-12-08 15:19:51 +0100 | [diff] [blame] | 40 | salt.enforceState(master, "I@ceph:${target}", "ceph.backup", true) |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 41 | salt.cmdRun(master, "I@ceph:${target}", "su root -c '/usr/local/bin/ceph-backup-runner-call.sh'") |
Jiri Broulik | 96c867a | 2017-11-07 16:14:10 +0100 | [diff] [blame] | 42 | } catch (Exception e) { |
Jiri Broulik | fd2dcaf | 2017-12-08 15:19:51 +0100 | [diff] [blame] | 43 | common.errorMsg(e) |
| 44 | common.errorMsg("Make sure Ceph backup on OSD nodes is enabled") |
| 45 | throw new InterruptedException() |
Jiri Broulik | 96c867a | 2017-11-07 16:14:10 +0100 | [diff] [blame] | 46 | } |
Jiri Broulik | fd2dcaf | 2017-12-08 15:19:51 +0100 | [diff] [blame] | 47 | } else { |
| 48 | def _pillar = salt.getGrain(master, 'I@salt:master', 'domain') |
| 49 | def domain = _pillar['return'][0].values()[0].values()[0] |
| 50 | |
| 51 | def kvm_pillar = salt.getGrain(master, 'I@salt:control', 'id') |
| 52 | def kvm01 = kvm_pillar['return'][0].values()[0].values()[0] |
| 53 | |
| 54 | def target_pillar = salt.getGrain(master, "I@ceph:${target}", 'host') |
| 55 | def minions = target_pillar['return'][0].values() |
| 56 | for (minion in minions) { |
| 57 | def minion_name = minion.values()[0] |
| 58 | def provider_pillar = salt.getPillar(master, "${kvm01}", "salt:control:cluster:internal:node:${minion_name}:provider") |
| 59 | def minionProvider = provider_pillar['return'][0].values()[0] |
| 60 | |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 61 | ceph.waitForHealthy(master, ADMIN_HOST, flags) |
Jiri Broulik | fd2dcaf | 2017-12-08 15:19:51 +0100 | [diff] [blame] | 62 | try { |
Michael Vollman | afe9152 | 2019-05-07 08:10:00 -0400 | [diff] [blame] | 63 | salt.cmdRun(master, "${minionProvider}", "[ ! -f ${BACKUP_DIR}/${minion_name}.${domain}.qcow2.bak ] && virsh destroy ${minion_name}.${domain}") |
Jiri Broulik | fd2dcaf | 2017-12-08 15:19:51 +0100 | [diff] [blame] | 64 | } catch (Exception e) { |
| 65 | common.warningMsg('Backup already exists') |
| 66 | } |
| 67 | try { |
Michael Vollman | afe9152 | 2019-05-07 08:10:00 -0400 | [diff] [blame] | 68 | salt.cmdRun(master, "${minionProvider}", "[ ! -f ${BACKUP_DIR}/${minion_name}.${domain}.qcow2.bak ] && cp /var/lib/libvirt/images/${minion_name}.${domain}/system.qcow2 ${BACKUP_DIR}/${minion_name}.${domain}.qcow2.bak") |
Jiri Broulik | fd2dcaf | 2017-12-08 15:19:51 +0100 | [diff] [blame] | 69 | } catch (Exception e) { |
| 70 | common.warningMsg('Backup already exists') |
| 71 | } |
| 72 | try { |
| 73 | salt.cmdRun(master, "${minionProvider}", "virsh start ${minion_name}.${domain}") |
| 74 | } catch (Exception e) { |
| 75 | common.warningMsg(e) |
| 76 | } |
| 77 | salt.minionsReachable(master, 'I@salt:master', "${minion_name}*") |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 78 | ceph.waitForHealthy(master, ADMIN_HOST, flags) |
Jiri Broulik | 96c867a | 2017-11-07 16:14:10 +0100 | [diff] [blame] | 79 | } |
Jiri Broulik | 96c867a | 2017-11-07 16:14:10 +0100 | [diff] [blame] | 80 | } |
| 81 | } |
| 82 | return |
| 83 | } |
| 84 | |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 85 | def upgrade(master, target) { |
Jiri Broulik | dc87d72 | 2017-11-03 15:43:22 +0100 | [diff] [blame] | 86 | |
| 87 | stage("Change ${target} repos") { |
| 88 | salt.runSaltProcessStep(master, "I@ceph:${target}", 'saltutil.refresh_pillar', [], null, true, 5) |
| 89 | salt.enforceState(master, "I@ceph:${target}", 'linux.system.repo', true) |
| 90 | } |
Jiri Broulik | dc87d72 | 2017-11-03 15:43:22 +0100 | [diff] [blame] | 91 | if (target == 'mgr') { |
| 92 | stage('Run ceph mgr state') { |
Tomek Jaroszyk | 933011a | 2020-04-07 11:20:31 +0200 | [diff] [blame] | 93 | salt.enforceState(master, "I@ceph:mgr", "ceph.mgr", true, failOnError=false, retries=3, retries_wait=10) |
Jiri Broulik | dc87d72 | 2017-11-03 15:43:22 +0100 | [diff] [blame] | 94 | } |
| 95 | } |
Jiri Broulik | dc87d72 | 2017-11-03 15:43:22 +0100 | [diff] [blame] | 96 | if (target == 'common') { |
| 97 | stage('Upgrade ceph-common pkgs') { |
Tomek Jaroszyk | 933011a | 2020-04-07 11:20:31 +0200 | [diff] [blame] | 98 | salt.runSaltProcessStep(master, "I@ceph:${target}", 'pkg.install', ["ceph-common"], 'only_upgrade=True') |
Jiri Broulik | dc87d72 | 2017-11-03 15:43:22 +0100 | [diff] [blame] | 99 | } |
| 100 | } else { |
Jiri Broulik | 96c867a | 2017-11-07 16:14:10 +0100 | [diff] [blame] | 101 | minions = salt.getMinions(master, "I@ceph:${target}") |
Jiri Broulik | dc87d72 | 2017-11-03 15:43:22 +0100 | [diff] [blame] | 102 | |
Jiri Broulik | 96c867a | 2017-11-07 16:14:10 +0100 | [diff] [blame] | 103 | for (minion in minions) { |
| 104 | // upgrade pkgs |
| 105 | if (target == 'radosgw') { |
| 106 | stage('Upgrade radosgw pkgs') { |
Tomek Jaroszyk | 933011a | 2020-04-07 11:20:31 +0200 | [diff] [blame] | 107 | salt.runSaltProcessStep(master, "I@ceph:${target}", 'pkg.install', [target], 'only_upgrade=True') |
Jiri Broulik | 96c867a | 2017-11-07 16:14:10 +0100 | [diff] [blame] | 108 | } |
| 109 | } else { |
| 110 | stage("Upgrade ${target} pkgs on ${minion}") { |
Tomek Jaroszyk | 933011a | 2020-04-07 11:20:31 +0200 | [diff] [blame] | 111 | salt.runSaltProcessStep(master, "${minion}", 'pkg.install', ["ceph-${target}"], 'only_upgrade=True') |
Jiri Broulik | 96c867a | 2017-11-07 16:14:10 +0100 | [diff] [blame] | 112 | } |
| 113 | } |
| 114 | // restart services |
| 115 | stage("Restart ${target} services on ${minion}") { |
Mateusz Los | c5de5c8 | 2020-05-11 10:37:23 +0200 | [diff] [blame] | 116 | if(target == 'osd') { |
Tomek Jaroszyk | 933011a | 2020-04-07 11:20:31 +0200 | [diff] [blame] | 117 | def ceph_disks = salt.getGrain(master, minion, 'ceph')['return'][0].values()[0].values()[0]['ceph_disk'] |
Mateusz Los | 80bb925 | 2020-02-06 13:33:42 +0100 | [diff] [blame] | 118 | ceph_disks.each { osd, param -> |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 119 | salt.cmdRun(master, "${minion}", "systemctl restart ceph-${target}@${osd}") |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 120 | } |
Mateusz Los | c5de5c8 | 2020-05-11 10:37:23 +0200 | [diff] [blame] | 121 | } |
| 122 | else { |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 123 | salt.cmdRun(master, "${minion}", "systemctl restart ceph-${target}.target") |
Mateusz Los | c5de5c8 | 2020-05-11 10:37:23 +0200 | [diff] [blame] | 124 | } |
| 125 | |
| 126 | ceph.waitForHealthy(master, ADMIN_HOST, flags) |
Jiri Broulik | 96c867a | 2017-11-07 16:14:10 +0100 | [diff] [blame] | 127 | } |
| 128 | |
| 129 | stage("Verify services for ${minion}") { |
| 130 | sleep(10) |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 131 | salt.cmdRun(master, "${minion}", "systemctl status ceph-${target}.target") |
Jiri Broulik | 96c867a | 2017-11-07 16:14:10 +0100 | [diff] [blame] | 132 | } |
| 133 | |
Denis Egorenko | 1c5db1d | 2021-01-11 15:24:45 +0400 | [diff] [blame] | 134 | stage('Verify Ceph status') { |
| 135 | salt.cmdRun(master, ADMIN_HOST, "ceph -s") |
| 136 | if (askConfirmation) { |
| 137 | input message: "From the verification command above, please check Ceph ${target} joined the cluster correctly. If so, Do you want to continue to upgrade next node?" |
| 138 | } |
Jiri Broulik | 96c867a | 2017-11-07 16:14:10 +0100 | [diff] [blame] | 139 | } |
Jiri Broulik | dc87d72 | 2017-11-03 15:43:22 +0100 | [diff] [blame] | 140 | } |
| 141 | } |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 142 | salt.cmdRun(master, ADMIN_HOST, "ceph versions") |
Jiri Broulik | dc87d72 | 2017-11-03 15:43:22 +0100 | [diff] [blame] | 143 | sleep(5) |
| 144 | return |
| 145 | } |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 146 | |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 147 | timeout(time: 12, unit: 'HOURS') { |
| 148 | node("python") { |
Jiri Broulik | dc87d72 | 2017-11-03 15:43:22 +0100 | [diff] [blame] | 149 | |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 150 | // create connection to salt master |
| 151 | python.setupPepperVirtualenv(pepperEnv, SALT_MASTER_URL, SALT_MASTER_CREDENTIALS) |
Jiri Broulik | dc87d72 | 2017-11-03 15:43:22 +0100 | [diff] [blame] | 152 | |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 153 | stage('Check user choices') { |
Alena Kiseleva | 30f780c | 2019-01-22 17:09:33 +0300 | [diff] [blame] | 154 | if (STAGE_UPGRADE_RGW.toBoolean() == true) { |
| 155 | // if rgw, check if other stuff has required version |
| 156 | def mon_ok = true |
| 157 | if (STAGE_UPGRADE_MON.toBoolean() == false) { |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 158 | def mon_v = salt.cmdRun(pepperEnv, ADMIN_HOST, "ceph mon versions")['return'][0].values()[0] |
Alena Kiseleva | 30f780c | 2019-01-22 17:09:33 +0300 | [diff] [blame] | 159 | mon_ok = mon_v.contains("${TARGET_RELEASE}") && !mon_v.contains("${ORIGIN_RELEASE}") |
| 160 | } |
| 161 | def mgr_ok = true |
| 162 | if (STAGE_UPGRADE_MGR.toBoolean() == false) { |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 163 | def mgr_v = salt.cmdRun(pepperEnv, ADMIN_HOST, "ceph mgr versions")['return'][0].values()[0] |
Alena Kiseleva | 30f780c | 2019-01-22 17:09:33 +0300 | [diff] [blame] | 164 | mgr_ok = mgr_v.contains("${TARGET_RELEASE}") && !mgr_v.contains("${ORIGIN_RELEASE}") |
| 165 | } |
| 166 | def osd_ok = true |
| 167 | if (STAGE_UPGRADE_OSD.toBoolean() == false) { |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 168 | def osd_v = salt.cmdRun(pepperEnv, ADMIN_HOST, "ceph osd versions")['return'][0].values()[0] |
Alena Kiseleva | 30f780c | 2019-01-22 17:09:33 +0300 | [diff] [blame] | 169 | osd_ok = osd_v.contains("${TARGET_RELEASE}") && !osd_v.contains("${ORIGIN_RELEASE}") |
| 170 | } |
| 171 | if (!mon_ok || !osd_ok || !mgr_ok) { |
| 172 | common.errorMsg('You may choose stages in any order, but RGW should be upgraded last') |
| 173 | throw new InterruptedException() |
| 174 | } |
| 175 | } |
| 176 | } |
| 177 | |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 178 | if (BACKUP_ENABLED.toBoolean() == true) { |
| 179 | if (STAGE_UPGRADE_MON.toBoolean() == true) { |
| 180 | backup(pepperEnv, 'mon') |
| 181 | } |
| 182 | if (STAGE_UPGRADE_RGW.toBoolean() == true) { |
| 183 | backup(pepperEnv, 'radosgw') |
| 184 | } |
| 185 | if (STAGE_UPGRADE_OSD.toBoolean() == true) { |
| 186 | backup(pepperEnv, 'osd') |
Jiri Broulik | dc87d72 | 2017-11-03 15:43:22 +0100 | [diff] [blame] | 187 | } |
| 188 | } |
Jiri Broulik | dc87d72 | 2017-11-03 15:43:22 +0100 | [diff] [blame] | 189 | |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 190 | if (flags.size() > 0) { |
| 191 | stage('Set cluster flags') { |
| 192 | for (flag in flags) { |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 193 | salt.cmdRun(pepperEnv, ADMIN_HOST, 'ceph osd set ' + flag) |
Jiri Broulik | dc87d72 | 2017-11-03 15:43:22 +0100 | [diff] [blame] | 194 | } |
PGlazov | 9085e84 | 2020-02-12 18:07:04 +0400 | [diff] [blame] | 195 | if (ORIGIN_RELEASE == 'jewel') { |
| 196 | salt.cmdRun(pepperEnv, ADMIN_HOST, 'ceph osd set sortbitwise') |
| 197 | } |
Jiri Broulik | dc87d72 | 2017-11-03 15:43:22 +0100 | [diff] [blame] | 198 | } |
| 199 | } |
Jiri Broulik | dc87d72 | 2017-11-03 15:43:22 +0100 | [diff] [blame] | 200 | |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 201 | if (STAGE_UPGRADE_MON.toBoolean() == true) { |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 202 | upgrade(pepperEnv, 'mon') |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 203 | } |
| 204 | |
| 205 | if (STAGE_UPGRADE_MGR.toBoolean() == true) { |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 206 | upgrade(pepperEnv, 'mgr') |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 207 | } |
| 208 | |
| 209 | if (STAGE_UPGRADE_OSD.toBoolean() == true) { |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 210 | upgrade(pepperEnv, 'osd') |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 211 | } |
| 212 | |
| 213 | if (STAGE_UPGRADE_RGW.toBoolean() == true) { |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 214 | upgrade(pepperEnv, 'radosgw') |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 215 | } |
| 216 | |
| 217 | if (STAGE_UPGRADE_CLIENT.toBoolean() == true) { |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 218 | upgrade(pepperEnv, 'common') |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 219 | } |
| 220 | |
| 221 | // remove cluster flags |
| 222 | if (flags.size() > 0) { |
| 223 | stage('Unset cluster flags') { |
| 224 | for (flag in flags) { |
| 225 | if (!flag.contains('sortbitwise')) { |
| 226 | common.infoMsg('Removing flag ' + flag) |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 227 | salt.cmdRun(pepperEnv, ADMIN_HOST, 'ceph osd unset ' + flag) |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 228 | } |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 229 | } |
Jiri Broulik | 96c867a | 2017-11-07 16:14:10 +0100 | [diff] [blame] | 230 | } |
Jiri Broulik | dc87d72 | 2017-11-03 15:43:22 +0100 | [diff] [blame] | 231 | } |
Jiri Broulik | dc87d72 | 2017-11-03 15:43:22 +0100 | [diff] [blame] | 232 | |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 233 | if (STAGE_FINALIZE.toBoolean() == true) { |
| 234 | stage("Finalize ceph version upgrade") { |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 235 | salt.cmdRun(pepperEnv, ADMIN_HOST, "ceph osd require-osd-release ${TARGET_RELEASE}") |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 236 | try { |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 237 | salt.cmdRun(pepperEnv, ADMIN_HOST, "ceph osd set-require-min-compat-client ${ORIGIN_RELEASE}") |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 238 | } catch (Exception e) { |
| 239 | common.warningMsg(e) |
| 240 | } |
| 241 | try { |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 242 | salt.cmdRun(pepperEnv, ADMIN_HOST, "ceph osd crush tunables optimal") |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 243 | } catch (Exception e) { |
| 244 | common.warningMsg(e) |
| 245 | } |
Tomek Jaroszyk | 933011a | 2020-04-07 11:20:31 +0200 | [diff] [blame] | 246 | if (TARGET_RELEASE == 'nautilus' ) { |
| 247 | salt.cmdRun(pepperEnv, ADMIN_HOST, "ceph mon enable-msgr2") |
| 248 | } |
Tomek Jaroszyk | d5d672f | 2020-09-17 15:34:05 +0200 | [diff] [blame] | 249 | salt.enforceState(pepperEnv, "I@ceph:common", "ceph.common") |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 250 | } |
| 251 | } |
| 252 | |
| 253 | // wait for healthy cluster |
Ivan Berezovskiy | 19c685a | 2019-11-05 17:42:57 +0400 | [diff] [blame] | 254 | if (WAIT_FOR_HEALTHY.toBoolean()) { |
| 255 | ceph.waitForHealthy(pepperEnv, ADMIN_HOST, flags) |
Jakub Josef | a63f986 | 2018-01-11 17:58:38 +0100 | [diff] [blame] | 256 | } |
Jiri Broulik | dc87d72 | 2017-11-03 15:43:22 +0100 | [diff] [blame] | 257 | } |
| 258 | } |