From: Hitoshi Mitake <mitake.hito...@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 <lian...@ucweb.com> Cc: Giovanni Bellac <giovannib1...@ymail.com> Signed-off-by: Hitoshi Mitake <mitake.hito...@lab.ntt.co.jp> Signed-off-by: Liu Yuan <namei.u...@gmail.com> Conflicts: sheep/config.c Conflicts were resolved by Hitoshi Mitake. Signed-off-by: Hitoshi Mitake <mitake.hito...@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 -- sheepdog mailing list sheepdog@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/sheepdog