From dac0469f113253f7ece165ec2e5fbc1ec29a5aab Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 28 Feb 2018 13:27:00 -0600 Subject: [PATCH] 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 https://github.com/openshift/origin/pull/18404 Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1549491 --- pkg/network/node/metrics.go | 2 +- pkg/network/node/node.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/network/node/metrics.go b/pkg/network/node/metrics.go index 8cad4d88d78d..168f7e9375f3 100644 --- a/pkg/network/node/metrics.go +++ b/pkg/network/node/metrics.go @@ -167,7 +167,7 @@ func updateARPMetrics() { func updatePodIPMetrics() { numAddrs := 0 - items, err := ioutil.ReadDir(hostLocalDataDir + "/networks/openshift-sdn/") + items, err := ioutil.ReadDir(hostLocalDataDir + "/openshift-sdn/") if err != nil && os.IsNotExist(err) { // Don't log an error if the directory doesn't exist (eg, no pods started yet) return diff --git a/pkg/network/node/node.go b/pkg/network/node/node.go index 45c43351611b..0a7128146ff7 100644 --- a/pkg/network/node/node.go +++ b/pkg/network/node/node.go @@ -48,7 +48,7 @@ import ( const ( openshiftCNIFile = "80-openshift-network.conf" - hostLocalDataDir = "/var/lib/cni" + hostLocalDataDir = "/var/lib/cni/networks" ) type osdnPolicy interface {