-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Idempotency of containers recreated by systemd units #276
Labels
Comments
Probably we need to check if |
sshnaidm
added
bug
Something isn't working
bug/idempotency
Bug related to idempotency of modules
labels
Jul 30, 2021
sshnaidm
added a commit
to sshnaidm/ansible-podman-collections
that referenced
this issue
Aug 2, 2021
Fix containers#276 Label 'podman_systemd_unit' is the marker for container starting from systemd generated file. In this case: * Ignore podman_systemd_unit label * Ignore cidfile settings when this label presents
sshnaidm
added a commit
to sshnaidm/ansible-podman-collections
that referenced
this issue
Aug 2, 2021
Fix containers#276 Label 'podman_systemd_unit' is the marker for container starting from systemd generated file. In this case: * Ignore podman_systemd_unit label * Ignore cidfile settings when this label presents
sshnaidm
added a commit
that referenced
this issue
Aug 2, 2021
Fix #276 Label 'podman_systemd_unit' is the marker for container starting from systemd generated file. In this case: * Ignore podman_systemd_unit label * Ignore cidfile settings when this label presents
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
If a container created using Ansible is being recreated by systemd unit generated by
podman-generate-systemd
, it causes an idempotency issue.On the one hand, they are two different containers. But it seems to be a wrong behavior because it takes away the possibility to check the created container if systemd controls it.
Steps to reproduce the issue:
containers.podman
modulespodman-generate-systemd
using--new
flagDescribe the results you received:
After the generated units start, containers are being recreated with the parameters described in units. All the generated units contain
--cidfile
parameter andpodman_systemd_unit
label in addition to parameters and labels set bypodman_container
module. Also, it seems thatpodman-generate-systemd
sorts other labels if they exist. Thus, the container described in the Ansible task and the container described in the generated unit is not the same container. Following playbook runs could be failed because containers are being recreated, and systemd services are being restarted (and the containers are being recreated again). If the playbook runs successfully, the containers are recreated successfully as well.Describe the results you expected:
I think, if an existing container differs from its description in the Ansible task only by
podman_systemd_unit
label and--cidfile
parameter, the module should not recreate it.Additional information you deem important (e.g. issue happens only occasionally):
Version of the
containers.podman
collection:Either git commit if installed from git:
git show --summary
Or version from
ansible-galaxy
if installed from galaxy:ansible-galaxy collection list | grep containers.podman
Output of
ansible --version
:Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Playbok you run with ansible (e.g. content of
playbook.yaml
):Command line and output of ansible run with high verbosity
Please NOTE: if you submit a bug about idempotency, run the playbook with
--diff
option, like:ansible-playbook -i inventory --diff -vv playbook.yml
Additional environment details (AWS, VirtualBox, physical, etc.):
Physical machine
The text was updated successfully, but these errors were encountered: