summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
Diffstat (limited to 'libpod')
-rw-r--r--libpod/config/config.go2
-rw-r--r--libpod/container_api.go2
-rw-r--r--libpod/container_inspect.go4
-rw-r--r--libpod/container_internal.go2
-rw-r--r--libpod/networking_linux.go4
-rw-r--r--libpod/oci.go2
-rw-r--r--libpod/runtime_ctr.go10
7 files changed, 17 insertions, 9 deletions
diff --git a/libpod/config/config.go b/libpod/config/config.go
index c72a0efc7..5d59f1bf2 100644
--- a/libpod/config/config.go
+++ b/libpod/config/config.go
@@ -437,7 +437,7 @@ func probeConmon(conmonBinary string) error {
// with cgroupsv2. Other OCI runtimes are not yet supporting cgroupsv2. This
// might change in the future.
func NewConfig(userConfigPath string) (*Config, error) {
- // Start with the default config and interatively merge fields in the system
+ // Start with the default config and iteratively merge fields in the system
// configs.
config, err := defaultConfigFromMemory()
if err != nil {
diff --git a/libpod/container_api.go b/libpod/container_api.go
index dc7470f1a..5e8fcea47 100644
--- a/libpod/container_api.go
+++ b/libpod/container_api.go
@@ -412,7 +412,7 @@ func (c *Container) Attach(streams *AttachStreams, keys string, resize <-chan re
// HTTPAttach forwards an attach session over a hijacked HTTP session.
// HTTPAttach will consume and close the included httpCon, which is expected to
// be sourced from a hijacked HTTP connection.
-// The cancel channel is optional, and can be used to asyncronously cancel the
+// The cancel channel is optional, and can be used to asynchronously cancel the
// attach session.
// The streams variable is only supported if the container was not a terminal,
// and allows specifying which of the container's standard streams will be
diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go
index a543a19c0..50ae72499 100644
--- a/libpod/container_inspect.go
+++ b/libpod/container_inspect.go
@@ -670,8 +670,8 @@ type InspectAdditionalNetwork struct {
// DriverOpts is presently unused and maintained exclusively for
// compatibility.
DriverOpts map[string]string `json:"DriverOpts"`
- // IPAMConfig is presently unused and maintained exlusively for
- // compabitility.
+ // IPAMConfig is presently unused and maintained exclusively for
+ // compatibility.
IPAMConfig map[string]string `json:"IPAMConfig"`
// Links is presently unused and maintained exclusively for
// compatibility.
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 67e02cc31..60b13f125 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -929,7 +929,7 @@ func (c *Container) completeNetworkSetup() error {
return err
}
for _, line := range strings.Split(string(b), "\n") {
- // only keep things that dont start with nameserver from the old
+ // only keep things that don't start with nameserver from the old
// resolv.conf file
if !strings.HasPrefix(line, "nameserver") {
outResolvConf = append([]string{line}, outResolvConf...)
diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go
index d57b1a8eb..5a27a2abb 100644
--- a/libpod/networking_linux.go
+++ b/libpod/networking_linux.go
@@ -117,10 +117,10 @@ func (r *Runtime) configureNetNS(ctr *Container, ctrNS ns.NetNS) ([]*cnitypes.Re
networkStatus := make([]*cnitypes.Result, 0)
for idx, r := range results {
- logrus.Debugf("[%d] CNI result: %v", idx, r.Result.String())
+ logrus.Debugf("[%d] CNI result: %v", idx, r.Result)
resultCurrent, err := cnitypes.GetResult(r.Result)
if err != nil {
- return nil, errors.Wrapf(err, "error parsing CNI plugin result %q: %v", r.Result.String(), err)
+ return nil, errors.Wrapf(err, "error parsing CNI plugin result %q: %v", r.Result, err)
}
networkStatus = append(networkStatus, resultCurrent)
}
diff --git a/libpod/oci.go b/libpod/oci.go
index e5f9b2135..41d420664 100644
--- a/libpod/oci.go
+++ b/libpod/oci.go
@@ -55,7 +55,7 @@ type OCIRuntime interface {
// to output; otherwise, STDOUT and STDERR will be multiplexed, with
// a header prepended as follows: 1-byte STREAM (0, 1, 2 for STDIN,
// STDOUT, STDERR), 3 null (0x00) bytes, 4-byte big endian length.
- // If a cancel channel is provided, it can be used to asyncronously
+ // If a cancel channel is provided, it can be used to asynchronously
// termninate the attach session. Detach keys, if given, will also cause
// the attach session to be terminated if provided via the STDIN
// channel. If they are not provided, the default detach keys will be
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index de93fdce7..ba2a6b93e 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -10,6 +10,7 @@ import (
"github.com/containers/libpod/libpod/define"
"github.com/containers/libpod/libpod/events"
+ "github.com/containers/libpod/pkg/cgroups"
"github.com/containers/libpod/pkg/rootless"
"github.com/containers/storage/pkg/stringid"
spec "github.com/opencontainers/runtime-spec/specs-go"
@@ -438,9 +439,16 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force bool,
if err := c.ociRuntime.KillContainer(c, 9, false); err != nil {
return err
}
- if err := c.unpause(); err != nil {
+ isV2, err := cgroups.IsCgroup2UnifiedMode()
+ if err != nil {
return err
}
+ // cgroups v1 and v2 handle signals on paused processes differently
+ if !isV2 {
+ if err := c.unpause(); err != nil {
+ return err
+ }
+ }
// Need to update container state to make sure we know it's stopped
if err := c.waitForExitFileAndSync(); err != nil {
return err