[sheepdog] [PATCH stable-0.8] sheep: save updated config after version migration
Hitoshi Mitake
mitake.hitoshi at gmail.com
Thu Jun 12 15:36:55 CEST 2014
From: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
Current config migration mechanism doesn't save updated version number
even after successful migration. This patch fixes the problem.
Related issue:
https://bugs.launchpad.net/sheepdog-project/+bug/1327040
Cc: Ruoyu <liangry at ucweb.com>
Cc: Giovanni Bellac <giovannib1979 at ymail.com>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix at gmail.com>
Conflicts:
sheep/config.c
Conflicts were resolved by Hitoshi Mitake.
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
sheep/config.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sheep/config.c b/sheep/config.c
index 9a0217b..c6eeddc 100644
--- a/sheep/config.c
+++ b/sheep/config.c
@@ -123,16 +123,16 @@ int init_config_file(void)
reload:
ret = 0;
get_cluster_config(&sys->cinfo);
-out:
- close(fd);
- return ret;
create:
config.version = SD_FORMAT_VERSION;
if (write_config() != SD_RES_SUCCESS)
return -1;
- return 0;
+out:
+ close(fd);
+
+ return ret;
}
void init_config_path(const char *base_path)
--
1.9.1
More information about the sheepdog
mailing list