Skip to content

Commit a1af1bf

Browse files
qa/cephfs: pass confirmation flag to fs fail in tear down code
Since "ceph fs fail" command now requires the confirmation flag when Ceph cluster has either health warning MDS_TRIM or MDS_CACHE_OVERSIZE, update tear down in QA code. During the teardown, the CephFS should be failed, regardless of whether or not Ceph cluster has health warnings, since it is teardown. Signed-off-by: Rishabh Dave <ridave@redhat.com>
1 parent 2481642 commit a1af1bf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

qa/tasks/cephfs/filesystem.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,12 @@ def reset(self):
605605
self.run_ceph_cmd("fs", "reset", str(self.name), '--yes-i-really-mean-it')
606606

607607
def fail(self):
608-
self.run_ceph_cmd("fs", "fail", str(self.name))
608+
cmd = ["fs", "fail", str(self.name)]
609+
try:
610+
self.run_ceph_cmd(cmd)
611+
except CommandFailedError:
612+
cmd.append("--yes-i-really-mean-it")
613+
self.run_ceph_cmd(cmd)
609614

610615
def set_flag(self, var, *args):
611616
a = map(lambda x: str(x).lower(), args)

0 commit comments

Comments
 (0)