Skip to content

Commit 4fb27fe

Browse files
committed
Dockerfile: Unpin OVS and consume the latest from FDP.
OVN-Kubernetes is always lagging behind on the version of OVS it pins. This is causing a lot of trouble with keeping up with bug fixes and especially CVE fixes on older branches, resulting in scanners constantly flagging this image with poor security grades. OVS package inside the container is responsible for the following: 1. Command line utilities to talk with OVS from the host. 2. ovsdb-server processes serving OVN databases. 3. ovs-monitor-ipsec script for managing ipsec configuration on OVN tunnels. These tools/programs are not changing that much between patch releases, and bug fix releases in FDP are going through a lot of testing before becoming available in the repo. So, benefits of timely delivery of bug and CVE fixes significantly outweighs the small risks that automatic consumption of new builds incurs. Main OVS is working on the host and follows FDP for a very long time now, and it's also better to keep the minor versions between host and container in sync, just to decrease the amount of variables in the system. Signed-off-by: Ilya Maximets <[email protected]>
1 parent f7dd74f commit 4fb27fe

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Dockerfile.base

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,28 @@ RUN dnf --setopt=retries=2 --setopt=timeout=2 install -y --nodocs \
1212
selinux-policy procps-ng && \
1313
dnf clean all
1414

15-
ARG ovsver=3.5.0-0.9.el9fdp
15+
# NOTE: OVS is not pinned to a particular patch version in order to stay in
16+
# sync with the OVS running on the host (it is not strictly necessary, but
17+
# reduces the number of variables in the system) and receive all the CVE and
18+
# bug fixes automatically.
19+
ARG ovsver=3.5
1620
ARG ovnver=24.09.2-41.el9fdp
1721
# NOTE: Ensure that the versions of OVS and OVN are overriden for OKD in each of the subsequent layers.
1822
# Centos and RHEL releases for ovn are built out of sync, so please make sure to bump for OKD with
1923
# the corresponding Centos version when updating the OCP version.
20-
ARG ovsver_okd=3.5.0-10.el9s
24+
ARG ovsver_okd=3.5
2125
# We are not bumping the OVN version for OKD since the FDP release is not done yet.
2226
ARG ovnver_okd=24.09.1-10.el9s
2327

2428
RUN INSTALL_PKGS="iptables nftables" && \
2529
source /etc/os-release && \
2630
[ "${ID}" == "centos" ] && ovsver=$ovsver_okd && ovnver=$ovnver_okd; \
27-
ovsver_short=$(echo "$ovsver" | cut -d'.' -f1,2) && \
2831
ovnver_short=$(echo "$ovnver" | cut -d'.' -f1,2) && \
2932
dnf --setopt=retries=2 --setopt=timeout=2 install -y --nodocs $INSTALL_PKGS && \
30-
dnf --setopt=retries=2 --setopt=timeout=2 install -y --nodocs "openvswitch$ovsver_short = $ovsver" "python3-openvswitch$ovsver_short = $ovsver" && \
33+
dnf --setopt=retries=2 --setopt=timeout=2 install -y --nodocs "openvswitch$ovsver" "python3-openvswitch$ovsver" && \
3134
dnf --setopt=retries=2 --setopt=timeout=2 install -y --nodocs "ovn$ovnver_short = $ovnver" "ovn$ovnver_short-central = $ovnver" "ovn$ovnver_short-host = $ovnver" && \
3235
dnf clean all && rm -rf /var/cache/* && \
33-
sed 's/%/"/g' <<<"%openvswitch$ovsver_short-devel = $ovsver% %openvswitch$ovsver_short-ipsec = $ovsver% %ovn$ovnver_short-vtep = $ovnver%" > /more-pkgs
36+
sed 's/%/"/g' <<<"%openvswitch$ovsver-devel% %openvswitch$ovsver-ipsec% %ovn$ovnver_short-vtep = $ovnver%" > /more-pkgs
3437

3538
RUN mkdir -p /var/run/openvswitch && \
3639
mkdir -p /var/run/ovn && \

0 commit comments

Comments
 (0)