...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 <john.spray@redhat.com>
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]