summaryrefslogtreecommitdiff
path: root/cmd/podman/common
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/common')
-rw-r--r--cmd/podman/common/specgen.go8
-rw-r--r--cmd/podman/common/util.go2
2 files changed, 5 insertions, 5 deletions
diff --git a/cmd/podman/common/specgen.go b/cmd/podman/common/specgen.go
index 39ff02857..0bb6e79e5 100644
--- a/cmd/podman/common/specgen.go
+++ b/cmd/podman/common/specgen.go
@@ -592,7 +592,7 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string
case "max-size":
logSize, err := units.FromHumanSize(split[1])
if err != nil {
- return errors.Wrapf(err, "%s is not a valid option", o)
+ return err
}
s.LogConfiguration.Size = logSize
default:
@@ -662,7 +662,7 @@ func makeHealthCheckFromCli(inCmd, interval string, retries uint, timeout, start
}
intervalDuration, err := time.ParseDuration(interval)
if err != nil {
- return nil, errors.Wrapf(err, "invalid healthcheck-interval %s ", interval)
+ return nil, errors.Wrapf(err, "invalid healthcheck-interval")
}
hc.Interval = intervalDuration
@@ -673,7 +673,7 @@ func makeHealthCheckFromCli(inCmd, interval string, retries uint, timeout, start
hc.Retries = int(retries)
timeoutDuration, err := time.ParseDuration(timeout)
if err != nil {
- return nil, errors.Wrapf(err, "invalid healthcheck-timeout %s", timeout)
+ return nil, errors.Wrapf(err, "invalid healthcheck-timeout")
}
if timeoutDuration < time.Duration(1) {
return nil, errors.New("healthcheck-timeout must be at least 1 second")
@@ -682,7 +682,7 @@ func makeHealthCheckFromCli(inCmd, interval string, retries uint, timeout, start
startPeriodDuration, err := time.ParseDuration(startPeriod)
if err != nil {
- return nil, errors.Wrapf(err, "invalid healthcheck-start-period %s", startPeriod)
+ return nil, errors.Wrapf(err, "invalid healthcheck-start-period")
}
if startPeriodDuration < time.Duration(0) {
return nil, errors.New("healthcheck-start-period must be 0 seconds or greater")
diff --git a/cmd/podman/common/util.go b/cmd/podman/common/util.go
index a971aa957..ef30e08d3 100644
--- a/cmd/podman/common/util.go
+++ b/cmd/podman/common/util.go
@@ -250,7 +250,7 @@ func parseAndValidateRange(portRange string) (uint16, uint16, error) {
func parseAndValidatePort(port string) (uint16, error) {
num, err := strconv.Atoi(port)
if err != nil {
- return 0, errors.Wrapf(err, "cannot parse %q as a port number", port)
+ return 0, errors.Wrapf(err, "invalid port number")
}
if num < 1 || num > 65535 {
return 0, errors.Errorf("port numbers must be between 1 and 65535 (inclusive), got %d", num)