]> git.proxmox.com Git - ceph.git/blob - ceph/qa/tasks/mds_pre_upgrade.py
import ceph quincy 17.2.4
[ceph.git] / ceph / qa / tasks / mds_pre_upgrade.py
1 """
2 Prepare MDS cluster for upgrade.
3 """
4
5 import logging
6
7 from tasks.cephfs.filesystem import Filesystem
8
9 log = logging.getLogger(__name__)
10
11 def task(ctx, config):
12 """
13 Prepare MDS cluster for upgrade.
14
15 This task reduces ranks to 1 and stops all standbys.
16 """
17
18 if config is None:
19 config = {}
20 assert isinstance(config, dict), \
21 'snap-upgrade task only accepts a dict for configuration'
22
23 fs = Filesystem(ctx)
24 fs.getinfo() # load name
25 fs.set_allow_standby_replay(False)
26 fs.set_max_mds(1)
27 fs.reach_max_mds()