From: John Spray Date: Thu, 3 Dec 2015 00:17:32 +0000 (+0000) Subject: tasks/cephfs: fixes to FuseMount X-Git-Tag: v10.2.6~165^2^2~223^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a6970271be0455f8b282a106df38152315c52a72;p=ceph.git tasks/cephfs: fixes to FuseMount This was getting stressed in new ways by TestSessionMap.test_session_reject, which has a mount that fails initially. Two changes here: * Raise CommandFailedError instead of RuntimeError when a mount fails (i.e. catch process termination instead of timing out on /sys/ population) * Generalise error handling on umount, so that we only raise the exception on an umount failure if the mount appears to really not be unmounted. There is some EINVAL corner case that was getting triggered by the test. Signed-off-by: John Spray --- diff --git a/tasks/cephfs/fuse_mount.py b/tasks/cephfs/fuse_mount.py index 09c9c110119..9226e403f9c 100644 --- a/tasks/cephfs/fuse_mount.py +++ b/tasks/cephfs/fuse_mount.py @@ -110,6 +110,10 @@ class FuseMount(CephFSMount): post_mount_conns = list_connections() while len(post_mount_conns) <= len(pre_mount_conns): + if self.fuse_daemon.finished: + # Did mount fail? Raise the CommandFailedError instead of + # hitting the "failed to populate /sys/" timeout + self.fuse_daemon.wait() time.sleep(1) waited += 1 if waited > timeout: @@ -224,10 +228,7 @@ class FuseMount(CephFSMount): stderr=stderr ) except CommandFailedError: - if "not found" in stderr.getvalue(): - # Missing mount point, so we are unmounted already, yay. - pass - else: + if self.is_mounted(): raise assert not self.is_mounted()