]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon: handle bad snapshot removal reqs gracefully 21717/head
authorPaul Emmerich <paul.emmerich@croit.io>
Sun, 11 Mar 2018 00:26:45 +0000 (01:26 +0100)
committerPaul Emmerich <paul.emmerich@croit.io>
Sun, 29 Apr 2018 12:54:14 +0000 (14:54 +0200)
commite2632826e597150c8aa84ea898be9ebbf600dc14
treebff9b112f31bc7a6eb2740ad20d83d0695cd4db1
parent823585311c41729309809690a7df5cb83c4ece12
mon: handle bad snapshot removal reqs gracefully

Snapshot deletion requests on snap ids larger than the snap_seq of
the pool will leave the pool in a state with snap_seq being less
than max(removed_snaps).

This is bad because further deletion requests to a pool in this state
might crash the mon in some cases: the deletion also inserts the new
snap_seq into the removed_snaps set -- which might already exist
in this case and trigger an assert.

Such bad requests will be generated by rbd clients without a fix for
issue #21567.

The change in OSDMonitor prevents pools from getting into this state
and may prevent old broken clients from incorrectly deleting snaps.
The change in osd_types avoids a crash if a pool is already in this
state.

Fixes #18746

Signed-off-by: Paul Emmerich <paul.emmerich@croit.io>
(cherry picked from commit f42a6ba4c37cb10869718ec296352ae55254b44a)

 Conflicts:
src/osd/osd_types.cc
src/mon/OSDMonitor.cc
src/osd/osd_types.cc