-
-
Notifications
You must be signed in to change notification settings - Fork 141
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
fix diffparam_volume and add diffparam_mount and diffparam_tmpfs #448
base: master
Are you sure you want to change the base?
Commits on Jul 10, 2022
-
fix diffparam_volume and add diffparam_mount and diffparam_tmpfs
This is a fix for bug containers#355. This compares the arguments podman recieved for the currently existing container with the (effective) arguments to come. This approach was taken over parsing Mounts from inspect because: 1. This line from https://github.com/containers/podman/blob/e084f0ee1e1ded564110e84eefca9f18b5669adf/libpod/container_inspect.go#L224 regarding inspect's Mount value: "Only includes user-specified mounts. Only includes bind mounts and named volumes, not tmpfs volumes." Thus an incomplete solution would result. 2. The code required to parse so that it could be compared with the stuff to come was getting silly-level complex. 3. Anonymous volumes were impossible to decipher as both Name and Source are filled in with the podman-generated values. Thus we compare the arguments podman create was run with to make the existing container with the closest values to those arguments in the new config. This resulted in simpler code that takes care of the issue of anonymous volumes. The downside is that if someone moves, say, a tmpfs from mount to tmpfs (or vice versa) that would reult in exactly the same result this will be considered a different config. This can (possibly) be fixed if and when it becomes an actual issue. Signed-off-by: Andrew <rubiksdot@grue.cc>
Andrew committedJul 10, 2022 Configuration menu - View commit details
-
Copy full SHA for dff5fc1 - Browse repository at this point
Copy the full SHA dff5fc1View commit details -
The old code removed unnecessary slashes via the _clean_volume() function. I accidentally got rid of it and have re-introduced it here as self._clean_path(). The rename is because it is used outside of mere check of volumes but the internal code is as before. Signed-off-by: Andrew <rubiksdot@grue.cc>
Andrew committedJul 10, 2022 Configuration menu - View commit details
-
Copy full SHA for d36b4a6 - Browse repository at this point
Copy the full SHA d36b4a6View commit details
Commits on Jul 11, 2022
-
correct string in list context errors and sort mount string
Began sorting in self._clean_path_in_mount_str() as an early defense against ordering of mount arguments changing. This steels against false comparison errors later. Fixed lots of embarrassing string in list context errors. Oops! :( Signed-off-by: Andrew <rubiksdot@grue.cc>
Andrew committedJul 11, 2022 Configuration menu - View commit details
-
Copy full SHA for 7de11c1 - Browse repository at this point
Copy the full SHA 7de11c1View commit details
Commits on Jul 12, 2022
-
fix slash squashing in diffparam_volume and _clean_path
Made _clean_path() squash multiple consecutive slashes into one as 3+ slashes are just as meaningful as 1. Slash handling is now done properly diffparam_volume(). Signed-off-by: Andrew <rubiksdot@grue.cc>
Andrew committedJul 12, 2022 Configuration menu - View commit details
-
Copy full SHA for 384f258 - Browse repository at this point
Copy the full SHA 384f258View commit details
Commits on Sep 29, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 06f068f - Browse repository at this point
Copy the full SHA 06f068fView commit details
Commits on Oct 12, 2022
-
check --mount, --tmpfs, --volume and VOLUME for changes
Combine diffparam_mount(), diffparam_tmpfs() and diffparam_volume() and add handling of VOLUME into one function that allows for movement of definitions between the various ways of specifying mount points as long as the options are equivalent. This necessitated translations of the various ways of defining mount points into one single "language" so that the definitions may be compared and checked for similarity. prep_mount_args_for_comp() does this work and includes within it the default options for the various CLI arguments and VOLUME. The consequence of this is that the diff returned by the function no longer literally represents the real-life arguments passed but, rather, the translations of those arguments. Signed-off-by: Andrew <rubiksdot@grue.cc>
Andrew committedOct 12, 2022 Configuration menu - View commit details
-
Copy full SHA for ca151f5 - Browse repository at this point
Copy the full SHA ca151f5View commit details -
number fields in string format and key error
Fixes: ERROR: Found 7 pylint issue(s) which need to be resolved: ERROR: plugins/module_utils/podman/podman_container_lib.py:1288:37: ansible-format-automatic-specification: Format string contains automatic field numbering specification ... ERROR: plugins/module_utils/podman/podman_container_lib.py:1400:27: ansible-format-automatic-specification: Format string contains automatic field numbering specification also: File "/tmp/ansible_containers.podman.podman_container_payload_6atuqv63/ansible_containers.podman.podman_container_payload.zip/ansible_collections/containers/podman/plugins/module_utils/podman/podman_container_lib.py", line 1405, in diffparam_volumes_all KeyError: 'config' Signed-off-by: Andrew <rubiksdot@grue.cc>
Andrew committedOct 12, 2022 Configuration menu - View commit details
-
Copy full SHA for 84b11d9 - Browse repository at this point
Copy the full SHA 84b11d9View commit details
Commits on Feb 15, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 2c45334 - Browse repository at this point
Copy the full SHA 2c45334View commit details