Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check multipath #1025

Merged
merged 2 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions service/lib/agama/storage/manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down Expand Up @@ -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
5 changes: 5 additions & 0 deletions service/package/rubygem-agama.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 1 13:08:39 UTC 2024 - Josef Reidinger <[email protected]>

- Log if multipath probing is misconfigured (bsc#1215598)

-------------------------------------------------------------------
Mon Jan 29 13:51:30 UTC 2024 - José Iván López González <[email protected]>

Expand Down
Loading