[sheepdog] [PATCH 1/3] sheep: don't start recovery if cluster was shutdowned

MORITA Kazutaka morita.kazutaka at gmail.com
Fri Aug 30 15:50:45 CEST 2013


At Fri, 30 Aug 2013 19:43:38 +0800,
Liu Yuan wrote:
> 
> Add a new field in the config file to indicate shutdown status. The layout of
> config file isn't modified, just find a free slot to hold shutdown status.
> 
> Signed-off-by: Liu Yuan <namei.unix at gmail.com>
> ---
>  sheep/config.c     |   14 +++++++++++++-
>  sheep/group.c      |    4 +++-
>  sheep/ops.c        |    5 +++++
>  sheep/sheep_priv.h |    2 ++
>  4 files changed, 23 insertions(+), 2 deletions(-)

If we run 'cluster shutdown' while sheepdog is in recovery, we have to
kick recovery when we start up sheepdog next time.  Actually,
test/functional/072 cannot be passed with this patch.

To skip recovery,
 - sheepdog must be shutdowned cleanly,
 - node_in_recovery() must return true, and
 - start_recovery() must not be called after the clean shutdown.

It looks like start_recovery() can be called in
sd_update_node_handler() even after cluster shutdown.  We need a fix
for it, too.

The other two patches look good to me.  Applied, thanks.

Kazutaka



More information about the sheepdog mailing list