Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some SkipIfRootless flags from tests #7760

Merged
merged 1 commit into from
Sep 25, 2020

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Sep 23, 2020

We need to get more tests running in rootless mode. Since cgroupsV2 allows
management of cgroups in rootless environments a lot of more tests can be run.

Signed-off-by: Daniel J Walsh [email protected]

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhatdan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 23, 2020
@QiWang19
Copy link
Contributor

LGTM

@rhatdan rhatdan force-pushed the rootless branch 5 times, most recently from 6c99c57 to bdf59c1 Compare September 24, 2020 22:45
We need to get more tests running in rootless mode.  Since cgroupsV2 allows
management of cgroups in rootless environments a lot of more tests can be run.

Signed-off-by: Daniel J Walsh <[email protected]>
@rhatdan rhatdan changed the title Remove some SkipIfRootess flags from tests Remove some SkipIfRootless flags from tests Sep 25, 2020
@rhatdan
Copy link
Member Author

rhatdan commented Sep 25, 2020

@edsantiago PTAL turns on a few more tests, we need to get the same fix for skipifrootless() that you did for skipifremote()
I will continue attempting to turn on rootless tests, and get @giuseppe to look at the cgroups failures on rootless.

@containers/podman-maintainers PTAL and merge.

session := podmanTest.Podman([]string{"run", "--rm", ALPINE, "id"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
Expect(session.OutputToString()).To(Equal("uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems a lot less specific

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, they are very different in rootless versus rootful, but I do not know why. But the current test is fragile since the ALPINE image can change in the future. We just want to make sure that the container is running as root.

But you could very well be pointing out a rootless bug.

$ podman (pullpolicy) $ sudo podman run --rm alpine id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)
$ podman (pullpolicy) $ podman run --rm alpine id
uid=0(root) gid=0(root)

I still think we should get this in, and I will open an issue above.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the ALPINE image can change in the future

I am establishing what I hope is a robust convention in which quay.io/libpod/testimage:YYYYMMDD is an alpine-based image, entirely under our control, to avoid precisely this sort of problem. See https://github.com/containers/podman/blob/master/test/system/build-testimage

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened an issue on this one, I believe we should merge this for and fix this specific issue later.
#7782

@edsantiago
Copy link
Member

@rhatdan I looked at this yesterday (while CI was still red) and it looked promising, although I agree with @mheon's concern re: dropping the string check. I can't do a full review today, sorry, am heading OOTO soon for the whole day.

@jwhonce
Copy link
Member

jwhonce commented Sep 25, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 25, 2020
@openshift-merge-robot openshift-merge-robot merged commit 2583246 into containers:master Sep 25, 2020
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants