diff options
author | Csaba Henk <csaba@gluster.com> | 2011-04-12 02:47:45 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-04-12 21:49:52 -0700 |
commit | 59b9ab45a01d52e197ab6f76fd71e64910396d57 (patch) | |
tree | 640b5bc733193931331742b22f10c6d85efbf245 | |
parent | 1b18a7d64574ca08b937113fcb19b9d851abd43c (diff) |
temporary workaround for mtab update race thingy
Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>
BUG: 2690 (race between mtab updates of mount and umount)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2690
-rw-r--r-- | cli/src/cli-rpc-ops.c | 2 | ||||
-rw-r--r-- | xlators/features/marker/utils/syncdaemon/resource.py | 1 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-op-sm.c | 1 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-rebalance.c | 2 |
4 files changed, 6 insertions, 0 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index b0e00f63b..33b453373 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -1386,7 +1386,9 @@ print_limit_list (char *volname, char *limit_list) unmount: memset (&cmd_str, 0, sizeof (cmd_str)); + #if GF_LINUX_HOST_OS + usleep (200000); snprintf (cmd_str, sizeof (cmd_str), "umount -l %s", mountdir); #else snprintf (cmd_str, sizeof (cmd_str), "umount %s", mountdir); diff --git a/xlators/features/marker/utils/syncdaemon/resource.py b/xlators/features/marker/utils/syncdaemon/resource.py index f157b1907..d172462a7 100644 --- a/xlators/features/marker/utils/syncdaemon/resource.py +++ b/xlators/features/marker/utils/syncdaemon/resource.py @@ -411,6 +411,7 @@ class GLUSTER(AbstractUrl, SlaveLocal, SlaveRemote): raise RuntimeError("command failed: " + " ".join(argv)) logging.debug('auxiliary glusterfs mount in place') os.chdir(d) + time.sleep(0.2) # XXX temporary workaround argv = ['umount', '-l', d] if os.spawnvp(os.P_WAIT, argv[0], argv): raise RuntimeError("command failed: " + " ".join(argv)) diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index cdf9973aa..8d1cd639f 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -4143,6 +4143,7 @@ glusterd_quota_child_waitpid (void *arg) child_info = (glusterd_quota_child_info_t *)arg; #ifdef GF_LINUX_HOST_OS + usleep (200000); snprintf (cmd, sizeof (cmd), "umount -l %s", child_info->mountdir); system (cmd); diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c index fec0a1b2e..59d4963d4 100644 --- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c +++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c @@ -339,6 +339,7 @@ out: gf_log ("rebalance", GF_LOG_INFO, "rebalance on %s complete", defrag->mount); + usleep (200000); snprintf (cmd_str, 1024, "umount -l %s", defrag->mount); ret = system (cmd_str); LOCK_DESTROY (&defrag->lock); @@ -577,6 +578,7 @@ glusterd_handle_defrag_start (glusterd_volinfo_t *volinfo, char *op_errstr, ret = pthread_create (&defrag->th, NULL, glusterd_defrag_start, volinfo); if (ret) { + usleep (200000); snprintf (cmd_str, sizeof (cmd_str), "umount -l %s", defrag->mount); if (system (cmd_str)) gf_log("glusterd", GF_LOG_DEBUG, "command: %s " |