diff options
author | Adrian Reber <areber@redhat.com> | 2018-12-11 16:27:05 +0000 |
---|---|---|
committer | Adrian Reber <adrian@lisas.de> | 2019-01-09 07:34:57 +0100 |
commit | 2553dad766afef1ff36d610a95a5f1a22450d5c3 (patch) | |
tree | c469b7b3e0db4225a15200dad22ab3a77a65a40c /libpod/container_internal_linux.go | |
parent | ab8e03b3e7b682263d72ca53d31a059c7259320d (diff) | |
download | podman-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_internal_linux.go')
-rw-r--r-- | libpod/container_internal_linux.go | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index 0745b7732..1bab596fb 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -547,10 +547,8 @@ func (c *Container) restore(ctx context.Context, options ContainerCheckpointOpti } } if IP != nil { - env := fmt.Sprintf("IP=%s", IP) // Tell CNI which IP address we want. - os.Setenv("CNI_ARGS", env) - logrus.Debugf("Restoring container with %s", env) + c.requestedIP = IP } } @@ -566,12 +564,6 @@ func (c *Container) restore(ctx context.Context, options ContainerCheckpointOpti return err } - // TODO: use existing way to request static IPs, once it is merged in ocicni - // https://github.com/cri-o/ocicni/pull/23/ - - // CNI_ARGS was used to request a certain IP address. Unconditionally remove it. - os.Unsetenv("CNI_ARGS") - // Read config jsonPath := filepath.Join(c.bundlePath(), "config.json") logrus.Debugf("generate.NewFromFile at %v", jsonPath) |