Skip to content

Commit 27c6ff3

Browse files
Merge pull request #18779 from dcbw/sdn-ipam-datadir-fixup
Automatic merge from submit-queue. sdn: fix CNI IPAM data dir Data directory passed to the CNI host-local delegate plugin should be /var/lib/cni/networks, but the original patch missed one place to append "/networks" (the one that mattered). Fix-up for #18404 Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1549491 @openshift/networking
2 parents 2755ea7 + 6ebf5c7 commit 27c6ff3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/network/node/metrics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ func updateARPMetrics() {
167167

168168
func updatePodIPMetrics() {
169169
numAddrs := 0
170-
items, err := ioutil.ReadDir(hostLocalDataDir + "/networks/openshift-sdn/")
170+
items, err := ioutil.ReadDir(hostLocalDataDir + "/openshift-sdn/")
171171
if err != nil && os.IsNotExist(err) {
172172
// Don't log an error if the directory doesn't exist (eg, no pods started yet)
173173
return

pkg/network/node/node.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import (
4848

4949
const (
5050
openshiftCNIFile = "80-openshift-network.conf"
51-
hostLocalDataDir = "/var/lib/cni"
51+
hostLocalDataDir = "/var/lib/cni/networks"
5252
)
5353

5454
type osdnPolicy interface {

0 commit comments

Comments
 (0)