OCPBUGS-56597: Fix multipath configuration - #1676
Conversation
There was a problem hiding this comment.
Summary of Changes
Hello @ravanelli, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request introduces new functionality to detect the system's multipath World Wide Identifier (WWID) by querying the multipath -ll command. The stated intent is to ensure this WWID is correctly passed as a kernel argument for robust multipath configuration, although the current implementation focuses on the detection and logging aspect, with the generated kernel argument not yet being integrated into the final kernel command line.
Highlights
- Multipath WWID Detection Logic: Introduces a new private helper function
get_multipath_configuredthat executes themultipath -llcommand, parses its output to extract the first detected World Wide Identifier (WWID), and constructs a kernel argument string in the formatmpath.wwid=<WWID>. - Integration into Rootmap Process: Calls the newly introduced
get_multipath_configured()function within therootmapfunction (on line 71). While theget_multipath_configuredfunction generates thempath.wwidkernel argument, its return value is currently not used to modify the mainkargslist in therootmapfunction.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
|
Adding some notes here: RHCOS uses multipath aliases, which generate mpath device names (like mpatha, mpathb, etc.), while FCOS does not and instead shows devices as dm-0. I’m not very familiar with multipath, so I tried to get the first listed device to extract the WWID. I’m not sure if there might be other edge cases to consider when identifying the WWID, if this order would affect it. Other than that, we still need to finish the fix adding the WWID in the Editing, I just realized the formats are different for the output as well, I was using fcos as base, I will fix it: |
a71c8cc to
bc28c39
Compare
| line[start + 1..].split(')').next() | ||
| } else { | ||
| line.split_whitespace().next() | ||
| }; |
There was a problem hiding this comment.
Should we validate the wwid string is in a format we expect here before we pass it as a karg?
c321a0c to
6503cbf
Compare
6503cbf to
7b7d6c0
Compare
7b7d6c0 to
26fc60d
Compare
26fc60d to
f17e36c
Compare
jlebon
left a comment
There was a problem hiding this comment.
Rebased for conflicts and passed through rustfmt.
Thanks @ravanelli!
- To ensure multipath continues working even if a path fails, the WWID must be specified both as a kernel argument and in /etc/multipath/wwids. Without these, multipath may fail to detect devices when paths go down, leading to device mapping issues. - This PR adds mpath.wwid kernel argument needed for the installer. Signed-off-by: Renata Ravanelli <rravanel@redhat.com>
f17e36c to
a40af0a
Compare
The latter is deprecated. While we're here, drop the unnecessary quotes for `features`.
The bits that pulled that in (flate2 -> miniz_oxide) in our dependency tree have updated to adler2 and we no longer even pull in adler. Update our reference to it in the dev profile.
4e8085e to
e2bd0a9
Compare
kernel argument and in /etc/multipath/wwids.
Without these, multipath may fail to detect
devices when paths go down, leading to device
mapping issues.