From 2c8c7703738a7aaffe1a80a7915cb403390aaa78 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Thu, 1 Feb 2024 12:39:29 +0100 Subject: [PATCH 1/2] add check for correct multipath (bsc#1215598) --- service/lib/agama/storage/manager.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/service/lib/agama/storage/manager.rb b/service/lib/agama/storage/manager.rb index 7eecdea6a4..21d7543efe 100644 --- a/service/lib/agama/storage/manager.rb +++ b/service/lib/agama/storage/manager.rb @@ -108,6 +108,7 @@ def on_probe(&block) def probe start_progress(4) config.pick_product(software.selected_product) + check_multipath progress.step(_("Activating storage devices")) { activate_devices } progress.step(_("Probing storage devices")) { probe_devices } progress.step(_("Calculating the storage proposal")) { calculate_proposal } @@ -283,6 +284,23 @@ def security def questions_client @questions_client ||= Agama::DBus::Clients::Questions.new(logger: logger) end + + MULTIPATH_CONFIG = "/etc/multipath.conf" + # Checks if all requirement for multipath probing is correct and if not + # then log it + def check_multipath + # check if kernel module is loaded + mods = `lsmod`.lines.grep(/dm_multipath/) + logger.warn("dm_multipath modules is not loaded") if mods.empty? + + conf_file = File.exist?(MULTIPATH_CONFIG) + if conf_file + finder = File.readlines(MULTIPATH_CONFIG).grep(/find_multipaths\s+smart/) + logger.warn("find_multipaths is not set to smart value") if finder.empty? + else + logger.warn("#{MULTIPATH_CONFIG} does not exist") + end + end end end end From 1f268e95347d761a978d74c360db2a7c1b6d3ef5 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Thu, 1 Feb 2024 14:09:06 +0100 Subject: [PATCH 2/2] changes --- service/package/rubygem-agama.changes | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/service/package/rubygem-agama.changes b/service/package/rubygem-agama.changes index df8922d318..edefa801fc 100644 --- a/service/package/rubygem-agama.changes +++ b/service/package/rubygem-agama.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Feb 1 13:08:39 UTC 2024 - Josef Reidinger + +- Log if multipath probing is misconfigured (bsc#1215598) + ------------------------------------------------------------------- Mon Jan 29 13:51:30 UTC 2024 - José Iván López González