]>
git.proxmox.com Git - ceph.git/blob - ceph/qa/tasks/mds_pre_upgrade.py
2 Prepare MDS cluster for upgrade.
8 from tasks
.cephfs
.filesystem
import Filesystem
10 log
= logging
.getLogger(__name__
)
12 def task(ctx
, config
):
14 Prepare MDS cluster for upgrade.
16 This task reduces ranks to 1 and stops all standbys.
21 assert isinstance(config
, dict), \
22 'snap-upgrade task only accepts a dict for configuration'
30 # Stop standbys now to minimize time rank 0 is down in subsequent:
32 # - ceph.stop: [mds.*]
33 rank0
= fs
.get_rank(rank
=0, status
=status
)
34 for daemon
in ctx
.daemons
.iter_daemons_of_role('mds', fs
.mon_manager
.cluster
):
35 if rank0
['name'] != daemon
.id_
:
38 for i
in range(1, 10):
39 time
.sleep(5) # time for FSMap to update
41 if len(list(status
.get_standbys())) == 0:
43 assert(len(list(status
.get_standbys())) == 0)