summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/common/create.go3
-rw-r--r--cmd/podman/common/create_opts.go4
-rw-r--r--cmd/podman/containers/start.go3
-rw-r--r--cmd/podman/system/connection/list.go8
4 files changed, 16 insertions, 2 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go
index a3ff37c19..6270bad16 100644
--- a/cmd/podman/common/create.go
+++ b/cmd/podman/common/create.go
@@ -319,6 +319,9 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions,
"Kernel memory limit "+sizeWithUnitFormat,
)
_ = cmd.RegisterFlagCompletionFunc(kernelMemoryFlagName, completion.AutocompleteNone)
+ // kernel-memory is deprecated in the runtime spec.
+ _ = createFlags.MarkHidden("kernel-memory")
+
logDriverFlagName := "log-driver"
createFlags.StringVar(
&cf.LogDriver,
diff --git a/cmd/podman/common/create_opts.go b/cmd/podman/common/create_opts.go
index 2d27d124e..6283eb28e 100644
--- a/cmd/podman/common/create_opts.go
+++ b/cmd/podman/common/create_opts.go
@@ -18,6 +18,7 @@ import (
"github.com/containers/podman/v3/pkg/specgen"
"github.com/docker/docker/api/types/mount"
"github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
)
func stringMaptoArray(m map[string]string) []string {
@@ -383,6 +384,9 @@ func ContainerCreateToContainerCLIOpts(cc handlers.CreateContainerConfig, rtc *c
if cc.HostConfig.Memory > 0 {
cliOpts.Memory = strconv.Itoa(int(cc.HostConfig.Memory))
}
+ if cc.HostConfig.KernelMemory > 0 {
+ logrus.Warnf("The --kernel-memory flag has been deprecated. May not work properly on your system.")
+ }
if cc.HostConfig.MemoryReservation > 0 {
cliOpts.MemoryReservation = strconv.Itoa(int(cc.HostConfig.MemoryReservation))
diff --git a/cmd/podman/containers/start.go b/cmd/podman/containers/start.go
index 1163b9093..8813fc273 100644
--- a/cmd/podman/containers/start.go
+++ b/cmd/podman/containers/start.go
@@ -87,6 +87,9 @@ func validateStart(cmd *cobra.Command, args []string) error {
if len(args) == 0 && !startOptions.Latest && !startOptions.All {
return errors.New("start requires at least one argument")
}
+ if startOptions.All && startOptions.Latest {
+ return errors.Errorf("--all and --latest cannot be used together")
+ }
if len(args) > 0 && startOptions.Latest {
return errors.Errorf("--latest and containers cannot be used together")
}
diff --git a/cmd/podman/system/connection/list.go b/cmd/podman/system/connection/list.go
index de85ce3fa..a3290e3d6 100644
--- a/cmd/podman/system/connection/list.go
+++ b/cmd/podman/system/connection/list.go
@@ -44,6 +44,7 @@ func init() {
type namedDestination struct {
Name string
config.Destination
+ Default bool
}
func list(cmd *cobra.Command, _ []string) error {
@@ -60,12 +61,14 @@ func list(cmd *cobra.Command, _ []string) error {
"Identity": "Identity",
"Name": "Name",
"URI": "URI",
+ "Default": "Default",
}}
rows := make([]namedDestination, 0)
for k, v := range cfg.Engine.ServiceDestinations {
+ def := false
if k == cfg.Engine.ActiveService {
- k += "*"
+ def = true
}
r := namedDestination{
@@ -74,6 +77,7 @@ func list(cmd *cobra.Command, _ []string) error {
Identity: v.Identity,
URI: v.URI,
},
+ Default: def,
}
rows = append(rows, r)
}
@@ -82,7 +86,7 @@ func list(cmd *cobra.Command, _ []string) error {
return rows[i].Name < rows[j].Name
})
- format := "{{.Name}}\t{{.Identity}}\t{{.URI}}\n"
+ format := "{{.Name}}\t{{.URI}}\t{{.Identity}}\t{{.Default}}\n"
switch {
case report.IsJSON(cmd.Flag("format").Value.String()):
buf, err := registry.JSONLibrary().MarshalIndent(rows, "", " ")