4 Commits

Author SHA1 Message Date
OpenShift Merge Robot
30668ec22b Merge pull request #85 from openshift-bot/art-consistency-openshift-4.6-multus-cni
Updating multus-cni builder & base images to be consistent with ART
2021-01-14 18:51:37 -05:00
AOS Automation Release Team
dc18392c36 Updating multus-cni builder & base images to be consistent with ART
Reconciling with 4a98c8d67f/images/multus-cni.yml
2021-01-14 05:01:47 +00:00
OpenShift Merge Robot
6fb56fdcbe Merge pull request #84 from dougbtv/backport-exit-zero-on-del-4.6
Bug 1905230: Multus should exit zero on DEL when cache file is missing [backport 4.6]
2020-12-12 09:52:19 -05:00
dougbtv
4459a257d5 Multus should exit zero on DEL when cache file is missing and pod cannot be found.
Otherwise, this can cause a pod to not be fully deleted, its sandbox may remain as the DEL continues to be retried due to exiting non-zero every time.

See: https://bugzilla.redhat.com/show_bug.cgi?id=1900835
2020-12-07 14:17:43 -05:00
2 changed files with 7 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
# This dockerfile is specific to building Multus for OpenShift
FROM registry.svc.ci.openshift.org/ocp/builder:rhel-8-golang-1.15-openshift-4.6 as rhel8
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.15-openshift-4.6 AS rhel8
ADD . /usr/src/multus-cni
WORKDIR /usr/src/multus-cni
ENV CGO_ENABLED=1
@@ -9,7 +9,7 @@ RUN ./build && \
cd /usr/src/multus-cni/bin
WORKDIR /
FROM registry.svc.ci.openshift.org/ocp/builder:rhel-7-golang-1.15-openshift-4.6 AS rhel7
FROM registry.ci.openshift.org/ocp/builder:rhel-7-golang-1.15-openshift-4.6 AS rhel7
ADD . /usr/src/multus-cni
WORKDIR /usr/src/multus-cni
ENV CGO_ENABLED=1
@@ -23,7 +23,7 @@ RUN ./build && \
cd /usr/src/multus-cni/bin
WORKDIR /
FROM registry.svc.ci.openshift.org/ocp/4.6:base
FROM registry.ci.openshift.org/ocp/4.6:base
RUN mkdir -p /usr/src/multus-cni/images && \
mkdir -p /usr/src/multus-cni/bin && \
mkdir -p /usr/src/multus-cni/rhel7/bin && \

View File

@@ -758,7 +758,10 @@ func cmdDel(args *skel.CmdArgs, exec invoke.Exec, kubeClient *k8s.ClientInfo) er
logging.Errorf("Multus: failed to get delegates: %v, but continue to delete clusterNetwork", err)
}
} else {
return cmdErr(k8sArgs, "error reading the delegates: %v", err)
// The options to continue with a delete have been exhausted (cachefile + API query didn't work)
// We cannot exit with an error as this may cause a sandbox to never get deleted.
logging.Errorf("Multus: failed to get the cached delegates file: %v, cannot properly delete", err)
return nil
}
} else {
defer os.Remove(path)