mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
Add missing runtime.go lines to set namespace
Also add namespace to inspect output to verify its presence Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
This commit is contained in:
@ -69,6 +69,7 @@ func (c *Container) getContainerInspectData(size bool, driverData *inspect.Data)
|
|||||||
ImageID: config.RootfsImageID,
|
ImageID: config.RootfsImageID,
|
||||||
ImageName: config.RootfsImageName,
|
ImageName: config.RootfsImageName,
|
||||||
ExitCommand: config.ExitCommand,
|
ExitCommand: config.ExitCommand,
|
||||||
|
Namespace: config.Namespace,
|
||||||
Rootfs: config.Rootfs,
|
Rootfs: config.Rootfs,
|
||||||
ResolvConfPath: resolvPath,
|
ResolvConfPath: resolvPath,
|
||||||
HostnamePath: hostnamePath,
|
HostnamePath: hostnamePath,
|
||||||
|
@ -505,6 +505,11 @@ func makeRuntime(runtime *Runtime) (err error) {
|
|||||||
return errors.Wrapf(ErrInvalidArg, "unrecognized state type passed")
|
return errors.Wrapf(ErrInvalidArg, "unrecognized state type passed")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err := runtime.state.SetNamespace(runtime.config.Namespace); err != nil {
|
||||||
|
return errors.Wrapf(err, "error setting libpod namespace in state")
|
||||||
|
}
|
||||||
|
logrus.Debugf("Set libpod namespace to %q", runtime.config.Namespace)
|
||||||
|
|
||||||
// We now need to see if the system has restarted
|
// We now need to see if the system has restarted
|
||||||
// We check for the presence of a file in our tmp directory to verify this
|
// We check for the presence of a file in our tmp directory to verify this
|
||||||
// This check must be locked to prevent races
|
// This check must be locked to prevent races
|
||||||
|
@ -169,6 +169,7 @@ type ContainerInspectData struct {
|
|||||||
Dependencies []string `json:"Dependencies"`
|
Dependencies []string `json:"Dependencies"`
|
||||||
NetworkSettings *NetworkSettings `json:"NetworkSettings"` //TODO
|
NetworkSettings *NetworkSettings `json:"NetworkSettings"` //TODO
|
||||||
ExitCommand []string `json:"ExitCommand"`
|
ExitCommand []string `json:"ExitCommand"`
|
||||||
|
Namespace string `json:"Namespace"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ContainerInspectState represents the state of a container.
|
// ContainerInspectState represents the state of a container.
|
||||||
|
Reference in New Issue
Block a user