[sheepdog] [PATCH] sheep, collie: make cluster shutdown a force operation

Hitoshi Mitake mitake.hitoshi at gmail.com
Wed May 8 05:46:57 CEST 2013


At Wed, 08 May 2013 11:00:48 +0800,
Liu Yuan wrote:
> 
> On 05/07/2013 11:40 PM, Hitoshi Mitake wrote:
> > This patch makes "collie cluster shutdown" a force operation. Even if
> > a cluster is not in state of SD_STATUS_OK, the cluster can be
> > shutdowned with -f option of collie like this:
> > $ collie cluster shutdown -f
> 
> why we need -f?
> 
> simply
> 
> diff --git a/sheep/ops.c b/sheep/ops.c
> index 90f4b00..4cf832c 100644
> --- a/sheep/ops.c
> +++ b/sheep/ops.c
> @@ -1035,6 +1035,7 @@ static struct sd_op_template sd_ops[] = {
>         [SD_OP_SHUTDOWN] = {
>                 .name = "SHUTDOWN",
>                 .type = SD_OP_TYPE_CLUSTER,
> +               .force = true,
>                 .process_main = cluster_shutdown,
>         },
> 
> doesn't solve your problem that can't shutdown the cluster when the
> status isn't okay?

-f is just for safety. I think changing the meaning of shutdown would
 be a little bit dangerous for users.

Thanks,
Hitoshi



More information about the sheepdog mailing list