From 7a523146950ba2b2f509d41e92d785c77beaaabe Mon Sep 17 00:00:00 2001 From: Adam Rozman Date: Fri, 10 Nov 2023 09:50:22 +0200 Subject: [PATCH] fix multipathd error handling release notes This commit: - fixes some "multipathd error handling improvement" release notes - fixes a related comment in the code Related launchpad issue https://bugs.launchpad.net/ironic-python-agent/+bug/2031092 Change-Id: Ie3ba0601fa117b053cb8db6284e47249ca9c9134 Signed-off-by: Adam Rozman --- ironic_python_agent/hardware.py | 3 ++- ...handling_improvement-1669d0de4bfdbe95.yaml | 25 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ironic_python_agent/hardware.py b/ironic_python_agent/hardware.py index ca481935d..0d5557ecb 100644 --- a/ironic_python_agent/hardware.py +++ b/ironic_python_agent/hardware.py @@ -216,7 +216,8 @@ def _enable_multipath(): # NOTE(rozzix): This could cause an OS error: # "process is already running failed to create pid file" depending on # the multipathd version in case multipathd is already running. - # I suggest muting the OS error in addition to the execution error. + # The safest way to start multipathd is to expect OS error in addition + # to the execution error and handle both as inconsequential. il_utils.try_execute('multipathd') # This is mainly to get the system to actually do the needful and # identify/enumerate paths by combining what it can detect and what diff --git a/releasenotes/notes/multipath_error_handling_improvement-1669d0de4bfdbe95.yaml b/releasenotes/notes/multipath_error_handling_improvement-1669d0de4bfdbe95.yaml index c52d99e62..1d9c02092 100644 --- a/releasenotes/notes/multipath_error_handling_improvement-1669d0de4bfdbe95.yaml +++ b/releasenotes/notes/multipath_error_handling_improvement-1669d0de4bfdbe95.yaml @@ -1,20 +1,19 @@ --- fixes: - | - The error handling of the multipathd service startup/discovery process. + Fixes the error handling of multipathd service startup/discovery process. IPA handles both scenario when the multipathd service is already started and the scenario when the service has not been started and in the second - scenario IPA will try to start the service. IPA is not pre checking whether - multipathd is running already or not, it will start the multipathd service - even if it is already running and expects 0 error code . It has been - noticed that with certain combinations of Linux distros and multipathd - versions the error code is not 0 when IPA tries to start multipathd in - case an instance of multipathd is already running. - When the expected return code is not 0 an exception will be thrown and that + scenario IPA will try to start the service. IPA is not checking whether + multipathd is running already and not, it will start the multipathd service + even it is already running and expects 0 error code even if the service + is already running. It has been noticed that with certain combinations of + distros and multipathd versions the error code is not 0 when IPA tries + to start multipathd when an instance of multipathd is already running. + When the expected return code is not 0 that causes an exception and that will cause the multipath device discovery to terminate prematurely and if the selected root device is a multipath device then IPA won't be - able to provision. - This fix discards the exception that is caused by the non 0 error code - returned by the multipathd startup process. In case there is a genuine - issue with the multipath service, that would be caught when the actual - multipath device listing command is executed (multipath -ll). + able to provision. This fix discards the exception that is caused by the + non 0 error code returned by the multipathd startup process. In case there + is a genuine issue with the multipath service, that would be caught when + the actual multipath device listing command is executed (multipath -ll).