unset flags even if pipeline failed with a exception
Related-Prod: PROD-35064
Change-Id: I8e037852f93cdcb157b3ef77d2a58dd1de3bbe5b
diff --git a/ceph-add-osd-upmap.groovy b/ceph-add-osd-upmap.groovy
index f873534..52ccf1e 100644
--- a/ceph-add-osd-upmap.groovy
+++ b/ceph-add-osd-upmap.groovy
@@ -128,10 +128,8 @@
ceph.waitForHealthy(pepperEnv, "I@ceph:mon and I@ceph:common:keyring:admin", flags)
}
}
- catch (Throwable e) {
- // There was an error or exception thrown. Unset norebalance.
+ finally {
runCephCommand('ceph osd unset norebalance')['return'][0].values()[0]
- throw e
}
}
}