diff options
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/boltdb_state.go | 2 | ||||
-rw-r--r-- | libpod/boltdb_state_internal.go | 2 | ||||
-rw-r--r-- | libpod/container_inspect.go | 3 | ||||
-rw-r--r-- | libpod/pod_top_linux.go | 13 |
4 files changed, 14 insertions, 6 deletions
diff --git a/libpod/boltdb_state.go b/libpod/boltdb_state.go index 34ca7f740..4b6ff2c1d 100644 --- a/libpod/boltdb_state.go +++ b/libpod/boltdb_state.go @@ -7,10 +7,10 @@ import ( "sync" "github.com/containers/libpod/libpod/define" - bolt "github.com/etcd-io/bbolt" jsoniter "github.com/json-iterator/go" "github.com/pkg/errors" "github.com/sirupsen/logrus" + bolt "go.etcd.io/bbolt" ) var json = jsoniter.ConfigCompatibleWithStandardLibrary diff --git a/libpod/boltdb_state_internal.go b/libpod/boltdb_state_internal.go index 6e1f2a5f2..33ff0720f 100644 --- a/libpod/boltdb_state_internal.go +++ b/libpod/boltdb_state_internal.go @@ -9,9 +9,9 @@ import ( "github.com/containers/libpod/libpod/define" "github.com/containers/libpod/pkg/rootless" "github.com/containers/storage" - bolt "github.com/etcd-io/bbolt" "github.com/pkg/errors" "github.com/sirupsen/logrus" + bolt "go.etcd.io/bbolt" ) const ( diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go index f81be8b22..729a00be8 100644 --- a/libpod/container_inspect.go +++ b/libpod/container_inspect.go @@ -445,9 +445,6 @@ func (c *Container) generateInspectContainerHostConfig(ctrSpec *spec.Spec, named hostConfig.ShmSize = c.config.ShmSize hostConfig.Runtime = "oci" - // Default CPUShares is 1024, but we may overwrite below. - hostConfig.CpuShares = 1024 - // This is very expensive to initialize. // So we don't want to initialize it unless we absolutely have to - IE, // there are things that require a major:minor to path translation. diff --git a/libpod/pod_top_linux.go b/libpod/pod_top_linux.go index 80221c3a9..1f84c8667 100644 --- a/libpod/pod_top_linux.go +++ b/libpod/pod_top_linux.go @@ -41,12 +41,23 @@ func (p *Pod) GetPodPidInformation(descriptors []string) ([]string, error) { } c.lock.Unlock() } + + // Also support comma-separated input. + psgoDescriptors := []string{} + for _, d := range descriptors { + for _, s := range strings.Split(d, ",") { + if s != "" { + psgoDescriptors = append(psgoDescriptors, s) + } + } + } + // TODO: psgo returns a [][]string to give users the ability to apply // filters on the data. We need to change the API here and the // varlink API to return a [][]string if we want to make use of // filtering. opts := psgo.JoinNamespaceOpts{FillMappings: rootless.IsRootless()} - output, err := psgo.JoinNamespaceAndProcessInfoByPidsWithOptions(pids, descriptors, &opts) + output, err := psgo.JoinNamespaceAndProcessInfoByPidsWithOptions(pids, psgoDescriptors, &opts) if err != nil { return nil, err } |