Skip to content

Commit 8e80dd5

Browse files
committed
cmd/create, cmd/run: Rely on podman >= 1.6.4 always being present
So far the minimum required Podman version was 1.4.0, based on what used to be available in RHEL 7. These days, Podman 1.6.4 is old enough to be in RHEL 7.9. Hence it's time to bump the baseline. #1253
1 parent de652f4 commit 8e80dd5

File tree

2 files changed

+1
-26
lines changed

2 files changed

+1
-26
lines changed

src/cmd/create.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -254,14 +254,7 @@ func createContainer(container, image, release, authFile string, showCommandToEn
254254
devPtsMount = []string{"--mount", "type=devpts,destination=/dev/pts"}
255255
}
256256

257-
logrus.Debug("Checking if 'podman create' supports '--ulimit host'")
258-
259-
var ulimitHost []string
260-
261-
if podman.CheckVersion("1.5.0") {
262-
logrus.Debug("'podman create' supports '--ulimit host'")
263-
ulimitHost = []string{"--ulimit", "host"}
264-
}
257+
ulimitHost := []string{"--ulimit", "host"}
265258

266259
var usernsArg string
267260
if currentUser.Uid == "0" {

src/cmd/run.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -604,24 +604,6 @@ func startContainer(container string) error {
604604
return fmt.Errorf("failed to start container %s", container)
605605
}
606606

607-
logrus.Debug("Checking if 'podman system migrate' supports '--new-runtime'")
608-
609-
if !podman.CheckVersion("1.6.2") {
610-
var builder strings.Builder
611-
612-
fmt.Fprintf(&builder,
613-
"container %s doesn't support cgroups v%d\n",
614-
container,
615-
cgroupsVersion)
616-
617-
fmt.Fprintf(&builder, "Update Podman to version 1.6.2 or newer.\n")
618-
619-
errMsg := builder.String()
620-
return errors.New(errMsg)
621-
}
622-
623-
logrus.Debug("'podman system migrate' supports '--new-runtime'")
624-
625607
ociRuntimeRequired := "runc"
626608
if cgroupsVersion == 2 {
627609
ociRuntimeRequired = "crun"

0 commit comments

Comments
 (0)