aboutsummaryrefslogtreecommitdiff
path: root/ansible/module_utils/kolla_systemd_worker.py
AgeCommit message (Collapse)AuthorFilesLines
2024-11-28systemd: Add kolla.targetMichal Nasiadka1-0/+1
This should ease the operation of stopping/starting all Kolla containers. Change-Id: I30915409510a4eb3e501e624b864b5ef48f85c75
2024-09-13systemd: Add Wants=docker.service for dockerMichal Nasiadka1-0/+1
In I70dd1751dea6bfc9bb265aeda04b3392e135324c we removed Requires=docker.service and left only After=docker.service. In a case where something starts docker.service that's enough, but if docker.service is disabled or no service is dependent on it - it won't be started. This patch adds Wants=docker.service which will try to start docker.service if it is not started or enabled but does not impose a dependency which causes restart of kolla systemd units when docker.service is restarted (see [1]). Closes-Bug: #2065168 [1]: https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html#Wants= Change-Id: Ic3acb15f7c6ba7269ef62ccc8895b6bea4fc1f4d
2024-06-24Fix kolla-ansible systemd restart behaviourVictor Chembaev1-1/+0
Fix kolla systemd unit template to prevent restart all kolla services with docker.service restart Change-Id: I70dd1751dea6bfc9bb265aeda04b3392e135324c Closes-Bug: 2065168
2024-01-05Fix long service restarts while using systemdMichal Arbet1-0/+1
Some containers exiting with 143 instead of 0, but this is still OK. This patch just allows ExitCode 143 (SIGTERM) as fix. Details in bugreport. Services which exited with 143 (SIGTERM): kolla-cron-container.service kolla-designate_producer-container.service kolla-keystone_fernet-container.service kolla-letsencrypt_lego-container.service kolla-magnum_api-container.service kolla-mariadb_clustercheck-container.service kolla-neutron_l3_agent-container.service kolla-openvswitch_db-container.service kolla-openvswitch_vswitchd-container.service kolla-proxysql-container.service Partial-Bug: #2048130 Change-Id: Ia8c85d03404cfb368e4013066c67acd2a2f68deb
2023-11-15Rename kolla_docker to kolla_containerMartin Hiner1-1/+1
Changes name of ansible module kolla_docker to kolla_container. Change-Id: I13c676ed0378aa721a21a1300f6054658ad12bc7 Signed-off-by: Martin Hiner <m.hiner@partner.samsung.com>
2023-10-20Add support of podman deploymentIvan Halomi1-8/+14
This change adds basic deployment based on Podman container manager as an alternative to Docker. Signed-off-by: Ivan Halomi <i.halomi@partner.samsung.com> Signed-off-by: Martin Hiner <m.hiner@partner.samsung.com> Signed-off-by: Petr Tuma <p.tuma@partner.samsung.com> Change-Id: I2b52964906ba8b19b8b1098717b9423ab954fa3d Depends-On: Ie4b4c1cf8fe6e7ce41eaa703b423dedcb41e3afc
2023-08-17systemd: handle running container without systemd unitMichal Nasiadka1-4/+9
MariaDB bootstrap has a phase where the first MariaDB container is running with Galera bootstrap - after a check that WSREP is synced is successful - we restart the container. The bootstrap container is named mariadb and running with docker_restart_policy: "no" - the restarted container should be running in systemd. Before this patch the code created a systemd unit but it was initially stopped - so stopping was always a success - and the container would be killed with SIGKILL on removal (which obviously breaks MariaDB). This patch also improves docker/systemd stops by waiting for real unit/container stop and adds failing CI for containers that are killed with signal 9. Closes-Bug: #2029613 Change-Id: I0a03e509ce228a50e081fcab44d2b4831251190c
2023-01-19Add systemd container controlMartin Hiner1-0/+204
This commit adds SystemdWorker class to kolla_docker ansible module. It is used to manage container state via systemd calls. Change-Id: I20e65a6771ebeee462a3aaaabaa5f0596bdd0581 Signed-off-by: Ivan Halomi <i.halomi@partner.samsung.com> Signed-off-by: Martin Hiner <m.hiner@partner.samsung.com>