-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Handle an already connected network in libpod API #15516
Handle an already connected network in libpod API #15516
Conversation
1e7c425
to
3756c68
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: baude, kubealex 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 |
LGTM, I missed with your commit and release note message a little. Thanks for the PR |
e1ac31c
to
ca214f2
Compare
@baude seems like there are issues with test image pull 😔 |
@kubealex @baude IMO we should cover the CLI case as well, since a goal for podman is alias Something like this: n1hility@53d45ae Sorry for the collision: I had self-assigned this issue, had time to work on it and then when I went to open a PR saw this referenced on the issue. Feel free to pull this in and rework. -Jason |
@n1hility docker CLI preserves the error, hence my idea of creating an error that could fit better the use case. |
Right This only happens when started. Ex:
(same on the REST interface) |
Right, I'll focus on that tomorrow! |
6409445
to
5a97f5d
Compare
@n1hility I just merged your effort in the commit, not sure if I did it correctly, feel free to rework it if it isn't compliant, also reach out in GChat to ease the conversation :) |
5a97f5d
to
77808cd
Compare
@kubealex cool thanks! I just made one small change with the leftover few lines on the rest endpoint, since the error is filtered early. This also allows the rest endpoint to reflect the start error conditions. |
Compat: Treat already attached networks as a no-op Applies only to containers in created state. Maintain error in running state. Co-authored-by: Alessandro Rossi <[email protected]> Co-authored-by: Brent Baude <[email protected]> Co-authored-by: Jason T. Greene <[email protected]> Signed-off-by: Alessandro Rossi <[email protected]> Signed-off-by: Jason T. Greene <[email protected]>
77808cd
to
78aec21
Compare
Nice @n1hility 💪 thanks a lot for the integration! |
/lgtm |
/cherry-pick v4.2 |
@n1hility: new pull request created: #15554 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Signed-off-by: Alessandro Rossi [email protected]
The PR introduces a new "ErrNetworkConnected" error in libpod defines, to handle the specific case where a user tries to connect a container to a network that is already connected to it.
The user from the CLI will still receive an error, but since from API point of view the operation results in nothing to be done and the state is preserved, it should return 200, aligned with the behavior that docker has.
This should address #15499
Does this PR introduce a user-facing change?
None