Bug 1371880
| Summary: | Setting a high number of expected votes returns an error, while still appears to be set | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Radek Steiger <rsteiger> | ||||||||||
| Component: | corosync | Assignee: | Christine Caulfield <ccaulfie> | ||||||||||
| Status: | CLOSED ERRATA | QA Contact: | cluster-qe <cluster-qe> | ||||||||||
| Severity: | low | Docs Contact: | |||||||||||
| Priority: | low | ||||||||||||
| Version: | 7.3 | CC: | ccaulfie, cluster-maint, jfriesse, mjuricek | ||||||||||
| Target Milestone: | rc | ||||||||||||
| Target Release: | --- | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| Whiteboard: | |||||||||||||
| Fixed In Version: | corosync-2.4.0-6.el7 | Doc Type: | No Doc Update | ||||||||||
| Doc Text: |
undefined
|
Story Points: | --- | ||||||||||
| Clone Of: | Environment: | ||||||||||||
| Last Closed: | 2017-08-01 18:40:01 UTC | Type: | Bug | ||||||||||
| Regression: | --- | Mount Type: | --- | ||||||||||
| Documentation: | --- | CRM: | |||||||||||
| Verified Versions: | Category: | --- | |||||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
| Embargoed: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Radek Steiger
2016-08-31 10:41:20 UTC
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 |