From 89ecaeb1152b22f41b74c9e594acfb4dddb056eb Mon Sep 17 00:00:00 2001 From: Mathieu Bultel Date: Wed, 27 Nov 2019 10:12:03 +0100 Subject: [PATCH] Disable pxe_tftp systemd services during upgrade Change-Id: I7a697c662c611c1319bb2b78a4a12045ffba73f3 --- deployment/ironic/ironic-pxe-container-puppet.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/deployment/ironic/ironic-pxe-container-puppet.yaml b/deployment/ironic/ironic-pxe-container-puppet.yaml index 850ab8bc48..8d272ed5b1 100644 --- a/deployment/ironic/ironic-pxe-container-puppet.yaml +++ b/deployment/ironic/ironic-pxe-container-puppet.yaml @@ -104,6 +104,19 @@ outputs: name: xinetd state: restarted when: xinetd_active_result.rc == 0 + - name: Check if ironic_pxe_tftp is enabled + command: systemctl is-enabled --quiet ironic_pxe_tftp + ignore_errors: True + register: ironic_pxe_tftp_enabled_result + - name: Set fact ironic_pxe_tftp_enabled + set_fact: + ironic_pxe_tftp_enabled: "{{ ironic_pxe_tftp_enabled_result.rc == 0 }}" + - name: Stop ironic_pxe_tftp service + when: + - step|int == 1 + - ironic_pxe_tftp_enabled_result|bool + service: name=ironic_pxe_tftp state=stopped enabled=no + docker_config: step_4: ironic_pxe_tftp: