]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mon,mds: use per-MDS compat to inform replacement
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 30 Mar 2021 21:26:08 +0000 (14:26 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 30 Jul 2021 23:28:54 +0000 (16:28 -0700)
commit58eaa237b0a16d3c934ded77ed4dc53137d9b4a1
tree6863a188db2a92abf20603af97bb8a2687b15405
parent8cdc36c89da224eb8e86ee6ed80cd2eb65354587
mon,mds: use per-MDS compat to inform replacement

This diff makes the following changes:

- FSMap::compat is now just a "default compat" of currently unknown
  utility. It is used when constructing a new file system but does
  not really have any effect or current use.

- The `mds compat *` CLI commands are deprecated. They manipulate
  the default compat which has no useful effect.

- Each MDS sends its compat to the mons in its beacon. This is from
  MDSMap::get_compat_set_all() at MDS boot. This CompatSet does not
  change for the duration of the MDS lifetime.

- Mons record each MDS compat in the FSMap to inform standby failover.
  An MDS is only promoted if it is compatible with the file system
  compat.

- Mons upgrade (merge) the file system compat when (a) the number of
  *in* MDS is 1 (effected by max_mds=1) and (b) the mons are promoting a
  standby with a new compat. A file system is never upgraded when there
  is more than 1 rank to prevent two MDS with incompatible compat.

- A suite of `fs compat` commands exist to manipulate the file system
  compat. These exist mostly for testing.

The consequence of these changes is that the upgrade procedure for MDS
can be updated to no longer require turning off all MDS but rank 0
before performing any upgrades. A CompatSet change would cause all MDS
receiving the new MDSMap to suicide due to incompatibility (if so).
Instead, the monitors will no longer assign an incompatible MDS to a
file system and enforce an upgrade procedure if incompatibilities exist.

Fixes: https://tracker.ceph.com/issues/49720
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mds/Beacon.cc
src/mds/FSMap.cc
src/mds/FSMap.h
src/mds/MDSMap.cc
src/mds/MDSMap.h
src/mon/FSCommands.cc
src/mon/MDSMonitor.cc
src/mon/MonCommands.h