Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 150525 Details for
Bug 220211
multiple qdisk master after network outage
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Fix
qdisk-multimaster.patch (text/plain), 4.64 KB, created by
Lon Hohberger
on 2007-03-20 19:45:47 UTC
(
hide
)
Description:
Fix
Filename:
MIME Type:
Creator:
Lon Hohberger
Created:
2007-03-20 19:45:47 UTC
Size:
4.64 KB
patch
obsolete
>? lib/libcman.so.DEVEL.1171939131 >? make/.cvsignore >? qdisk/mkqdisk >? qdisk/qdiskd >Index: man/qdisk.5 >=================================================================== >RCS file: /cvs/cluster/cluster/cman/man/qdisk.5,v >retrieving revision 1.1.2.4 >diff -u -r1.1.2.4 qdisk.5 >--- man/qdisk.5 21 Feb 2007 20:19:46 -0000 1.1.2.4 >+++ man/qdisk.5 20 Mar 2007 19:35:46 -0000 >@@ -216,7 +216,7 @@ > \fItko_up\fP\fB="\fPX\fB"\fP > .in 12 > This is the number of cycles a node must be seen in order to be declared >-online. Default is \fBfloor(tko/2)\fP. >+online. Default is \fBfloor(tko/3)\fP. > > .in 9 > \fIupgrade_wait\fP\fB="\fP2\fB"\fP >@@ -229,8 +229,9 @@ > \fImaster_wait\fP\fB="\fPX\fB"\fP > .in 12 > This is the number of cycles a node must wait for votes before declaring >-itself master after making a bid. Default is \fBfloor(tko/3)\fP. >-This can not be less than 2 and should not exceed \fBtko\fP. >+itself master after making a bid. Default is \fBfloor(tko/2)\fP. >+This can not be less than 2, must be greater than tko_up, and should not >+exceed \fBtko\fP. > > .in 9 > \fIvotes\fP\fB="\fP3\fB"\fP >Index: qdisk/main.c >=================================================================== >RCS file: /cvs/cluster/cluster/cman/qdisk/main.c,v >retrieving revision 1.1.2.7 >diff -u -r1.1.2.7 main.c >--- qdisk/main.c 21 Feb 2007 20:19:43 -0000 1.1.2.7 >+++ qdisk/main.c 20 Mar 2007 19:35:47 -0000 >@@ -381,22 +381,26 @@ > Returns > */ > int >-master_exists(qd_ctx *ctx, node_info_t *ni, int max, int *low_id) >+master_exists(qd_ctx *ctx, node_info_t *ni, int max, int *low_id, int *count) > { > int x; > int masters = 0; > int ret = 0; > >+ if (count) >+ *count = 0; > *low_id = ctx->qc_my_id; > > for (x = 0; x < max; x++) { > > /* See if this one's a master */ > if (ni[x].ni_state >= S_RUN && >- ni[x].ni_status.ps_state == S_MASTER) { >+ ni[x].ni_status.ps_state == S_MASTER && >+ ni[x].ni_status.ps_nodeid != ctx->qc_my_id) { > if (!ret) > ret = ni[x].ni_status.ps_nodeid; > ++masters; >+ continue; > } > > /* See if it's us... */ >@@ -424,11 +428,8 @@ > *low_id = ni[x].ni_status.ps_nodeid; > } > >- if (masters > 1) { >- clulog(LOG_CRIT, >- "Critical Error: More than one master found!\n"); >- /* XXX Handle this how? */ >- } >+ if (count) >+ *count = masters; > /* > else if (masters == 1) { > printf("Node %d is the master\n", ret); >@@ -849,7 +850,7 @@ > { > disk_msg_t msg = {0, 0, 0}; > int low_id, bid_pending = 0, score, score_max, score_req, >- upgrade = 0; >+ upgrade = 0, count; > memb_mask_t mask, master_mask; > struct timeval maxtime, oldtime, newtime, diff, sleeptime, interval; > >@@ -921,11 +922,26 @@ > score, score_max, score_req); > ctx->qc_status = S_RUN; > upgrade = ctx->qc_upgrade_wait; >+ bid_pending = 0; >+ msg.m_msg = M_NONE; >+ ++msg.m_seq; > } > } > > /* Find master */ >- ctx->qc_master = master_exists(ctx, ni, max, &low_id); >+ ctx->qc_master = master_exists(ctx, ni, max, &low_id, &count); >+ >+ /* Resolve master conflict, if one exists */ >+ if (count > 1 && ctx->qc_status == S_MASTER) { >+ clulog(LOG_WARNING, "Master conflict: abdicating\n"); >+ >+ /* Handle just like a recent upgrade */ >+ ctx->qc_status = S_RUN; >+ upgrade = ctx->qc_upgrade_wait; >+ bid_pending = 0; >+ msg.m_msg = M_NONE; >+ ++msg.m_seq; >+ } > > /* Figure out what to do based on what we know */ > if (!ctx->qc_master && >@@ -1163,7 +1179,7 @@ > } > > /* Get up-tko (transition off->online) */ >- ctx->qc_tko_up = (ctx->qc_tko / 2); >+ ctx->qc_tko_up = (ctx->qc_tko / 3); > snprintf(query, sizeof(query), "/cluster/quorumd/@tko_up"); > if (ccs_get(ccsfd, query, &val) == 0) { > ctx->qc_tko_up = atoi(val); >@@ -1185,14 +1201,14 @@ > > /* wait this many intervals after bidding for master before > becoming Caesar */ >- ctx->qc_master_wait = (ctx->qc_tko / 3); >+ ctx->qc_master_wait = (ctx->qc_tko / 2); > snprintf(query, sizeof(query), "/cluster/quorumd/@master_wait"); > if (ccs_get(ccsfd, query, &val) == 0) { > ctx->qc_master_wait = atoi(val); > free(val); > } >- if (ctx->qc_master_wait < 2) >- ctx->qc_master_wait = 2; >+ if (ctx->qc_master_wait <= ctx->qc_tko_up) >+ ctx->qc_master_wait = ctx->qc_tko_up + 1; > > /* Get votes */ > snprintf(query, sizeof(query), "/cluster/quorumd/@votes"); >Index: qdisk/score.c >=================================================================== >RCS file: /cvs/cluster/cluster/cman/qdisk/score.c,v >retrieving revision 1.1.2.3 >diff -u -r1.1.2.3 score.c >--- qdisk/score.c 21 Feb 2007 20:19:43 -0000 1.1.2.3 >+++ qdisk/score.c 20 Mar 2007 19:35:47 -0000 >@@ -143,7 +143,7 @@ > *score = 0; > *maxscore = 0; > >- printf("max = %d\n", max); >+ //printf("max = %d\n", max); > /* Allow operation w/o any heuristics */ > if (!max) { > *score = *maxscore = 1;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 220211
:
144025
| 150525