Currenly a sheep not present during format time does not pick up the cluster flags. Fix this and also add a cluster_flags validity check in cluster_sanity_check.
Signed-off-by: Christoph Hellwig <[email protected]> --- sheep/group.c | 7 +++++++ 1 file changed, 7 insertions(+) Index: sheepdog/sheep/group.c =================================================================== --- sheepdog.orig/sheep/group.c 2012-07-18 12:24:32.820168331 +0200 +++ sheepdog/sheep/group.c 2012-07-18 12:24:38.203501747 +0200 @@ -514,6 +514,12 @@ static int cluster_sanity_check(struct j return CJ_RES_FAIL; } + if (jm->cluster_flags != sys->flags) { + eprintf("joining node cluster_flags don't match: %u vs %u\n", + jm->cluster_flags, sys->flags); + return CJ_RES_FAIL; + } + return CJ_RES_SUCCESS; } @@ -773,6 +779,7 @@ static void update_cluster_info(struct j /* Fresh node */ if (sys->status == SD_STATUS_WAIT_FOR_FORMAT) { sys->nr_copies = msg->nr_copies; + sys->flags = msg->cluster_flags; set_cluster_copies(sys->nr_copies); set_cluster_flags(sys->flags); -- sheepdog mailing list [email protected] http://lists.wpkg.org/mailman/listinfo/sheepdog
