summaryrefslogtreecommitdiff
path: root/libpod/networking_linux.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-03-23 12:04:38 +0100
committerGitHub <noreply@github.com>2020-03-23 12:04:38 +0100
commite34ec617a3ea5758a173579b879897a52fbd1c60 (patch)
treee4af931687d4941fd4c9ebdad2945dfa70b78660 /libpod/networking_linux.go
parent72a2011cb12a2fbf74abf7c32fba8505a5f4e8f6 (diff)
parentb6954758bb17f846f81fada71385a94b5072e91c (diff)
downloadpodman-e34ec617a3ea5758a173579b879897a52fbd1c60.tar.gz
podman-e34ec617a3ea5758a173579b879897a52fbd1c60.tar.bz2
podman-e34ec617a3ea5758a173579b879897a52fbd1c60.zip
Merge pull request #5434 from mheon/force_delete_cni_netreg
Attempt manual removal of CNI IP allocations on refresh
Diffstat (limited to 'libpod/networking_linux.go')
-rw-r--r--libpod/networking_linux.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go
index 5a27a2abb..f1bf79ce7 100644
--- a/libpod/networking_linux.go
+++ b/libpod/networking_linux.go
@@ -657,6 +657,13 @@ func resultToBasicNetworkConfig(result *cnitypes.Result) (InspectBasicNetworkCon
return config, nil
}
+// This is a horrible hack, necessary because CNI does not properly clean up
+// after itself on an unclean reboot. Return what we're pretty sure is the path
+// to CNI's internal files (it's not really exposed to us).
+func getCNINetworksDir() (string, error) {
+ return "/var/lib/cni/networks", nil
+}
+
type logrusDebugWriter struct {
prefix string
}