<br>
<div class="gmail_quote">On Wed, Mar 7, 2012 at 9:31 AM, huxinwei <span dir="ltr"><<a href="mailto:huxinwei@huawei.com">huxinwei@huawei.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div class="im">> -----Original Message-----<br>> From: <a href="mailto:sheepdog-bounces@lists.wpkg.org">sheepdog-bounces@lists.wpkg.org</a><br>> [mailto:<a href="mailto:sheepdog-bounces@lists.wpkg.org">sheepdog-bounces@lists.wpkg.org</a>] On Behalf Of<br>
> <a href="mailto:yaohaiting.wujue@gmail.com">yaohaiting.wujue@gmail.com</a><br>> Sent: Tuesday, March 06, 2012 6:52 PM<br>> To: <a href="mailto:sheepdog@lists.wpkg.org">sheepdog@lists.wpkg.org</a><br>> Cc: HaiTing Yao<br>
> Subject: [Sheepdog] [PATCH 2/4] sheep: transient failure - parameter changes<br>><br>> From: HaiTing Yao <<a href="mailto:wujue.yht@taobao.com">wujue.yht@taobao.com</a>><br>><br>> Add one parameter, user can specify the time one node leave then join<br>
> again.<br>><br>> -t, --templeft specify the time(in seconds) node can leave then<br>> join again<br><br></div>What if some/all sheeps have different timeout setting?<br><br>I think it'll better to make it a cluster wide parameter.<br>
Maybe another subcommand for collie ?<br></blockquote>
<div> </div>
<div>If sheeps have different timeout setting</div>
<div> </div>
<div>1, Transient failure disappear, then is ok</div>
<div>2, Transient failure to permanent one, then there is error. It is because sheeps can not deal with the same event at same time</div>
<div> </div>
<div>Your suggestion maybe better.</div>
<div> </div>
<div>Thanks</div>
<div> </div>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div class="HOEnZb">
<div class="h5"><br>> If do not use this parameter, the sheep works without transient failure<br>> detection as before<br>><br>> Signed-off-by: HaiTing Yao <<a href="mailto:wujue.yht@taobao.com">wujue.yht@taobao.com</a>><br>
> ---<br>> sheep/sheep.c | 9 ++++++++-<br>> 1 files changed, 8 insertions(+), 1 deletions(-)<br>><br>> diff --git a/sheep/sheep.c b/sheep/sheep.c<br>> index b3b834b..63c53be 100644<br>> --- a/sheep/sheep.c<br>
> +++ b/sheep/sheep.c<br>> @@ -38,11 +38,12 @@ static struct option const long_options[] = {<br>> {"zone", required_argument, NULL, 'z'},<br>> {"vnodes", required_argument, NULL, 'v'},<br>
> {"cluster", required_argument, NULL, 'c'},<br>> + {"templeft", required_argument, NULL, 't'},<br>> {"help", no_argument, NULL, 'h'},<br>> {NULL, 0, NULL, 0},<br>
> };<br>><br>> -static const char *short_options = "p:fl:dDz:v:c:h";<br>> +static const char *short_options = "p:fl:dDz:v:c:t:h";<br>><br>> static void usage(int status)<br>> {<br>
> @@ -62,6 +63,7 @@ Options:\n\<br>> -z, --zone specify the zone id\n\<br>> -v, --vnodes specify the number of virtual nodes\n\<br>> -c, --cluster specify the cluster driver\n\<br>
> + -t, --templeft specify the time(in seconds) node can leave then<br>> join again\n\<br>> -h, --help display this help and exit\n\<br>> ", PACKAGE_VERSION, program_name);<br>> exit(status);<br>
> @@ -98,6 +100,8 @@ int main(int argc, char **argv)<br>> char *p;<br>> struct cluster_driver *cdrv;<br>><br>> + memset(sys, 0, sizeof(struct cluster_info));<br>> +<br>> signal(SIGPIPE, SIG_IGN);<br>
><br>> while ((ch = getopt_long(argc, argv, short_options, long_options,<br>> @@ -165,6 +169,9 @@ int main(int argc, char **argv)<br>><br>> sys->cdrv_option = get_cdrv_option(sys->cdrv, optarg);<br>
> break;<br>> + case 't':<br>> + sys->templeft_time = atoi(optarg);<br>> + break;<br>> case 'h':<br>
> usage(0);<br>> break;<br>> --<br>> 1.7.1<br>><br></div></div><span class="HOEnZb"><font color="#888888">> --<br>> sheepdog mailing list<br>> <a href="mailto:sheepdog@lists.wpkg.org">sheepdog@lists.wpkg.org</a><br>
> <a href="http://lists.wpkg.org/mailman/listinfo/sheepdog" target="_blank">http://lists.wpkg.org/mailman/listinfo/sheepdog</a><br></font></span></blockquote></div><br>