[sheepdog] [PATCH v4 3/3] sheep: add default value if any to sheep -h

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Fri Jul 12 08:18:59 CEST 2013


At Thu, 11 Jul 2013 14:05:49 +0800,
Liu Yuan wrote:
> 
> Signed-off-by: Liu Yuan <namei.unix at gmail.com>
> ---
>  sheep/sheep.c |   15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/sheep/sheep.c b/sheep/sheep.c
> index efb99ec..e5269c4 100644
> --- a/sheep/sheep.c
> +++ b/sheep/sheep.c
> @@ -98,7 +98,8 @@ static const char cache_help[] =
>  static struct sd_option sheep_options[] = {
>  	{'b', "bindaddr", true, "specify IP address of interface to listen on",
>  	 bind_help},
> -	{'c', "cluster", true, "specify the cluster driver", cluster_help},
> +	{'c', "cluster", true, "specify the cluster driver (default: corosync)",

The default driver is local if "HAVE_COROSYNC" is not defined.

> +	 cluster_help},
>  	{'d', "debug", false, "include debug messages in the log"},
>  	{'D', "directio", false, "use direct IO for backend store"},
>  	{'f', "foreground", false, "make the program run in the foreground"},
> @@ -109,11 +110,12 @@ static struct sd_option sheep_options[] = {
>  	 ioaddr_help},
>  	{'j', "journal", true, "use jouranl file to log all the write "
>  	 "operations", journal_help},
> -	{'l', "loglevel", true, "specify the level of logging detail",
> -	 loglevel_help},
> +	{'l', "loglevel", true, "specify the level of logging detail "
> +	 "(default: 6 [SDOG_INFO])", loglevel_help},
>  	{'n', "nosync", false, "drop O_SYNC for write of backend"},
>  	{'o', "stdout", false, "log to stdout instead of shared logger"},
> -	{'p', "port", true, "specify the TCP port on which to listen"},
> +	{'p', "port", true, "specify the TCP port on which to listen "
> +	 "(default: 7000)"},
>  	{'P', "pidfile", true, "create a pid file"},
>  	{'r', "http", true, "enable http service", http_help},
>  	{'u', "upgrade", false, "upgrade to the latest data layout"},
> @@ -121,7 +123,8 @@ static struct sd_option sheep_options[] = {
>  	{'w', "cache", true, "enable object cache", cache_help},
>  	{'y', "myaddr", true, "specify the address advertised to other sheep",
>  	 myaddr_help},
> -	{'z', "zone", true, "specify the zone id", zone_help},
> +	{'z', "zone", true, "specify the zone id (default: random value)",

This is wrong.  It is guranteed that the zone id can be determined
uniquely if the daemon uses the same IP and port number.

Thanks,

Kazutaka



More information about the sheepdog mailing list