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 183581 Details for
Bug 271701
cman_tool leave remove doesn't reduce quorum
[?]
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]
Patch to fix
remove.patch (text/plain), 4.72 KB, created by
Christine Caulfield
on 2007-08-31 15:36:17 UTC
(
hide
)
Description:
Patch to fix
Filename:
MIME Type:
Creator:
Christine Caulfield
Created:
2007-08-31 15:36:17 UTC
Size:
4.72 KB
patch
obsolete
>Index: commands.c >=================================================================== >RCS file: /cvs/cluster/cluster/cman/daemon/commands.c,v >retrieving revision 1.55.2.9 >diff -u -p -r1.55.2.9 commands.c >--- commands.c 31 Aug 2007 14:26:04 -0000 1.55.2.9 >+++ commands.c 31 Aug 2007 15:33:49 -0000 >@@ -95,7 +95,7 @@ static int get_highest_nodeid(void); > static int send_port_open_msg(unsigned char port); > static int send_port_enquire(int nodeid); > static void process_internal_message(char *data, int len, int nodeid, int byteswap); >-static void recalculate_quorum(int allow_decrease); >+static void recalculate_quorum(int allow_decrease, int by_current_nodes); > static void send_kill(int nodeid, uint16_t reason); > static char *killmsg_reason(int reason); > >@@ -326,11 +326,11 @@ static int calculate_quorum(int allow_de > } > > /* Recalculate cluster quorum, set quorate and notify changes */ >-static void recalculate_quorum(int allow_decrease) >+static void recalculate_quorum(int allow_decrease, int by_current_nodes) > { > unsigned int total_votes; > >- quorum = calculate_quorum(allow_decrease, 0, &total_votes); >+ quorum = calculate_quorum(allow_decrease, by_current_nodes?cluster_members:0, &total_votes); > set_quorate(total_votes); > notify_listeners(NULL, EVENT_REASON_STATECHANGE, 0); > } >@@ -788,7 +790,7 @@ static int do_cmd_set_votes(char *cmdbuf > return -EINVAL; > } > >- recalculate_quorum(1); >+ recalculate_quorum(1, 0); > > send_reconfigure(arg.nodeid, RECONFIG_PARAM_NODE_VOTES, arg.newvotes); > >@@ -1031,7 +1033,7 @@ static void ccsd_timer_fn(void *arg) > else { > log_msg(LOG_ERR, "Now got CCS information version %d, continuing\n", config_version); > config_error = 0; >- recalculate_quorum(0); >+ recalculate_quorum(0, 0); > } > } > >@@ -1046,7 +1048,7 @@ static void quorum_device_timer_fn(void > if (quorum_device->last_hello.tv_sec + quorumdev_poll/1000 < now.tv_sec) { > quorum_device->state = NODESTATE_DEAD; > log_msg(LOG_INFO, "lost contact with quorum device\n"); >- recalculate_quorum(0); >+ recalculate_quorum(0, 0); > } > else { > openais_timer_add_duration((unsigned long long)quorumdev_poll*1000000, quorum_device, >@@ -1067,7 +1069,7 @@ static int do_cmd_poll_quorum_device(cha > gettimeofday(&quorum_device->last_hello, NULL); > if (quorum_device->state == NODESTATE_DEAD) { > quorum_device->state = NODESTATE_MEMBER; >- recalculate_quorum(0); >+ recalculate_quorum(0, 0); > > openais_timer_add_duration((unsigned long long)quorumdev_poll*1000000, quorum_device, > quorum_device_timer_fn, &quorum_device_timer); >@@ -1076,7 +1078,7 @@ static int do_cmd_poll_quorum_device(cha > else { > if (quorum_device->state == NODESTATE_MEMBER) { > quorum_device->state = NODESTATE_DEAD; >- recalculate_quorum(0); >+ recalculate_quorum(0, 0); > openais_timer_delete(quorum_device_timer); > } > } >@@ -1498,7 +1505,7 @@ static int valid_transition_msg(int node > if (config_version > msg->config_version) { > // TODO tell everyone else to update... > } >- recalculate_quorum(0); >+ recalculate_quorum(0, 0); > } > > >@@ -1635,12 +1642,12 @@ static void do_reconfigure_msg(void *dat > node->expected_votes = msg->value; > } > } >- recalculate_quorum(1); /* Allow decrease */ >+ recalculate_quorum(1, 0); /* Allow decrease */ > break; > > case RECONFIG_PARAM_NODE_VOTES: > node->votes = msg->value; >- recalculate_quorum(1); /* Allow decrease */ >+ recalculate_quorum(1, 0); /* Allow decrease */ > break; > > case RECONFIG_PARAM_CONFIG_VERSION: >@@ -1649,7 +1656,7 @@ static void do_reconfigure_msg(void *dat > msg->value); > > config_error = 1; >- recalculate_quorum(0); >+ recalculate_quorum(0, 0); > > wanted_config_version = config_version; > openais_timer_add_duration((unsigned long long)ccsd_poll_interval*1000000, NULL, >@@ -1942,7 +1971,7 @@ void add_ais_node(int nodeid, uint64_t i > node->incarnation = incarnation; > node->state = NODESTATE_MEMBER; > cluster_members++; >- recalculate_quorum(0); >+ recalculate_quorum(0, 0); > } > } > >@@ -1972,7 +2002,7 @@ void del_ais_node(int nodeid) > case NODESTATE_MEMBER: > node->state = NODESTATE_DEAD; > cluster_members--; >- recalculate_quorum(0); >+ recalculate_quorum(0, 0); > break; > > case NODESTATE_AISONLY: >@@ -1983,10 +2013,10 @@ void del_ais_node(int nodeid) > node->state = NODESTATE_DEAD; > cluster_members--; > >- if ((node->leave_reason & 0xF) == CLUSTER_LEAVEFLAG_REMOVED) >- recalculate_quorum(1); >- else >- recalculate_quorum(0); >+ if ((node->leave_reason & 0xF) & CLUSTER_LEAVEFLAG_REMOVED) >+ recalculate_quorum(1, 1); >+ else >+ recalculate_quorum(0, 0); > break; > > case NODESTATE_JOINING:
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 271701
: 183581