Merge lp:~gandelman-a/charms/precise/ceph/fail_early into lp:~charmers/charms/precise/ceph/trunk
Status: | Rejected |
---|---|
Rejected by: | Adam Gandelman |
Proposed branch: | lp:~gandelman-a/charms/precise/ceph/fail_early |
Merge into: | lp:~charmers/charms/precise/ceph/trunk |
Diff against target: |
84 lines (+33/-6) 2 files modified
hooks/hooks.py (+32/-5) revision (+1/-1) |
To merge this branch: | bzr merge lp:~gandelman-a/charms/precise/ceph/fail_early |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
charmers | Pending | ||
Review via email: mp+170902@code.launchpad.net |
Description of the change
This ensures a hook error if call to ceph-disk-prepare fails. Avoids silently failing and running into difficult-to-debug ceph errors later. Currently charm continues to deploy even if this fails, leading to a broken cluster later: http://
Going further: If configured to osd-reformat='yes', it might be a good idea to run a bit of scrubbing on the disk in osdize() just prior to calling ceph-disk-prepare, to ensure it is unmounted and partition table zapped. I have a patch I'm still testing to do this. That I'll throw up for review. In the meantime, it would be good to simply fail early.
Unmerged revisions
- 62. By Adam Gandelman
-
Ensure OSD device is free before preparing.
- 61. By Adam Gandelman
-
Fail hook if ceph-disk-prepare fails.
Not sure this is actually the cause of your broken cluster; the OSD disk is not being correctly detected as already initialized during subsequent executions of the config-changed hook.
That said; this should be a check_call.
I'm currently refactoring this charm to use charm-helpers - OK if I pull this change in which that piece?