[sheepdog] [PATCH 1/2] sheep: reload config after successful migration

Liu Yuan namei.unix at gmail.com
Mon Mar 3 04:06:01 CET 2014


On Sun, Mar 02, 2014 at 11:50:04PM +0900, Hitoshi Mitake wrote:
> Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
> ---
>  sheep/config.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/sheep/config.c b/sheep/config.c
> index 22c6cfe..001fa0a 100644
> --- a/sheep/config.c
> +++ b/sheep/config.c
> @@ -107,16 +107,19 @@ int init_config_file(void)
>  					sd_err("failed to reload config file,"
>  					       " %m");
>  					ret = -1;
> +					goto out;
>  				} else
>  					ret = 0;
>  			}
> -			goto out;
> +			goto reload;

This looks wrong to me. If sd_migrate_store < 0 in error case, we'll go to
reload wrongly.

Thanks
Yuan



More information about the sheepdog mailing list