Sergey
11f9eded6a
Fix idempoency issue with PID of container ( #622 )
...
Fix #573
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-08-12 14:25:09 +03:00
Sergey
faee18ecdc
Fix healthcheck issue where defined in image ( #618 )
...
Fix #598
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-08-12 11:32:39 +03:00
Sergey
aeec6b92d6
Revert "Use replace option to recreate a container ( #613 )" ( #616 )
...
This reverts commit cb832c9a84 .
We lose flexibility in recreating workflow, replace actually
does the same in Podman - stops and removes/creates.
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-08-07 11:08:18 +03:00
Sergey
cb832c9a84
Use replace option to recreate a container ( #613 )
...
In recreating container use `--replace` option.
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-08-06 21:26:15 +03:00
Sergey
7a307453a5
Add diff and change detection to systemd generation ( #608 )
...
Fix #339
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-08-03 16:26:18 +03:00
Holger Müller
cc34c2b780
added cpu_quota parameter to podman_container ( #612 )
...
* added cpu_qouta parameter to podman_container
Signed-off-by: Holger Mueller <holger.mueller@inovex.de>
* add missing key to parameter dict
Signed-off-by: Holger Mueller <holger.mueller@inovex.de>
---------
Signed-off-by: Holger Mueller <holger.mueller@inovex.de>
Co-authored-by: Holger Mueller <holger.mueller@inovex.de>
2023-08-03 15:57:10 +03:00
Holger Müller
2914785411
Fixed idempotency with cpus parameter ( #581 )
...
* Added cpu_quota parameter and fixed #559
Signed-off-by: Holger Mueller <holger.mueller@inovex.de>
* force float for cpu parameter in diff
Signed-off-by: Holger Mueller <holger.mueller@inovex.de>
* fixed typo
Signed-off-by: Holger Mueller <holger.mueller@inovex.de>
* revert linebreak caused by linting with too short lines
Signed-off-by: Holger Mueller <holger.mueller@inovex.de>
* removed quota parameter from patch
Signed-off-by: Holger Mueller <holger.mueller@inovex.de>
* readded already existing quota key to defaults
Signed-off-by: Holger Mueller <holger.mueller@inovex.de>
---------
Signed-off-by: Holger Mueller <holger.mueller@inovex.de>
Co-authored-by: Holger Mueller <holger.mueller@inovex.de>
2023-08-03 15:29:06 +03:00
Sergey
4e2f42eea6
Fix idempotency for devices ( #611 )
...
Fix #610
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-08-02 18:21:43 +03:00
sedrubal
0ae6baac3d
Fix idempotency for RestartPolicy when MaximumRetryCount > 0 ( #607 )
...
Before this change, this task:
```ansible
- containers.podman.podman_container:
# ...
restart_policy: on-failure:3
# ...
```
always caused this diff:
```diff
--- before
+++ after
@@ -1 +1 @@
-restart_policy - on-failure
+restart_policy - on-failure:3
```
Signed-off-by: Sebastian Endres <sebastian.endres@dlr.de>
Co-authored-by: Sebastian Endres <sebastian.endres@dlr.de>
2023-07-30 21:59:13 +03:00
Sergey
9d168430a4
Fix idempotency lowercase for devices ( #549 )
...
Fix : #537
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-02-13 13:24:11 +02:00
Sergey
8f5842dea6
Add idempotency for restart-policy for containers ( #548 )
...
Fix : #440
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-02-12 13:00:00 +02:00
Sergey
132baa18e4
Add hooks-dir parameter for containers ( #547 )
...
Fix #539
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-02-12 01:47:46 +02:00
linxside
a762dc63d0
Fix undesirable splitting of IPv6 host addresses ( #533 )
...
* fix: over splitting for ipv6 addresses
Signed-off-by: linxside <git@linux-inside.de>
* test: add test cases for ipv6 oversplitting
Signed-off-by: linxside <git@linux-inside.de>
Signed-off-by: linxside <git@linux-inside.de>
2022-12-13 03:50:40 +02:00
Sergey
5198b726fb
Delete systemd files when container/pod is deleted ( #508 )
...
Fix #489
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-11-10 17:13:45 +02:00
Sergey
bf67c7e078
Improve idempotency for devices mount of rootless podman ( #487 )
...
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-09-28 12:39:15 +03:00
Sergey
93b5acbf6e
Support passing multiple networks with params ( #472 )
...
Fix #467
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-09-03 10:40:48 +03:00
dada513
b72a026328
generate_systemd: implement --wants, --after and --requires (GH-431) ( #432 )
...
* generate_systemd: implement --wants, --after and --requires (GH-431)
Signed-off-by: dada513 <dada513@protonmail.com>
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
Co-authored-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-09-01 20:28:07 +03:00
Sergey
cecb29222e
Add --sdnotify option for container ( #465 )
...
Fix #464
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-08-28 16:42:31 +03:00
Nikita Tokarchuk
9068baeb99
podman_container should ensure image by using os path if rootfs is used ( #458 )
...
* Check image with os path if rootfs is used
Signed-off-by: Nikita Tokarchuk <nikita@tokarch.uk>
* Take into account rootfs usage while evaluating a diff
Signed-off-by: Nikita Tokarchuk <nikita@tokarch.uk>
* Always compare rootfs image diffparam as strict
Signed-off-by: Nikita Tokarchuk <nikita@tokarch.uk>
* Reverse image labels getter to ignore the value if None
Signed-off-by: Nikita Tokarchuk <nikita@tokarch.uk>
* Add tests to check podman rootfs containers
Signed-off-by: Nikita Tokarchuk <nikita@tokarch.uk>
Signed-off-by: Nikita Tokarchuk <nikita@tokarch.uk>
2022-08-12 06:26:16 +03:00
Adrian Freund
99c2851341
Fix rerunning playbooks with generate_systemd --new ( #453 )
...
* Fix restarting containers if --rm is enabled
* Automatically enable rm if generate_systemd.new is set
* Don't assume that the 'new' key in generate_systemd exists
Signed-off-by: Adrian Freund <adrian@freund.io>
2022-07-22 17:41:21 +03:00
Rabi Mishra
6dc481ae2c
Change IpcMode default to shareable ( #444 )
...
podman 4.1.x has changed the ipc namespace mode default to
shareable[1] that results in containers being restarted.
[1] 3987c529f4
Resolves: rhbz#2101495
Signed-off-by: Rabi Mishra <ramishra@redhat.com>
2022-06-29 03:10:45 +03:00
Sergey
2577f5b0f5
Remove distutils as deprecated ( #437 )
...
Fix #422
The distutils package is deprecated and slated for removal in Python 3.12
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-06-12 22:54:03 +03:00
Sergey
848034096c
Disable memory idempotency ( #420 )
...
Because of complexity in Podman logic and calculations of b/m/g
etc let's disable this idempotency for now.
Fix #418
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-04-28 00:26:28 +03:00
Sergey
fefc7e461f
Remove idempotency for log level ( #404 )
...
Since Podman changes its defaults very often and it's impossible
to track and identify every time what is current log level, let's
remove idempotency for this parameter for now.
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-03-29 14:15:16 +03:00
Sergey
aa4c3223d2
Fix podman collection for Podman version 4 ( #398 )
...
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-03-17 21:56:19 +02:00
Rubik's Dot
d024e91216
fix check for read-only change of root image ( #393 )
...
The --read-only option is not checked for changes between runs of
ansible thus the container is not recreated if the user changes
the root image between read-write to read-only.
Default for the read_only variable set to False in line with
documentation and so that later checks are simplified.
This is a fix for bug #383 .
Signed-off-by: Andrew <rubiksdot@grue.cc>
Co-authored-by: Andrew <rubiksdot@grue.cc>
2022-03-14 12:54:12 +02:00
Sergey
81f20befb2
Fix error with exitcommand for Podman v4 ( #390 )
...
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-03-11 12:13:36 +02:00
Sergey
081ac5f851
Fix MAC address detection in created container ( #377 )
...
Fix #373
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-02-17 20:17:57 +02:00
Sergey
527ccacf01
Add --requires option ( #378 )
...
Fix #374
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-02-17 18:53:37 +02:00
Sergey
23fde625f6
Strip slashes from volumes ( #379 )
...
Fix #372
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-02-17 18:29:51 +02:00
Sergey
5db058ac67
Remove default value of log-driver ( #340 )
...
The default value of log-driver is not defined now and can change
depending on the platform.
2021-11-25 19:06:02 +02:00
Cédric Jeanneret
a8e81193f4
Allow to actually pass a list of string for "mounts" ( #332 )
...
Like "volume", "mount" can be passed multiple times to the container
creation/run, therefore we want to support a list of string, and a
"mounts" alias.
2021-11-09 13:40:40 +02:00
Oliver Walsh
a0377fbd24
Fix signal diff for truncated and RT signal names ( #326 )
...
* Fix signal diff for truncated and RT signal names
This refactors the signal mapping logic to closely resemble the logic in
podman.
Podman tolerates images with truncated STOPSIGNAL names e.g RTMIN+3
is used in the freeipa-container Dockerfiles.
Also avoids hardcoding real-time signals as they vary per
platform or glibc implementation (see man 7 signal).
* Cleanup lint
* More lint cleanup
2021-10-19 17:18:22 +03:00
Sergey
717963d66d
Fix issue with podman and exposed ports ( #323 )
2021-10-12 02:18:08 +03:00
Jad Kik
15cd7623af
Add support for network-alias flag ( #314 )
...
* Add support for network-alias flag
* Ignore idempotency assert in tests
Co-authored-by: Sagi Shnaidman <sshnaidm@redhat.com>
2021-10-03 22:18:31 +03:00
Sergey
5d37e1ee22
Add systemd generation for pods ( #299 )
2021-09-15 02:44:06 +03:00
Sergey
24329ce5d3
Generate systemd service files for containers ( #298 )
2021-09-13 17:13:15 +03:00
Sergey
afe55dd277
Fix idempotency when containers have a common network ( #279 )
...
Fix #252
2021-08-16 14:28:57 +03:00
Aliaksandr Mianzhynski
e9ace7b4bf
Add initial secrets support ( #284 )
...
* Add initial secrets support
2021-08-10 15:35:48 +03:00
Sergey
ed681ef10e
Fix idempotency with systemd podman files ( #278 )
...
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
2021-08-02 12:59:43 +03:00
Sergey
9ff36649ab
Change present state to be as created state ( #263 )
...
For being more compliant with docker module.
See #257
2021-07-07 18:48:50 +03:00
Sergey
8ada1501f6
Disable no-hosts idempotency ( #273 )
...
Because of podman bug we can't discover what's --no-hosts option
set to.
2021-07-07 12:11:13 +03:00
Sergey
bcdaa9f825
Add support for timezones in containers ( #262 )
...
* Remove choices for cgroups
* Add timezone parameter to container module
2021-05-24 11:39:08 +03:00
Sergey
a7629a89db
Fix multi-containers options ( #258 )
2021-05-24 09:58:33 +03:00
Sergey
b3cf53e5ac
Fix idempotency for environment ( #260 )
2021-05-24 01:22:32 +03:00
Sergey
b62fb99bae
Fix ansible-test issues for CI ( #241 )
2021-04-07 10:21:08 +03:00
Sergey
607c120f94
Fix uppercase labels idempotency issue ( #230 )
...
When we lower cases for all keys, but leave it original case for
all values, we need to do the same with input labels.
Add test.
Fix #227
2021-04-01 16:33:27 +03:00
Sergey
d87777394b
Add IPv6 support for publishing ports ( #226 )
2021-03-31 18:28:46 +03:00
Sergey
ed3a3dc080
Fix no_log for newer ansible-test ( #221 )
2021-03-16 16:28:58 +02:00
Andreas Gerstmayr
303486c52c
Add sigrtmin+3 signal (required for systemd containers) ( #220 )
2021-03-13 12:30:13 +02:00