diff options
author | Sri Vignesh <sselvan@redhat.com> | 2019-12-09 14:02:54 +0530 |
---|---|---|
committer | Bala Konda Reddy M <bmekala@redhat.com> | 2019-12-13 09:09:21 +0000 |
commit | 6cd137615aec29dade5b41975fcbdae06852cf53 (patch) | |
tree | d5643ea646bac88b3122024d6330f86d99ce8676 /glustolibs-gluster | |
parent | 42b10ded2b3150b55192eeaaf0ec0c440268a0e9 (diff) |
Add steps to stablize the existing contents in cleanup
Change-Id: I0d405afb3ed84ae8a67f7c2e6a303063096f490c
Signed-off-by: Sri Vignesh <sselvan@redhat.com>
Diffstat (limited to 'glustolibs-gluster')
-rw-r--r-- | glustolibs-gluster/glustolibs/gluster/gluster_base_class.py | 25 |
1 files 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:") |