summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorPranith K <pranithk@gluster.com>2010-10-04 02:50:55 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-10-04 03:59:03 -0700
commit2420fd1f0cc5c357776d3766884b86859f3c3781 (patch)
treee4929f290f26490343e9dc006eff7a3cc555def9 /xlators
parentebc40051898881fa3d49946046448ee34e356338 (diff)
mgmt/glusterd: update volumes on friend update
Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c16
2 files changed, 11 insertions, 7 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index 031e07481a9..5f3e50ce770 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -2175,7 +2175,7 @@ glusterd_handle_friend_update (rpcsvc_request_t *req)
goto out;
}
- args.mode = GD_MODE_SWITCH_ON;
+ args.mode = GD_MODE_ON;
while ( i <= count) {
snprintf (key, sizeof (key), "friend%d.uuid", i);
ret = dict_get_str (dict, key, &uuid_buf);
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index e6aa91b4ff9..ca19057eb46 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -210,11 +210,13 @@ glusterd_store_delete_brick (glusterd_volinfo_t *volinfo,
ret = unlink (brickpath);
- if (ret < 0) {
- gf_log ("", GF_LOG_ERROR, "Unlink failed on %s",
- brickpath);
+ if ((ret < 0) && (errno != ENOENT)) {
+ gf_log ("", GF_LOG_ERROR, "Unlink failed on %s, reason: %s",
+ brickpath, strerror(errno));
ret = -1;
goto out;
+ } else {
+ ret = 0;
}
out:
@@ -256,9 +258,9 @@ glusterd_store_remove_bricks (glusterd_volinfo_t *volinfo)
snprintf (path, sizeof (path), "%s/%s",
brickdir, entry->d_name);
ret = unlink (path);
- if (ret) {
- gf_log ("", GF_LOG_ERROR, "Unable to unlink %s",
- path);
+ if (ret && errno != ENOENT) {
+ gf_log ("", GF_LOG_ERROR, "Unable to unlink %s, "
+ "reason: %s", path, strerror(errno));
}
glusterd_for_each_entry (entry, dir);
}
@@ -1281,6 +1283,8 @@ glusterd_store_delete_peerinfo (glusterd_peerinfo_t *peerinfo)
}
ret = unlink (filepath);
+ if (ret && (errno == ENOENT))
+ ret = 0;
out:
if (peerinfo->shandle)