osd: Only scan for omap corruption once
Before
state 2: Can have complete tables (some may be bad)
state 3: Never had complete tables
After
state 2: Can have complete tables (some may be bad)
state 3 with legacy: Can have complete tables (bad ones are cleared)
state 3: Never had complete tables
Once OSDs boot with this change you can't downgrade to a previous release.
If someone does downgrade they could have unstable OSDs that hit assert(state.v < 3).
The following command run after shutting down the cluster but before downgrading
ceph packages would be a way to fix this.
ceph-osdomap-tool --omap-path ... --command resetv2
Fixes: http://tracker.ceph.com/issues/21328
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit
8805ef53424e30fd3f24ee38f5a6bdd9e6dd8641)