Return usernsmode=private for autons from inspect#27998
Conversation
9672bf9 to
41437b4
Compare
|
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
|
Don't mean to rush anyone, just wondering whether any further input is required from me to bring this forward |
|
do we need a similar change for |
Both E.g.: ( |
|
thanks, could you add a test? |
ff22bd7 to
4c1d7bf
Compare
|
Not sure why those two tests are failing, might be flakes? They are passing on my machine |
Honny1
left a comment
There was a problem hiding this comment.
LGTM! I checked your test, and it passed. Can you please rebase on main?
4c1d7bf to
65668af
Compare
|
I think you messed up your rebase a bit, got a lot of extra commits in. Changes LGTM for reference. |
|
It looks like I did, let me check what happened :) |
65668af to
75affa5
Compare
|
Ok, fixed it. I think some tags got added to the PR as a result of my mistake, I'm guessing they should be removed. Sorry! |
|
I was able to track the source of the error down to the |
|
Let me know when/if you need another rebase :) |
|
I think the APIv2 failures are flakes, restarted. I'll enable auto-merge. |
|
Rerun failed tests. |
Head branch was pushed to by a user without write access
968fd10 to
d019f4b
Compare
|
@vmsh0 You don't need to push dummy commits. You can rerun tests form cirrus ui. Also, failures of packit jobs are usually not caused by your change. Please drop the commit, and then we can merge. |
d019f4b to
d4c557b
Compare
Sorry, I didn't realize I had the necessary permissions to rerun tests directly. Let's wait for everything to rerun once again and let's see if the API tests pass. I will try to rerun any failing tests until we see full success. |
|
I am not sure about the failure: https://cirrus-ci.com/task/4799819752931328, but it appears unrelated. PTAL @containers/podman-maintainers @mheon @timcoding1988 @lsm5 |
That failure has been there since day 1 of this PR. It does look unrelated to me as well, but the fact is that when I pushed the dummy commit earlier today the API tests passed. On the other hand, I really don't see how my changes are affecting those tests. Could it be my new tests in 20-containers.at that leave behind some kind of bad state, as opposed to the change itself? It's especially unclear to me how my change could cause the library to fail to load. The error in the API tests is "unable to open a handle to the library". |
|
@vmsh0 I agree. Let's wait for what other maintainers think. |
|
I agree that it seems unrelated to this PR just at a first glance, but I don’t think that’s the primary thing to consider here. We should not be in the habit of ignoring deterministic failures (Ideally we wouldn’t even accept existence of flakes, but that’s a higher bar).
|
What's interesting is that we have the same in #27988, which is a different (but somewhat related) change. Can I play around with the tests? E.g. I would like to force-push a version of this change without the additional tests. |
|
Sure, adding code to help diagnose it would be welcome. Just mark the PR as draft first, please. |
7302dcf to
4ba2629
Compare
|
Cockpit tests failed for commit de48be9. @martinpitt, @jelly, @mvollmer please check. |
|
Cockpit tests failed for commit 6949f84. @martinpitt, @jelly, @mvollmer please check. |
|
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
|
Cockpit tests failed for commit 14904a8. @martinpitt, @jelly, @mvollmer please check. |
|
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
14904a8 to
c04f7e0
Compare
|
Cockpit tests failed for commit c04f7e0. @martinpitt, @jelly, @mvollmer please check. |
|
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
My testing shows that
At a first glance, these findings mean that the test setting up the rootless container in group 20 changes something permanently in the testing environment. Perhaps a bug was uncovered here. I will try to investigate by reproducing the same environment in my lab and testing manually, as using your CI to run these experiments doesn't scale very well. Any ideas of what we might be looking at? |
|
Cockpit tests failed for commit d262b7c. @martinpitt, @jelly, @mvollmer please check. |
|
Does this reproduce with the Podman CLI, instead of the API? |
|
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
|
Tried to repro on my system with: But it works just fine. Might not be very accurate tho, as the command line doesn't expose the API 1:1. I'll try to reproduce this on a clean system similar to the CI rig next week. |
|
@vmsh0, do you have an opportunity to test that? |
When a container is created (internal state configured) using
podman createor the/createAPI endpoint, and the container is configured with userns=auto, theSpecstructure is not populated with the future user namespace, as the auto case is not handled inspecgen.SetupUserNS.Instead, auto user ns is handled while adding shared namespaces when actual OCI initialization happens.
This patch introduces an additional check in the inspect operation, which will return the value 'private' for 'usernsmode' in this situation, to reflect that when the container is started it will have a private user namespace.
Please let me know if this change makes sense to you. Needs some additional thoughts for testing & documentation.
Checklist
Ensure you have completed the following checklist for your pull request to be reviewed:
commits. (
git commit -s). (If needed, usegit commit -s --amend). The author email must matchthe sign-off email address. See CONTRIBUTING.md
for more information.
Fixes: #00000in commit message (if applicable)make validatepr(format/lint checks)Noneif no user-facing changes)Does this PR introduce a user-facing change?