Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion contrib/fedora-minimal/Dockerfile

This file was deleted.

4 changes: 0 additions & 4 deletions contrib/fedora-minimal/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion test/e2e/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package integration

var (
redis = "quay.io/libpod/redis:alpine"
fedoraMinimal = "quay.io/libpod/fedora-minimal:latest"
fedoraMinimal = "registry.fedoraproject.org/fedora-minimal:34"
ALPINE = "quay.io/libpod/alpine:latest"
ALPINELISTTAG = "quay.io/libpod/alpine:3.10.2"
ALPINELISTDIGEST = "quay.io/libpod/alpine@sha256:fa93b01658e3a5a1686dc3ae55f170d8de487006fb53a28efcd12ab0710a2e5f"
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/images_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ var _ = Describe("Podman images", func() {
result := podmanTest.Podman([]string{"images", "-q", "-f", "reference=quay.io*"})
result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(0))
Expect(len(result.OutputToStringArray())).To(Equal(8))
Expect(len(result.OutputToStringArray())).To(Equal(7))

retalpine := podmanTest.Podman([]string{"images", "-f", "reference=a*pine"})
retalpine.WaitWithDefaultTimeout()
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,7 @@ USER mail`, BB)
})

It("podman run --privileged and --group-add", func() {
groupName := "kvm"
groupName := "mail"
session := podmanTest.Podman([]string{"run", "-t", "-i", "--group-add", groupName, "--privileged", fedoraMinimal, "groups"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
Expand Down
2 changes: 1 addition & 1 deletion test/system/500-networking.bats
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ load helpers

# FIXME: debugging for #11871
run_podman exec $cid cat /etc/resolv.conf
if is_rootless; then
if is_rootless && ! is_remote; then
run_podman unshare --rootless-cni cat /etc/resolv.conf
fi
ps uxww
Expand Down
12 changes: 11 additions & 1 deletion utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"io"
"io/ioutil"
"math/rand"
"os"
"os/exec"
"strconv"
Expand Down Expand Up @@ -203,7 +204,16 @@ func moveProcessToScope(pidPath, slice, scope string) error {
// MovePauseProcessToScope moves the pause process used for rootless mode to keep the namespaces alive to
// a separate scope.
func MovePauseProcessToScope(pausePidPath string) {
err := moveProcessToScope(pausePidPath, "user.slice", "podman-pause.scope")
var err error

for i := 0; i < 3; i++ {
r := rand.Int()
err = moveProcessToScope(pausePidPath, "user.slice", fmt.Sprintf("podman-pause-%d.scope", r))
if err == nil {
return
}
}

if err != nil {
unified, err2 := cgroups.IsCgroup2UnifiedMode()
if err2 != nil {
Expand Down
9 changes: 0 additions & 9 deletions utils/utils_supported.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,6 @@ func RunUnderSystemdScope(pid int, slice string, unitName string) error {
ch := make(chan string)
_, err = conn.StartTransientUnit(unitName, "replace", properties, ch)
if err != nil {
// On errors check if the cgroup already exists, if it does move the process there
if props, err := conn.GetUnitTypeProperties(unitName, "Scope"); err == nil {
if cgroup, ok := props["ControlGroup"].(string); ok && cgroup != "" {
if err := moveUnderCgroup(cgroup, "", []uint32{uint32(pid)}); err == nil {
return nil
}
// On errors return the original error message we got from StartTransientUnit.
}
}
return err
}

Expand Down