Bug 1402536 - ipfailover keepalived split brain
Summary: ipfailover keepalived split brain
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Phil Cameron
QA Contact: Meng Bo
URL:
Whiteboard:
: 1405015 (view as bug list)
Depends On:
Blocks: 1417276 1417282
TreeView+ depends on / blocked
 
Reported: 2016-12-07 18:39 UTC by Steven Walter
Modified: 2023-09-14 03:35 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1417276 1417282 (view as bug list)
Environment:
Last Closed: 2017-04-12 19:17:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Origin (Github) 12399 0 None None None 2017-01-16 15:22:51 UTC
Red Hat Product Errata RHBA-2017:0884 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.5 RPM Release Advisory 2017-04-12 22:50:07 UTC

Description Steven Walter 2016-12-07 18:39:06 UTC
Description of problem:
The keepalive pod in one node always tries to be master, despite the master is already in another pod in another node, generating split brain. This is consistent on one node.

Version-Release number of selected component (if applicable):
3.3.0

How reproducible:
Unconfirmed



Actual results:
Two nodes working, when marking third node as schedulable (allowing a third ipfailover pod) it tries to take master. This leads to splitbrain and "no route to host" messages when trying to use routing to access services.

Expected results:
High availability setup working, single master

Additional info:
The behavior we are seeing (see following comments/uploads) is normally caused when there is something blocking connection between the nodes. However we have verified that the iptables look fine and that no other firewall is blocking the nodes. Multicast should be working. Yet they are not communicating properly.

Comment 5 Ben Bennett 2016-12-08 14:47:35 UTC
Can we get the full iptables output from the "bad" node, and the 'oc logs' output from the three ipfailover pods?

Comment 15 Phil Cameron 2017-01-05 18:28:52 UTC
See:
https://github.com/openshift/origin/pull/12399
out for review

Comment 16 openshift-github-bot 2017-01-11 21:08:40 UTC
Commit pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/11034c6fc7fbe50d6cf9442c47749acf77407a87
ipfailover keepalived split brain

All of the VIPs try to end up on the same node. The process doesn't
settle on a node. This fix eliminates the vrrp_sync_group. The result
is each VIP settles on a node and not all appear on the same node.

There is some general coding style cleanup included as well.
The check and notify scripts are in the vrrp_instance for each VIP.

Note: This may look like a script generating a script. It is not. The
script generates the keepalived.conf config file which is input by
keepalived when it starts.

Bug 1402536, 1405015
https://bugzilla.redhat.com/show_bug.cgi?id=1402536
https://bugzilla.redhat.com/show_bug.cgi?id=1405015

Signed-off-by: Phil Cameron <pcameron>

Comment 17 Phil Cameron 2017-01-11 21:38:10 UTC
*** Bug 1405015 has been marked as a duplicate of this bug. ***

Comment 23 Kenjiro Nakayama 2017-01-23 00:42:19 UTC
per c#14, could you please decide if you will backport the fix to 3.4/3.3? (although it may have the workaround as below)

3.2 -> works well   (no problem)
3.3 -> has this bug (use 3.2 image for the workaround)
3.4 -> has this bug (use 3.2 image for the workaround)

Comment 24 Phil Cameron 2017-01-23 18:38:25 UTC
The 3.5 version is quite different than earlier versions. What do you think about forward porting the change in images/ipfailover/keepalived/lib/config-generators.sh 3.2 into 3.3, 3.4? It amounts to reverting a one line change.

-$(generate_vrrp_sync_groups "$HA_CONFIG_NAME" "$vips") << 3.2 +$(generate_vrrp_sync_groups "$HA_CONFIG_NAME" "$HA_VIPS") << 3.3, 3.4

Comment 28 Troy Dawson 2017-01-27 17:36:09 UTC
This bug needs to be cloned so we can have it for 3.3, 3.4 and 3.5.

Comment 29 Ben Bennett 2017-01-27 18:10:03 UTC
@pcameron: Can you clone it, set the target release appropriately and link the right PRs to each bug and put them in MODIFIED state please?

Comment 30 Phil Cameron 2017-01-27 19:08:43 UTC
Cloned for OSE 3.3 version
https://bugzilla.redhat.com/show_bug.cgi?id=1417276

Comment 31 Phil Cameron 2017-01-27 19:21:12 UTC
Cloned for OSE 3.4 version
https://bugzilla.redhat.com/show_bug.cgi?id=1417282

Comment 34 Troy Dawson 2017-01-31 20:10:20 UTC
This has been merged into ocp and is in OCP v3.5.0.12 or newer.

Comment 35 zhaozhanqi 2017-02-03 06:08:27 UTC
@troy Dawson

I checked this using keepalived image (openshift3/ose-keepalived-ipfailover   v3.3.1.12           97b4d028d09c  2 days ago)

# oc rsh ipf-1-36g9o cat keepalived/lib/config-generators.sh

<------snip---->

249  $(generate_vrrp_sync_groups "$HA_CONFIG_NAME" "$HA_VIPS")

<-----snip----->


Could you help the image if has been rebuilt using the latest code.

since I saw the repo code had been updated at below.

https://github.com/openshift/ose/blob/enterprise-3.3/images/ipfailover/keepalived/lib/config-generators.sh#L249

Comment 36 Meng Bo 2017-02-03 10:04:26 UTC
Move the bug to ON_QA since the 3.3 issue is tracking by another bug.

Comment 37 Meng Bo 2017-02-04 10:20:28 UTC
Tested with OCP build 3.5.0.16.

After scale the ipfailover dc up, the new pod will get the MASTER state, and the old pod will enter BACKUP state. 

Move the bug to verified.

Comment 38 Marc Jadoul 2017-02-09 15:34:26 UTC
As I was hit by this bug on OSE 3.2, will there be a fix for 3.2 images also?
The Redhat CASE was 01745024.

Comment 39 Ben Bennett 2017-02-09 15:44:32 UTC
3.2 was reported as working.  I see youare using 3.2.1.  Can you roll back the ipfailover image to 3.2.0 to work around it?

Comment 40 Alexander Koksharov 2017-02-13 12:28:28 UTC
Will there be an update for 3.2/3.3 versions of an image?

Comment 41 Phil Cameron 2017-02-13 15:35:49 UTC
See clone 1417276 for 3.3 release.

No change for 3.2 since the problem is not there and it is the workaround.

Comment 46 Phil Cameron 2017-02-15 14:38:00 UTC
bbennett

3.2.1.26 has the fix - last changed 2015-04-13

Comment 47 Ben Bennett 2017-02-15 14:47:42 UTC
Sorry, Aleksander, I killed the needinfo.  But we do need what Phil requested:

  Please get the image name from the ipfailover dc.

  Please get a copy of lib/config-generators.sh from the pod that is having problems. I just need lines 240-260

For the second, 'oc rsh <podname>' then grab:
  /var/lib/ipfailover/keepalived/lib/config-generators.sh

You can do:
  grep generate_vrrp_sync_groups /var/lib/ipfailover/keepalived/lib/config-generators.sh

Comment 53 errata-xmlrpc 2017-04-12 19:17:52 UTC
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:0884

Comment 54 Red Hat Bugzilla 2023-09-14 03:35:50 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


Note You need to log in before you can comment on or make changes to this bug.