def tearDown(self):
        if self.acl_check_flag:
            ret = disable_acl(self.mnode, self.volname)
            if not ret:
                raise ExecutionError("Failed to disable acl on %s" %
                                     self.volname)
            self.acl_check_flag = False

        NfsGaneshaIOBaseClass.tearDown.im_func(self)
    def test_nfs_ganesha_multiple_refresh_configs(self):
        """
        Tests script to check nfs-ganehsa volume gets exported and IOs
        are running after running multiple refresh configs.
        """

        self.acl_check_flag = False

        for i in range(6):
            # Enabling/Disabling ACLs to modify the export configuration
            # before running refresh config
            if i % 2 == 0:
                ret = disable_acl(self.mnode, self. volname)
                self.assertTrue(ret, ("Failed to disable acl on %s"
                                      % self.volname))
                self.acl_check_flag = False
            else:
                ret = enable_acl(self.mnode, self. volname)
                self.assertTrue(ret, ("Failed to enable acl on %s"
                                      % self.volname))
                self.acl_check_flag = True

            ret = run_refresh_config(self.mnode, self. volname)
            self.assertTrue(ret, ("Failed to run refresh config"
                                  "for volume %s" % self.volname))

            time.sleep(2)

        # Validate IO
        g.log.info("Wait for IO to complete and validate IO ...")
        ret = validate_io_procs(self.all_mounts_procs, self.mounts)
        self.io_validation_complete = True
        self.assertTrue(ret, "IO failed on some of the clients")
        g.log.info("IO is successful on all mounts")

        # List all files and dirs created
        g.log.info("List all files and directories:")
        ret = list_all_files_and_dirs_mounts(self.mounts)
        self.assertTrue(ret, "Failed to list all files and dirs")
        g.log.info("Listing all files and directories is successful")
Example #3
0
 def tearDown(self):
     ret = disable_acl(self.servers[0], self.volname)
     if not ret:
         raise ExecutionError("Failed to disable ACL on nfs "
                              "ganesha cluster")