Skip to content

Commit

Permalink
Upgrade OVS to 2.17.7 (#5231)
Browse files Browse the repository at this point in the history
This is the latest patch version available for OVS 2.17.

We also fix a bug in the Dockerfile which installs OVS using .deb
packages built from source. The command that was used would try to
upgrade the openvswitch-* packages if a more recent version was
available in upstream repos, which would cause the installation to
fail. For now, we prefer to use the packages that we build from source,
as we have more granular control over which version gets installed. This
issue is fixed by using apt instead of dpkg to install the .deb packages
(this is supported in "recent" apt versions).

Thanks @Dyanngg for reporting the issue.

Signed-off-by: Antonin Bas <[email protected]>
  • Loading branch information
antoninbas authored Jul 12, 2023
1 parent 563001b commit 1e0fbd6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build/images/deps/ovs-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.17.6
2.17.7
6 changes: 5 additions & 1 deletion build/images/ovs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ COPY charon-logging.conf /tmp
# final image.
RUN apt-get update && \
apt-get install -y --no-install-recommends iptables logrotate libstrongswan-standard-plugins && \
(dpkg -i /tmp/ovs-debs/*.deb || apt-get -f -y --no-install-recommends install) && \
# -f / --fix-broken will take care of installing all missing dependencies
apt-get -f -y --no-install-recommends install /tmp/ovs-debs/*.deb && \
# make sure that openvswitch packages will not be upgraded by mistake
# in practice, the packages should not be upgraded anyway since they were installed using a .deb
apt-mark hold *openvswitch* && \
rm -rf /var/cache/apt/* /var/lib/apt/lists/* && \
sed -i "/rotate /a\ #size 100M" /etc/logrotate.d/openvswitch-switch && \
sed -i "/^.*filelog.*{/r /tmp/charon-logging.conf" /etc/strongswan.d/charon-logging.conf && \
Expand Down
4 changes: 2 additions & 2 deletions build/images/ovs/apply-patches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ function apply_patch() {
git apply "$@"
}

if version_lt "$OVS_VERSION" "2.13.0" || version_gt "$OVS_VERSION" "2.17.6"; then
echoerr "OVS_VERSION $OVS_VERSION is not supported (must be >= 2.13.0 and <= 2.17.6)"
if version_lt "$OVS_VERSION" "2.13.0" || version_gt "$OVS_VERSION" "2.17.7"; then
echoerr "OVS_VERSION $OVS_VERSION is not supported (must be >= 2.13.0 and <= 2.17.7)"
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ f06768ee-17ec-4abb-a971-b3b76abc8cda
Port antrea-gw0
Interface antrea-gw0
type: internal
ovs_version: "2.17.6"
ovs_version: "2.17.7"
```

- `ovs-ofctl show br-int`: show OpenFlow information of the OVS bridge.
Expand Down

0 comments on commit 1e0fbd6

Please sign in to comment.