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 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