-
Notifications
You must be signed in to change notification settings - Fork 201
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
[v0.60] Backport + version 0.60.3 #2170
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create a new function to create the netns dir. Signed-off-by: Paul Holzinger <[email protected]>
There are some rather bad problems when we bind mount over multiple times, this is a rather small race but can happen. In order to avoid this take an exclusive lock like ip netns add does because they create the same bind mount setup. As such we will not race against other podman process or ip netns add which is a good thing. Signed-off-by: Paul Holzinger <[email protected]>
The new API should replace the logic from Podman's setupNetNS() which did several things incorrect. First and foremost it never bind mounted the netns dir causing problems when the netns dir was later bind mounted duplicating the netns mounts on diffeent parents which then caused all unmount attempts to fail[1]. Also the Podman code did never check for conlicts so we way end up overwriting an existing netns (super unlikely as we use 16 random bytes but still). At the very least it duplicates the name logic for no reason there so having this all here makes much more sense. Of course we still have to port podman over to this new API. [1] https://issues.redhat.com/browse/RHEL-59620 Backport for https://issues.redhat.com/browse/RHEL-59703 Signed-off-by: Paul Holzinger <[email protected]>
This API is not used anywhere, as such remove it and make the loop in NewNS() better as the netns dir parts should not be part of the loop. Signed-off-by: Paul Holzinger <[email protected]>
Signed-off-by: Paul Holzinger <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99 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 |
@TomSweeneyRedHat @mheon PTAL |
LGTM |
/lgtm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Back port of #2168, I had to fix some merge conflicts as main uses the new go 1.22 loop while here we still support go 1.21 so I had to change them back.
Needed for https://issues.redhat.com/browse/RHEL-59703