forked from antrea-io/antrea
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Preserve OVS datapath flows after an agent restart
Without this patch, when the antrea-ovs container exits gracefully (e.g. as part of a RollingUpdate for the DaemonSet), datapath flows are deleted, which breaks existing connections. It takes 10 seconds for exiting connections to start working again. A recent OVS patch changed the default behavior of ovs-vswitchd so that datapath flows are no longer deleted on exit. Because this patch is not yet available in any released OVS version (and won't be for > 6 months), we apply it manually when we build our base OVS Docker image. This is a step towards non-disruptive upgrade. However, there are other factors in play: 1) when the OVS daemons are stopped, the VXLAN device (vxlan_sys_4789) goes away, which impacts connectivity between Nodes, and 2) when ovs-vswitchd restarts, datapath flows are flushed and we have to wait until the Antrea Agent has replayed the flows. * Disable new e2e test for Kind When using the netdev datapath, packet forwarding is done by the ovs-vswitchd daemon itself, so even existing connections are broken. * Use arping instead of ping for test When using ping the test can be flaky: if one of the hosts need to send an ARP request to refresh its ARP entry while the test is ongoing, odds are that there is no cached flow in the datapath. If this happens, the host will mark the ARP entry has "incomplete" and the ping will start failing. Fixes antrea-io#355
- Loading branch information
1 parent
b6f87f3
commit e4a0467
Showing
6 changed files
with
214 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright 2020 Antrea Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# This script applies unreleased patches (or released in a more recent version | ||
# of OVS than the one Antrea is using) to OVS before building it. It needs to be | ||
# run from the root of the OVS source tree. | ||
|
||
set -eo pipefail | ||
|
||
# We cannot use 3-way merge unless we are in a git repository. If we need 3-way | ||
# merge, we will need to clone the repository with git instead of downloading a | ||
# release tarball (see Dockerfile). | ||
|
||
# These 2 patches (post 2.13.0) ensures that datapath flows are not deleted on | ||
# ovs-vswitchd exit by default. Antrea relies on this to support hitless upgrade | ||
# of the Agent DaemonSet. | ||
# The second patch depends on the first one. | ||
curl https://github.com/openvswitch/ovs/commit/586cd3101e7fda54d14fb5bf12d847f35d968627.patch | \ | ||
git apply | ||
# We exclude 2 files which are likely to cause conflicts. | ||
curl https://github.com/openvswitch/ovs/commit/79eadafeb1b47a3871cb792aa972f6e4d89d1a0b.patch | \ | ||
git apply --exclude NEWS --exclude vswitchd/ovs-vswitchd.8.in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters