Hide Forgot
> Description of problem: Setting the number of expected votes to at least a double of current number of votes returns an error. According to the status output the number of expected votes appears to have been set, but not taken into account as the cluster is still quorate. [root@virt-123 ~]# corosync-quorumtool -e 15 Unable to set expected votes: CS_ERR_INVALID_PARAM [root@virt-123 ~]# corosync-quorumtool -s -p | sed -n '/Votequorum/,/^$/p' Votequorum information ---------------------- Expected votes: 15 Highest expected: 15 Total votes: 6 Quorum: 4 Flags: Quorate > Version-Release number of selected component (if applicable): corosync-2.4.0-3.el7.x86_64
Chrissie, assigning to you because this is really your field of expertise. Basically what is happening is that message_handler_req_lib_votequorum_setexpected calls calculate_quorum which sets node->expected_votes simply because max_expected != 0. It looks kind of logical to let calculate_quorum be really functional without side effects, but because source code of problematic line is dated 2009-01-26 10:46:08 it really better to hear original author (you ;) ) opinion.
Created attachment 1196770 [details] Patch Your analysis is correct, calculate_quorum should not produce side-effects. For the patch I've separated out the updating of node->expected_votes so it's called only when needed.
@Chrissie, can you please fix the patch as we discussed (call update_node_expected_votes in message_handler_req_exec_votequorum_reconfigure) and merge to gh?
I've just realised it doesn't need to be done, as message_handler_req_exec_votequorum_reconfigure calls recalculate_quorum() which does it. So I'll just commit that patch as-is.
Idea was about getting rid of redundant code (list_iterate is same as update_node_expected_votes)...
OK done.
Created attachment 1200756 [details] votequorum: simplify reconfigure message handling votequorum: simplify reconfigure message handling As we now have update_node_expected_votes(), we can use that when receiving a new EXPECTED_VOTES value from another node rather than having our own loop. Signed-off-by: Christine Caulfield <ccaulfie>
Created attachment 1265145 [details] libvotequorum: Bump version libvotequorum: Bump version Signed-off-by: Jan Friesse <jfriesse>
Created attachment 1265179 [details] [build] Fix build on RHEL7.3 latest [build] Fix build on RHEL7.3 latest header inclusion have changed Signed-off-by: Fabio M. Di Nitto <fdinitto> (cherry picked from commit e204e871ec4eb705d177598d5c7ae8f0446a280f)
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:1999