[sheepdog] [PATCH v2] sheep: fix incorrect status transition during joining cluster

Hitoshi Mitake mitake.hitoshi at gmail.com
Mon Jun 17 16:31:18 CEST 2013


At Thu, 13 Jun 2013 01:02:29 +0900,
Hitoshi Mitake wrote:
> 
> Current sheep set jm->cluster_status SD_STATUS_OK if
> 1. itself is a first node to join the cluster, and
> 2. a number of nodes of latest epoch is 1
> in sd_check_join_cb().
> 
> This is an invalid behavior. For example, the behavior allows such a
> situation:
> 1. create a cluster with 2 nodes
> 2. format the cluster with --copies 2
> 3. kill single sheep
> 4. shutdown the cluster
> 5. launch single sheep
> 6. the status of the cluster is SD_STATUS_OK
> 
> This patch solves the problem. The second condition is now checked
> with have_enough_zones() and the check is done in sd_join_handler().
> 

Ping.

The problem caused by the above bug is serious so I want someone to
review this patch.

Thanks,
Hitoshi



More information about the sheepdog mailing list