From 6cd137615aec29dade5b41975fcbdae06852cf53 Mon Sep 17 00:00:00 2001 From: Sri Vignesh Date: Mon, 9 Dec 2019 14:02:54 +0530 Subject: Add steps to stablize the existing contents in cleanup Change-Id: I0d405afb3ed84ae8a67f7c2e6a303063096f490c Signed-off-by: Sri Vignesh --- .../glustolibs/gluster/gluster_base_class.py | 25 ++++++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py b/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py index 5a61b86f8..15d96748e 100644 --- a/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py +++ b/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py @@ -408,13 +408,24 @@ class GlusterBaseClass(TestCase): log_mounts_info(cls.mounts) return False - else: - g.log.info("Successful in unmounting volume '%s:%s' on " - "'%s:%s'", mount_obj.server_system, - mount_obj.volname, mount_obj.client_system, - mount_obj.mountpoint) - g.log.info("Successful in unmounting all mount objs for the volume %s", - cls.volname) + + g.log.info("Starting to delete the directory path used for " + "mounting") + cmd = ('rm -rf %s' % mount_obj.mountpoint) + ret, _, err = g.run( + mount_obj.client_system, cmd, user=mount_obj.user) + if not ret: + g.log.error( + "failed to delete the directory path used for " + "mounting %s: %s" % (mount_obj.mountpoint, err)) + return False + + g.log.info( + "Successful in deleting the directory path used for " + "mounting '%s:%s' on '%s:%s'" % ( + mount_obj.server_system, + mount_obj.volname, mount_obj.client_system, + mount_obj.mountpoint)) # Get mounts info g.log.info("Get mounts Info:") -- cgit