From ce1196d62f1c6f3c5cef4859ad2a8ee491ae5d4c Mon Sep 17 00:00:00 2001 From: John Spray Date: Wed, 4 Feb 2015 12:52:42 +0000 Subject: [PATCH] tasks/cephfs: be tolerant of multiple MDSs ...as long as only one is active, all the ops that default to talking to a single MDS should be happy to talk to the active MDS, even if there happens to be a standby lying around too. Signed-off-by: John Spray --- tasks/cephfs/filesystem.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tasks/cephfs/filesystem.py b/tasks/cephfs/filesystem.py index 07acd1fc62f31..63f535ec8b443 100644 --- a/tasks/cephfs/filesystem.py +++ b/tasks/cephfs/filesystem.py @@ -188,7 +188,11 @@ class Filesystem(object): def get_lone_mds_id(self): if len(self.mds_ids) != 1: - raise ValueError("Explicit MDS argument required when multiple MDSs in use") + active = self.get_active_names() + if len(active) == 1: + return active[0] + else: + raise ValueError("Explicit MDS argument required when multiple MDSs in use") else: return self.mds_ids[0] -- 2.39.5