summaryrefslogtreecommitdiff
path: root/libpod/container.go
diff options
context:
space:
mode:
authorAdrian Reber <areber@redhat.com>2018-12-11 16:27:05 +0000
committerAdrian Reber <adrian@lisas.de>2019-01-09 07:34:57 +0100
commit2553dad766afef1ff36d610a95a5f1a22450d5c3 (patch)
treec469b7b3e0db4225a15200dad22ab3a77a65a40c /libpod/container.go
parentab8e03b3e7b682263d72ca53d31a059c7259320d (diff)
downloadpodman-2553dad766afef1ff36d610a95a5f1a22450d5c3.tar.gz
podman-2553dad766afef1ff36d610a95a5f1a22450d5c3.tar.bz2
podman-2553dad766afef1ff36d610a95a5f1a22450d5c3.zip
Use existing interface to request IP address during restore
The initial implementation to request the same IP address for a container during a restore was based on environment variables influencing CNI. With this commit the IP address selection switches to Podman's internal static IP API. This commit does a comment change in libpod/container_easyjson.go to avoid unnecessary re-generation of libpod/container_easyjson.go during build as this fails in CI. The reason for this is that make sees that libpod/container_easyjson.go needs to be re-created. The commit, however, only changes a part of libpod/container.go which is marked as 'ffjson: skip'. Signed-off-by: Adrian Reber <areber@redhat.com>
Diffstat (limited to 'libpod/container.go')
-rw-r--r--libpod/container.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/libpod/container.go b/libpod/container.go
index 44992c534..d0eb6a992 100644
--- a/libpod/container.go
+++ b/libpod/container.go
@@ -128,6 +128,11 @@ type Container struct {
rootlessSlirpSyncR *os.File
rootlessSlirpSyncW *os.File
+
+ // A restored container should have the same IP address as before
+ // being checkpointed. If requestedIP is set it will be used instead
+ // of config.StaticIP.
+ requestedIP net.IP
}
// containerState contains the current state of the container