diff options
author | Krishnan Parthasarathi <kp@gluster.com> | 2011-08-21 15:54:14 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-08-21 03:33:24 -0700 |
commit | 10f69943c412ea676814e794ae891ccf8adb8183 (patch) | |
tree | 8c2c8060b32b1e0fa3e19dee9eb74ae690cb029b /xlators | |
parent | 0564d1198bd7fa9cc18b7ecf2756d7239a052276 (diff) |
glusterd: persistent state restore needs to be backward compatible.v3.2.3qa5
Change-Id: I6c774f638bd8ebd3f3c7c868be6416c9b37897d0
BUG: 3453
Reviewed-on: http://review.gluster.com/282
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-store.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c index 3b2a262e3b5..623865bac6f 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.c +++ b/xlators/mgmt/glusterd/src/glusterd-store.c @@ -1853,11 +1853,12 @@ out: int32_t glusterd_store_retrieve_volumes (xlator_t *this) { - int32_t ret = 0; - char path[PATH_MAX] = {0,}; - glusterd_conf_t *priv = NULL; - DIR *dir = NULL; - struct dirent *entry = NULL; + int32_t ret = 0; + char path[PATH_MAX] = {0,}; + glusterd_conf_t *priv = NULL; + DIR *dir = NULL; + struct dirent *entry = NULL; + glusterd_volinfo_t *volinfo = NULL; GF_ASSERT (this); priv = this->private; @@ -1887,9 +1888,12 @@ glusterd_store_retrieve_volumes (xlator_t *this) ret = glusterd_store_retrieve_rbstate (entry->d_name); if (ret) { - gf_log ("", GF_LOG_ERROR, "Unable to restore " - "rbstate for volume: %s", entry->d_name); - goto out; + /* Backward compatibility */ + gf_log ("", GF_LOG_INFO, "Creating a new rbstate " + "for volume: %s.", entry->d_name); + ret = glusterd_volinfo_find (entry->d_name, &volinfo); + ret = glusterd_store_create_rbstate_shandle_on_absence (volinfo); + ret = glusterd_store_perform_rbstate_store (volinfo); } glusterd_for_each_entry (entry, dir); } |