File 0001-Fix-singleprocess-launcher-compatibility-with-oslo.s.patch of Package openstack-ironic

From 09383bc6572a737f33194177a5c4abd968e54980 Mon Sep 17 00:00:00 2001
From: Riccardo Pittau <elfosardo@gmail.com>
Date: Thu, 20 Nov 2025 12:11:45 +0100
Subject: [PATCH] Fix singleprocess launcher compatibility with oslo.service
 4.4+

The combined Ironic service was passing the no_fork parameter
to ServiceLauncher, which was wrongly mapped to ProcessLauncher [1]

Switch to ProcessLauncher which properly supports no_fork since
oslo.service 4.2.0. This ensures VNC signal handling works correctly
and matches the pattern used by other Ironic services.

[1] https://opendev.org/openstack/oslo.service/commit/0dfdf810acdf9aec6dc4fb8339a171535fe8bbc1

Change-Id: Iea150a5c3f147b7e4f8a778510bfc061a14f289a
Signed-off-by: Riccardo Pittau <elfosardo@gmail.com>
---
 ironic/command/singleprocess.py                     |  9 +++------
 ...vice-no-fork-compatibility-d5e45f9adeefa7b4.yaml | 13 +++++++++++++
 2 files changed, 16 insertions(+), 6 deletions(-)
 create mode 100644 releasenotes/notes/oslo-service-no-fork-compatibility-d5e45f9adeefa7b4.yaml

diff --git a/ironic/command/singleprocess.py b/ironic/command/singleprocess.py
index 0f4cff34e..5131d6efe 100644
--- a/ironic/command/singleprocess.py
+++ b/ironic/command/singleprocess.py
@@ -14,7 +14,6 @@ import sys
 
 from oslo_config import cfg
 from oslo_log import log
-from oslo_service import service
 
 from ironic.command import conductor as conductor_cmd
 from ironic.command import utils
@@ -39,11 +38,9 @@ def main():
     # Parse config file and command line options, then start logging
     ironic_service.prepare_service('ironic', sys.argv)
 
-    # Choose the launcher based upon if vnc is enabled or not.
-    # The VNC proxy has to be run in the parent process, not
-    # a sub-process.
-    launcher = service.ServiceLauncher(CONF, restart_method='mutate',
-                                       no_fork=CONF.vnc.enabled)
+    # The VNC proxy has to be run in the parent process (no_fork=True) for
+    # signal handling, otherwise forking is fine (no_fork=False, default).
+    launcher = ironic_service.process_launcher(no_fork=CONF.vnc.enabled)
 
     mgr = rpc_service.RPCService(CONF.host,
                                  'ironic.conductor.manager',
diff --git a/releasenotes/notes/oslo-service-no-fork-compatibility-d5e45f9adeefa7b4.yaml b/releasenotes/notes/oslo-service-no-fork-compatibility-d5e45f9adeefa7b4.yaml
new file mode 100644
index 000000000..9118d32e2
--- /dev/null
+++ b/releasenotes/notes/oslo-service-no-fork-compatibility-d5e45f9adeefa7b4.yaml
@@ -0,0 +1,13 @@
+---
+fixes:
+  - |
+    Fixes compatibility with oslo.service versions 4.4.0 and later. The
+    combined Ironic service (``ironic`` command) was passing the ``no_fork``
+    parameter to ``ServiceLauncher``, which worked in oslo.service <= 4.3.0
+    because ``ServiceLauncher`` was mapped to ``ProcessLauncher`` (which
+    supports ``no_fork``). In oslo.service 4.4.0, this mapping was changed
+    and ``ServiceLauncher`` became a distinct class that doesn't accept
+    ``no_fork``, causing ``TypeError`` when starting the service. The code
+    now directly uses ``ProcessLauncher`` via ``process_launcher()``, which
+    properly supports ``no_fork`` and ensures VNC signal handling works
+    correctly when ``[vnc]enabled=True``.
-- 
2.51.1

openSUSE Build Service is sponsored by