summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
Diffstat (limited to 'libpod')
-rw-r--r--libpod/container_api.go1
-rw-r--r--libpod/container_internal.go2
-rw-r--r--libpod/container_internal_linux.go4
-rw-r--r--libpod/pod_internal.go2
-rw-r--r--libpod/runtime.go2
5 files changed, 9 insertions, 2 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go
index ed3e08dc7..370e3e5d9 100644
--- a/libpod/container_api.go
+++ b/libpod/container_api.go
@@ -627,6 +627,7 @@ func (c *Container) Batch(batchFunc func(*Container) error) error {
newCtr.config = c.config
newCtr.state = c.state
newCtr.runtime = c.runtime
+ newCtr.ociRuntime = c.ociRuntime
newCtr.lock = c.lock
newCtr.valid = true
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 3e2fd0c44..56fd27afb 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -509,7 +509,7 @@ func (c *Container) refresh() error {
// We need to pick up a new lock
lock, err := c.runtime.lockManager.AllocateAndRetrieveLock(c.config.LockID)
if err != nil {
- return errors.Wrapf(err, "error acquiring lock for container %s", c.ID())
+ return errors.Wrapf(err, "error acquiring lock %d for container %s", c.config.LockID, c.ID())
}
c.lock = lock
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go
index 60633e58c..50a2e2d44 100644
--- a/libpod/container_internal_linux.go
+++ b/libpod/container_internal_linux.go
@@ -1069,6 +1069,10 @@ func (c *Container) getHosts() string {
hosts += fmt.Sprintf("%s %s\n", fields[1], fields[0])
}
}
+ if c.config.NetMode.IsSlirp4netns() {
+ // When using slirp4netns, the interface gets a static IP
+ hosts += fmt.Sprintf("# used by slirp4netns\n%s\t%s\n", "10.0.2.100", c.Hostname())
+ }
if len(c.state.NetworkStatus) > 0 && len(c.state.NetworkStatus[0].IPs) > 0 {
ipAddress := strings.Split(c.state.NetworkStatus[0].IPs[0].Address.String(), "/")[0]
hosts += fmt.Sprintf("%s\t%s\n", ipAddress, c.Hostname())
diff --git a/libpod/pod_internal.go b/libpod/pod_internal.go
index 1fcb5b1a6..23359d841 100644
--- a/libpod/pod_internal.go
+++ b/libpod/pod_internal.go
@@ -58,7 +58,7 @@ func (p *Pod) refresh() error {
// Retrieve the pod's lock
lock, err := p.runtime.lockManager.AllocateAndRetrieveLock(p.config.LockID)
if err != nil {
- return errors.Wrapf(err, "error retrieving lock for pod %s", p.ID())
+ return errors.Wrapf(err, "error retrieving lock %d for pod %s", p.config.LockID, p.ID())
}
p.lock = lock
diff --git a/libpod/runtime.go b/libpod/runtime.go
index d4d34242c..78fa22ec8 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -291,6 +291,8 @@ func defaultRuntimeConfig() (RuntimeConfig, error) {
"/usr/local/libexec/crio/conmon",
"/usr/bin/conmon",
"/usr/sbin/conmon",
+ "/usr/local/bin/conmon",
+ "/usr/local/sbin/conmon",
"/usr/lib/crio/bin/conmon",
},
ConmonEnvVars: []string{