]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
MDS: lock out snapshots until after a flag has been set in the MDSMap
authorGreg Farnum <greg@inktank.com>
Wed, 25 Sep 2013 22:52:50 +0000 (15:52 -0700)
committerLoic Dachary <loic@dachary.org>
Thu, 26 Sep 2013 16:26:36 +0000 (18:26 +0200)
commit9771b1d5d63be726e389dcf8443db2b2d3975a7a
treedd0d772a6ab6080bd90753ca2a0466b314012859
parent3cffff2a1abd266abbbc97effd73b79695d29682
MDS: lock out snapshots until after a flag has been set in the MDSMap

This way users can't put snapshots on their clusters unless they explicitly
ask for them and have seen a warning message. We take a bit of the MDSMap
flags in order to do so. The only thing a little weird here is that anybody
who upgrades to this patch who already has snapshots will hit the EPERM
and have to go through the warning, but it doesn't impact existing snapshots
at all so they should be good.

To go along with this, we add "ever_allowed_snaps" and "explicitly_allowed_snaps"
members to the MDSMap, which are default to false and are set to true
when allow_new_snaps is set. Old maps decoded with new code default to true
and false, respectively, so we can tell.

Fixes: #6332
Signed-off-by: Greg Farnum <greg@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
PendingReleaseNotes
src/include/ceph_fs.h
src/mds/MDSMap.cc
src/mds/MDSMap.h
src/mds/Server.cc
src/mon/MDSMonitor.cc
src/mon/MonCommands.h
src/test/pybind/test_ceph_argparse.py