-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
podman-2.2.0_rc2 no longer allows later parameters to override those prior #8507
Comments
Looks as if the breaking change is f441190 |
The reason for this change was to provide a better ux when specifying multiple cni networks. The reason your overwriting works is because that's how the pflag library handles this. I personally don't like this behaviour. It's easy to overwrite the previous value by accident and having no clear indication why it doesn't work as they would like. I didn't expect somebody to use this intentionally. I don't have strong feelings about keeping f441190 in 2.2 but I would love to have this in 3.0. |
As a counter-argument, I'd suggest that the pattern of acting on the most recently specified option is a long-established UNIX tradition, and this is a breaking change, as highlighted above. As I said, I'm certainly not against parameter re-definition being made a warning, but please don't make it an error (in any release!) as I suspect that the blast-radius of such a change would be wider than you imagine... |
(Is there anything else which could be done to both improve the UX around using multiple CNI networks without breaking existing CLI behaviour?) |
As described in issue containers#8507 this commit contains a breaking change which is not wanted in v2.2. We can discuss later if we want this in 3.0 or not. Signed-off-by: Paul Holzinger <[email protected]>
It's reverted now with #8514. Thanks for reaching out, @srcshelton ! |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
In all podman releases up until
2.1.1
(possibly2.2.0_rc1
) It was possible to provide the same parameter multiple times, and the final instance of the parameter would that which was acted upon.It was therefore possible to define a podman invocation with a whole series of parameters into a string or array, and then run the container in a different way (perhaps with an override to perform a configuration check) simply by appending further values onto the end of the original variable, e.g.
... but whereas this worked in all prior releases, in
2.2.0_rc2
podman instead outputs:On a personal note, this change breaks a whole bunch of my scripts - but in general, it's a significant change in behaviour from previous releases. Whilst it's not impossible to filter strings or arrays to remove duplicates, it's more processing which was not previously required.
If this change is intentional, then could it please at least be relegated to a warning (with the previous behaviour maintained of acting on the last parameter specified) rather than being treated as an error?
Output of
podman version
:Output of
podman info --debug
:Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
Yes
The text was updated successfully, but these errors were encountered: