Skip to content

Commit e1b7919

Browse files
committed
ovs: fix memory leak in qos (#2871)
1 parent 50cc00d commit e1b7919

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

dist/images/Dockerfile.base

+15-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ RUN cd /usr/src/ && \
2828
curl -s https://github.com/kubeovn/ovs/commit/b721a251dadfb0857a2aebe32611d18ca935421f.patch | git apply && \
2929
# ovsdb-tool: add optional server id parameter for "join-cluster" command
3030
curl -s https://github.com/kubeovn/ovs/commit/0664cbe47d1684ca5b7147e3449779635454970e.patch | git apply && \
31+
# fix memory leak in qos
32+
curl -s https://github.com/kubeovn/ovs/commit/6a4dd2f4b9311a227cc26fef7c398ae9b241311b.patch | git apply && \
3133
# compile without avx512
3234
if [ "$ARCH" = "amd64" -a "$NO_AVX512" = "true" ]; then curl -s https://github.com/kubeovn/ovs/commit/f61283c8934589fe6de2b1e86041204dfc31a3e3.patch | git apply; fi && \
3335
./boot.sh && \
@@ -76,14 +78,12 @@ RUN mkdir /packages/ && \
7678

7779
FROM ubuntu:22.04
7880

79-
ARG DEBUG=false
8081
ARG DEBIAN_FRONTEND=noninteractive
8182
RUN apt update && apt upgrade -y && apt install ca-certificates python3 hostname libunwind8 netbase \
8283
ethtool iproute2 ncat libunbound-dev procps libatomic1 kmod iptables \
8384
tcpdump ipset curl uuid-runtime openssl inetutils-ping arping ndisc6 \
8485
logrotate dnsutils net-tools strongswan strongswan-pki libcharon-extra-plugins \
8586
libcharon-extauth-plugins libstrongswan-extra-plugins libstrongswan-standard-plugins -y --no-install-recommends && \
86-
if [ "${DEBUG}" = "true" ]; then apt install -y --no-install-recommends valgrind; fi && \
8787
rm -rf /var/lib/apt/lists/* && \
8888
rm -rf /etc/localtime
8989

@@ -106,7 +106,6 @@ RUN --mount=type=bind,target=/packages,from=ovs-builder,source=/packages \
106106
dpkg -i /packages/python3-openvswitch*.deb && \
107107
dpkg -i /packages/openvswitch-*.deb && \
108108
dpkg -i --ignore-depends=openvswitch-switch,openvswitch-common /packages/ovn-*.deb && \
109-
if [ "${DEBUG}" = "true" ]; then dpkg -i --ignore-depends=openvswitch-switch,openvswitch-common /packages/*.ddeb; fi && \
110109
mv /usr/lib/python3.7/dist-packages/ovs /usr/lib/python3/dist-packages/ && \
111110
rm -rf /var/lib/openvswitch/pki/
112111

@@ -116,4 +115,17 @@ RUN dump_arch="x86_64"; \
116115
curl -sSf -L --retry 5 -o /usr/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v${DUMB_INIT_VERSION}/dumb-init_${DUMB_INIT_VERSION}_${dump_arch} && \
117116
chmod +x /usr/bin/dumb-init
118117

118+
RUN --mount=type=bind,target=/packages,from=ovs-builder,source=/packages \
119+
dpkg -i /packages/openvswitch-*.deb /packages/python3-openvswitch*.deb && \
120+
dpkg -i --ignore-depends=openvswitch-switch,openvswitch-common /packages/ovn-*.deb && \
121+
rm -rf /var/lib/openvswitch/pki/
122+
123+
ARG DEBUG=false
124+
RUN --mount=type=bind,target=/packages,from=ovs-builder,source=/packages \
125+
if [ "${DEBUG}" = "true" ]; then \
126+
apt update && apt install -y --no-install-recommends valgrind && \
127+
rm -rf /var/lib/apt/lists/* && \
128+
dpkg -i --ignore-depends=openvswitch-switch,openvswitch-common /packages/*.ddeb; \
129+
fi
130+
119131
ENTRYPOINT ["/usr/bin/dumb-init", "--"]

0 commit comments

Comments
 (0)