Skip to content

Commit

Permalink
feat: add ovs/ovn log rotation
Browse files Browse the repository at this point in the history
(cherry picked from commit 86941a8)
  • Loading branch information
oilbeater committed Nov 25, 2020
1 parent b5dfc1c commit 186d90c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dist/images/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ RUN yum remove -y bind-export-libs && yum update -y && \
hostname ethtool \
iproute nc \
unbound-devel \
tcpdump ipset && \
tcpdump ipset logrotate && \
yum clean all
ARG RPM_ARCH
RUN rpm -ivh --nodeps https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/30/Everything/${RPM_ARCH}/os/Packages/i/iptables-1.8.0-5.fc30.${RPM_ARCH}.rpm
Expand All @@ -49,7 +49,8 @@ ENV KUBE_VERSION="v1.13.2"
RUN curl -L https://storage.googleapis.com/kubernetes-release/release/${KUBE_VERSION}/bin/linux/${ARCH}/kubectl -o /usr/bin/kubectl \
&& chmod +x /usr/bin/kubectl

RUN --mount=type=bind,target=/rpms,from=ovs-rpm,source=/rpms rpm -ivh --nodeps /rpms/*.rpm
RUN --mount=type=bind,target=/rpms,from=ovs-rpm,source=/rpms rpm -ivh --nodeps /rpms/*.rpm && \
sed '/su ovn ovn/d' /etc/logrotate.d/ovn

COPY *.sh /kube-ovn/
COPY grace_stop_ovn_controller /usr/share/ovn/scripts/grace_stop_ovn_controller
Expand Down
3 changes: 3 additions & 0 deletions dist/images/ovs-healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
set -euo pipefail
shopt -s expand_aliases

logrotate /etc/logrotate.d/openvswitch
logrotate /etc/logrotate.d/ovn

echo Connecting OVN SB "${OVN_SB_SERVICE_HOST}":"${OVN_SB_SERVICE_PORT}"
if [[ "$ENABLE_SSL" == "false" ]]; then
ovn-sbctl --db=tcp:["${OVN_SB_SERVICE_HOST}"]:"${OVN_SB_SERVICE_PORT}" --timeout=15 show
Expand Down

0 comments on commit 186d90c

Please sign in to comment.