[sheepdog] [PATCH] zookeeper: add error message when found ZNOCHILDRENFOREPHEMERALS

MORITA Kazutaka morita.kazutaka at gmail.com
Sat Jun 29 05:30:44 CEST 2013


At Fri, 28 Jun 2013 18:45:37 -0700,
Kai Zhang wrote:
> 
> Signed-off-by: Kai Zhang <kyle at zelin.io>
> ---
>  sheep/cluster/zookeeper.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/sheep/cluster/zookeeper.c b/sheep/cluster/zookeeper.c
> index daafc4d..8e8b7bb 100644
> --- a/sheep/cluster/zookeeper.c
> +++ b/sheep/cluster/zookeeper.c
> @@ -19,6 +19,7 @@
>  #include <pthread.h>
>  
>  #include "cluster.h"
> +#include "config.h"
>  #include "event.h"
>  #include "work.h"
>  #include "util.h"
> @@ -152,6 +153,9 @@ static struct zk_node this_node;
>  		sd_eprintf("failed, path:%s, %s", path, zerror(rc));	\
>  	case ZOK:							\
>  		break;							\
> +	case ZNOCHILDRENFOREPHEMERALS:					\
> +		sd_eprintf("incompatible version of sheep %s",		\
> +			   PACKAGE_VERSION);				\
>  	default:							\
>  		panic("failed, path:%s, %s", path, zerror(rc));		\
>  	}

I think incrementing SD_SHEEP_PROTO_VER is better to avoid
incompatible sheepdog version.

Thanks,

Kazutaka



More information about the sheepdog mailing list