From 18a0af6954f48a03bc125fd690347e3ef259096f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rados=C5=82aw=20Piliszek?= <radoslaw.piliszek@gmail.com>
Date: Sun, 20 Jun 2021 14:14:53 +0000
Subject: [PATCH] Do not set pid file for iscsid

Kolla Ansible runs iscsid in the foreground (-f) and
a recent change to iscsid in CentOS 8 (both Linux and Stream)
caused it to reject setting pid file in such a case.
PID file is irrelevant in this scenario so this commit
removes its parameter.

Closes-Bug: #1933033
Change-Id: Ic0c4beae0c812f3ca68a6ee5cc4daa2fee0f277d
---
 ansible/roles/iscsi/templates/iscsid.json.j2         | 2 +-
 releasenotes/notes/bug-1933033-76746d127285cfe8.yaml | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)
 create mode 100644 releasenotes/notes/bug-1933033-76746d127285cfe8.yaml

diff --git a/ansible/roles/iscsi/templates/iscsid.json.j2 b/ansible/roles/iscsi/templates/iscsid.json.j2
index f44cf16c9..cfa4d9f35 100644
--- a/ansible/roles/iscsi/templates/iscsid.json.j2
+++ b/ansible/roles/iscsi/templates/iscsid.json.j2
@@ -1,4 +1,4 @@
 {
-    "command": "iscsid -d 8 -f --pid=/run/iscsid.pid",
+    "command": "iscsid -d 8 -f",
     "config_files": []
 }
diff --git a/releasenotes/notes/bug-1933033-76746d127285cfe8.yaml b/releasenotes/notes/bug-1933033-76746d127285cfe8.yaml
new file mode 100644
index 000000000..88e4789cc
--- /dev/null
+++ b/releasenotes/notes/bug-1933033-76746d127285cfe8.yaml
@@ -0,0 +1,6 @@
+---
+fixes:
+  - |
+    Fixes ``iscsid`` failing in current CentOS 8 based images due to
+    pid file being needlessly set.
+    `LP#1933033 <https://launchpad.net/bugs/1933033>`__
-- 
GitLab