summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt')
-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)