-
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
[v4.8] fix podman-remote exec regression with v4.8 #20865
[v4.8] fix podman-remote exec regression with v4.8 #20865
Conversation
Commit f48a706 added a new API endpoint to remove exec session correctly. And the bindings try to call that endpoint for exec every time. Now since client and server must not be the same version this causes a problem if a new 4.8 client calls an older 4.7 server as it has no idea about such endpoint and throws an ugly error. This is a common scenario for podman machine setups. The client does know the server version so it should make sure to not call such endpoint if the server is older than 4.8. I added a exec test to the machine tests as this can be reproduced with podman machine as at the moment at least the VM image does not contain podman 4.8. And it should at least make sure podman exec keeps working for podman machine without regressions. Fixes containers#20821 Signed-off-by: Paul Holzinger <[email protected]>
When a new API call is added to the bindings we should guard it based on the version and throw a useful error. Right now an old server that does not implement a given endpoint would throw a "NOT FOUND" error which is not good for callers. Instead implement a custom error type to give a usefule error instead. This allows bindings users to call errors.As() to know if they call and to old version. Signed-off-by: Paul Holzinger <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/hold
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: giuseppe, openshift-cherrypick-robot 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 |
/hold cancel |
This is an automated cherry-pick of #20831
/assign mheon