From a06cc5f93f79d8dc0f65f1f42f4277310e2e24cb Mon Sep 17 00:00:00 2001 From: Damien Ciabrini Date: Tue, 9 Jul 2019 18:53:47 +0200 Subject: [PATCH] Generate addition drop-in dependencies for podman containers Adding a new parameter: SystemdDropInDependencies (true by default). Which when set to True will create /etc/sysconfig/podman_drop_in on the host; to tell paunch to use paunch-start-podman-container script to start the containers. This file makes paunch generate additional systemd dependencies for containers that have special start/stop ordering constraints. It ensures that those constraints are enforced on reboot/shutdown. Depends-On: Idaf5d4871ad1231f2592238a7925857af8f40548 Change-Id: I4f8cd5ba4f747b0169ae0bddf6a14048fa782f32 --- .../podman/podman-baremetal-ansible.yaml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/deployment/podman/podman-baremetal-ansible.yaml b/deployment/podman/podman-baremetal-ansible.yaml index 6deac53775..c881b64dfd 100644 --- a/deployment/podman/podman-baremetal-ansible.yaml +++ b/deployment/podman/podman-baremetal-ansible.yaml @@ -53,9 +53,16 @@ parameters: username: pa55word '192.0.2.1:8787': registry_username: password + SystemdDropInDependencies: + default: true + description: tell the container manager (e.g. paunch) to inject + additional ordering dependencies for the systemd + scopes associated to podman containers. + type: boolean conditions: insecure_registry_is_empty: {equals : [{get_param: DockerInsecureRegistryAddress}, []]} + systemd_drop_in_dependencies_enabled: {get_param: SystemdDropInDependencies} outputs: role_data: @@ -102,6 +109,21 @@ outputs: tripleo_container_registry_logins: "{{ container_registry_logins }}" tripleo_container_registry_login: "{{ container_registry_login | bool }}" + - if: + - systemd_drop_in_dependencies_enabled + - - name: Configure paunch to generate systemd drop-in dependencies + copy: + dest: /etc/sysconfig/podman_drop_in + content: | + This file makes paunch generate additional systemd + dependencies for containers that have special + start/stop ordering constraints. It ensures that + those constraints are enforced on reboot/shutdown. + - - name: Configure paunch to not generate drop-in dependencies + file: + path: /etc/sysconfig/podman_drop_in + state: absent + service_config_settings: {} upgrade_tasks: