From 5e70fa86918e7274e8ea02e79fa7a32e2ac22741 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 17 Jun 2019 09:56:07 +0900 Subject: [PATCH] Disable iscsi.service to avoid iscsid on host from getting started When some stale shutdown happens on the node, iscsi.service detects remaining information about iscsi connection, and recovers connections based on the information, with starting iscsid service on host. This causes a collision between iscsid on host and iscsid in container, which makes iscsid container keep restarting. This patch makes sure that iscsi.service on host is disabled when we deploy iscsid container, to avoid iscsid on host is started unexpectedly. Change-Id: I6c36cd15edfa53c3c76be9095ff40cecf451490d Closes-Bug: #1833019 (cherry picked from commit 0d67ecaf75d9375e2a88479514ce6cb7e910ec5e) --- deployment/iscsid/iscsid-container-puppet.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/deployment/iscsid/iscsid-container-puppet.yaml b/deployment/iscsid/iscsid-container-puppet.yaml index becba23f9b..fcead66c9d 100644 --- a/deployment/iscsid/iscsid-container-puppet.yaml +++ b/deployment/iscsid/iscsid-container-puppet.yaml @@ -111,6 +111,13 @@ outputs: - name: Stop and disable iscsid.socket service service: name=iscsid.socket state=stopped enabled=no when: stat_iscsid_socket.stat.exists + - name: Check if iscsi.service is enabled + command: systemctl is-enabled --quiet iscsi.service + ignore_errors: True + register: iscsi_service_enabled_result + - name: Stop iscsi.service + service: name=iscsi.service state=stopped enabled=no + when: iscsi_service_enabled_result.rc == 0 upgrade_tasks: [] post_upgrade_tasks: - when: step|int == 1