[shutdown/reboot] Verify if one or more ceph-mon units can get shut down or rebooted
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceph Monitor Charm |
In Progress
|
Undecided
|
Unassigned | ||
juju-verify |
Fix Released
|
Medium
|
Martin Kalcok |
Bug Description
* Command
juju verify reboot --units ceph-mon/0 [UNITS...]
juju verify shutdown --units ceph-mon/0 [ceph-mon/1 ...]
Expected behavior:
* "juju-verify" runs a “verify” action against ceph-mon
- Check if HEALTH_OK (reuse code from the “get-health” action)
- Check if removing this unit or units will mean that quorum is lost for ceph-mons, i.e. less than 50% remain online after the event.
- if either check returns false, verification is considered failed.
Ceph actions required:
* ceph-mon: get-health (already exists)
- Verify the cluster health
- New ceph-mon units shutdowns need HEALTH_OK
* ceph-mon: get-quorum-status (new)
- run `ceph quorum_status -f json` on the ceph-mon unit, save result as 'status'
- return a list of known mon names, from status[
- return a list of online mons, from status[
Related branches
- Robert Gildein: Approve
- 🤖 prod-jenkaas-bootstack: Approve (continuous-integration)
- Canonical BootStack DevOps Centre: Pending requested
- Canonical BootStack DevOps Centre: Pending requested
-
Diff: 460 lines (+306/-8)10 files modifieddocs/verifiers/ceph-mon.rst (+33/-0)
juju_verify/verifiers/__init__.py (+2/-1)
juju_verify/verifiers/ceph.py (+81/-1)
setup.cfg (+2/-1)
tests/functional/requirements.txt (+0/-0)
tests/functional/tests/bundles/ceph.yaml (+1/-1)
tests/functional/tests/bundles/hacluster.yaml (+1/-1)
tests/functional/tests/test_ceph.py (+29/-0)
tests/unit/verifiers/test_ceph.py (+156/-2)
tox.ini (+1/-1)
- Robert Gildein: Needs Fixing
- 🤖 prod-jenkaas-bootstack: Approve (continuous-integration)
- Canonical BootStack DevOps Centre: Pending requested
-
Diff: 378 lines (+196/-23) (has conflicts)7 files modifiedjuju_verify/verifiers/__init__.py (+2/-1)
juju_verify/verifiers/ceph.py (+74/-3)
tests/functional/requirements.txt (+1/-0)
tests/functional/tests/bundles/hacluster.yaml (+1/-1)
tests/functional/tests/test_ceph.py (+29/-0)
tests/unit/verifiers/test_ceph.py (+87/-16)
tox.ini (+2/-2)
Changed in juju-verify: | |
importance: | Undecided → Medium |
assignee: | Xav Paice (xavpaice) → Martin Kalcok (martin-kalcok) |
Changed in juju-verify: | |
status: | In Progress → Fix Released |
Changed in charm-ceph-mon: | |
assignee: | Xav Paice (xavpaice) → Robert Gildein (rgildein) |
Changed in charm-ceph-mon: | |
assignee: | Robert Gildein (rgildein) → nobody |
Added charm-ceph-mon to track the addition of a get-quorum-status action.