Skip to content

Commit

Permalink
Merge pull request #18779 from dcbw/sdn-ipam-datadir-fixup
Browse files Browse the repository at this point in the history
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
  • Loading branch information
openshift-merge-robot committed Feb 28, 2018
2 parents 2755ea7 + 6ebf5c7 commit 27c6ff3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/network/node/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/network/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import (

const (
openshiftCNIFile = "80-openshift-network.conf"
hostLocalDataDir = "/var/lib/cni"
hostLocalDataDir = "/var/lib/cni/networks"
)

type osdnPolicy interface {
Expand Down

0 comments on commit 27c6ff3

Please sign in to comment.