Skip to content

Add PRD for modprobe.d config file support - #1874

Merged
openshift-merge-bot[bot] merged 1 commit into
rh-ecosystem-edge:mainfrom
NataliShemtov:midstream-modprobed-config-prd
Aug 12, 2026
Merged

Add PRD for modprobe.d config file support#1874
openshift-merge-bot[bot] merged 1 commit into
rh-ecosystem-edge:mainfrom
NataliShemtov:midstream-modprobed-config-prd

Conversation

@NataliShemtov

@NataliShemtov NataliShemtov commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Adds an enhancement doc describing the requirements for letting users supply modprobe.d configuration files in their driver container image, so KMM can apply them during kernel module load/unload.

This is a manual cherry pick for this upstream

Summary by CodeRabbit

  • Documentation
    • Added enhancement proposal 0005 for configuring modprobe.d files in driver container images.
    • Documented supported source paths, copying behavior, and execution during module loading and unloading.
    • Defined validation and failure handling for missing, empty, or nested directories.
    • Clarified interactions with firmware loading, module ordering, privileged worker pods, backward compatibility, and future improvements.

@netlify

netlify Bot commented Aug 12, 2026

Copy link
Copy Markdown

Deploy Preview for openshift-kmm ready!

Name Link
🔨 Latest commit 8bca4ae
🔍 Latest deploy log https://app.netlify.com/projects/openshift-kmm/deploys/6a7c0c4deff8d10008a3383d
😎 Deploy Preview https://deploy-preview-1874--openshift-kmm.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@openshift-ci
openshift-ci Bot requested review from chr15p and ybettan August 12, 2026 05:42
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@NataliShemtov, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 40 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c5bd0e97-79c9-4fab-bc18-04dd9c1eac6f

📥 Commits

Reviewing files that changed from the base of the PR and between 6b61f5d and 8bca4ae.

📒 Files selected for processing (1)
  • docs/enhancements/0005-modprobed-config.md

Walkthrough

The pull request adds enhancement proposal 0005. The proposal defines modprobe.d configuration support for driver container images, including paths, validation, runtime behavior, compatibility, security, and acceptance criteria.

Changes

modprobe.d configuration proposal

Layer / File(s) Summary
Enhancement proposal definition
docs/enhancements/0005-modprobed-config.md
Documents configurable source paths, copying to /etc/modprobe.d/, module load and unload behavior, validation, failure handling, compatibility constraints, security requirements, acceptance criteria, assumptions, and future work.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the addition of the enhancement document for modprobe.d configuration file support.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@NataliShemtov

Copy link
Copy Markdown
Contributor Author

/cc @TomerNewman

@openshift-ci
openshift-ci Bot requested a review from TomerNewman August 12, 2026 05:44

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/enhancements/0005-modprobed-config.md`:
- Around line 76-85: Update the modprobe.d lifecycle requirements to validate
the configured directory and its files before module unload, not only before
load. Require unload to stop and report failure when the directory is missing or
empty, and add an acceptance test covering both missing and empty configuration
after a worker pod restart.
- Around line 29-30: Expand the proposal’s failure-reporting requirements beyond
missing, empty, or nested directories to cover copy failures, permission errors,
destination failures, modprobe errors, and malformed configuration files. Define
the expected user-visible status or event for each path and add corresponding
acceptance tests, or narrow the stated goal so it does not promise reporting for
those failures.
- Around line 110-113: Update the NFR-3 wording and the corresponding acceptance
criteria to say “an OpenShift event” instead of “a Openshift event,” preserving
the surrounding requirements unchanged.
- Around line 72-80: Clarify FR-2 and FR-3 to define modprobe.d directive
semantics: install and remove directives replace normal module insertion or
removal rather than acting as pre-modprobe hooks. State that directive commands
continuing the operation must invoke modprobe with --ignore-install or
--ignore-remove respectively, and require KMM’s load and unload commands to omit
these options so the directives are honored.
- Around line 102-106: Update the NFR-1 security requirements to document the
trust boundary for image-provided modprobe.d install and remove commands: state
the required image provenance and authorization, or define command restrictions
and audit controls, while preserving the requirement to disclose the Privileged
worker-pod implication before deployment.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c6e10598-99a7-4e0d-95a6-d601dcf09d8d

📥 Commits

Reviewing files that changed from the base of the PR and between 2180b98 and 6b61f5d.

📒 Files selected for processing (1)
  • docs/enhancements/0005-modprobed-config.md

Comment on lines +29 to +30
- Users are always informed when their modprobe.d configuration could not
be applied, rather than experiencing a silent failure.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Make failure reporting cover every configuration application failure.

The goal requires users to be informed whenever configuration cannot be applied. NFR-3 covers only missing, empty, or nested directories. The proposal does not define status or event reporting for copy failures, permission errors, destination failures, or modprobe errors. The non-goal also allows malformed files to fail during modprobe without a KMM-reported error. Add requirements and acceptance tests for these failure paths, or narrow the goal.

Also applies to: 46-48, 110-113

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/enhancements/0005-modprobed-config.md` around lines 29 - 30, Expand the
proposal’s failure-reporting requirements beyond missing, empty, or nested
directories to cover copy failures, permission errors, destination failures,
modprobe errors, and malformed configuration files. Define the expected
user-visible status or event for each path and add corresponding acceptance
tests, or narrow the stated goal so it does not promise reporting for those
failures.

Comment on lines +72 to +80
- **FR-2:** When a module has the modprobe.d capability enabled, the
configuration files in `/etc/modprobe.d/` must take effect before
`modprobe` is invoked to load the kernel module, so that any load-time
init sequence defined in those files runs automatically.
- **FR-3:** When a module has the modprobe.d capability enabled, the
configuration files in `/etc/modprobe.d/` must take effect before
`modprobe` is invoked to unload the kernel module, so that any de-init
sequence defined in those files runs automatically (including
sequences needed to release kernel subsystem reference counts before

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
sed -n '55,95p' docs/enhancements/0005-modprobed-config.md

Repository: rh-ecosystem-edge/kernel-module-management

Length of output: 2581


🌐 Web query:

modprobe.d man page install remove directives --ignore-install --ignore-remove behavior

💡 Result:

The install and remove directives in modprobe.d(5) are configuration commands used to override the default kernel module insertion and removal behavior [1][2]. Install directive: The install modulename command instructs modprobe to execute a specified shell command instead of directly inserting the module into the kernel [1][2]. This is typically used for complex tasks, such as loading other required modules before the target module [1]. Remove directive: The remove modulename command functions similarly to the install command but is triggered when modprobe -r is executed [1][2]. --ignore-install and --ignore-remove behavior: The --ignore-install and --ignore-remove options (or -i) are used with the modprobe command to prevent it from executing these custom install and remove commands defined in the configuration files [3][4]. When either --ignore-install or --ignore-remove is used, modprobe ignores both types of commands for the module specified on the command line [3][4]. Dependent modules, however, remain subject to any install or remove commands defined for them in the configuration [3][4]. A common use case for these options is within the install command itself to avoid infinite loops [1][2]. For example, if you define an install command to load "barney" before "fred", you might use /sbin/modprobe --ignore-install fred to ensure the second modprobe call triggers the default insertion rather than re-triggering the custom install command [1][2].

Citations:


🏁 Script executed:

#!/bin/bash
python3 - <<'PY'
from urllib.request import urlopen

url = "https://man7.org/linux/man-pages/man5/modprobe.d.5.html"
text = urlopen(url, timeout=10).read().decode("utf-8", "replace").lower()

checks = {
    "install replaces normal insertion": "instead of inserting the module normally" in text,
    "remove replaces normal removal": "instead of removing the module normally" in text,
    "ignore-install exists": "--ignore-install" in text,
    "ignore-remove exists": "--ignore-remove" in text,
    "ignore options used to avoid recursion": "infinite loop" in text,
}
for name, result in checks.items():
    print(f"{name}: {result}")
PY

rg -n -i 'install|remove|ignore-install|ignore-remove|pre-hook|hook' \
  docs/enhancements/0005-modprobed-config.md

Repository: rh-ecosystem-edge/kernel-module-management

Length of output: 2903


🏁 Script executed:

#!/bin/bash
set -e

python3 - <<'PY'
import re
import ssl
from urllib.request import urlopen

url = "https://man7.org/linux/man-pages/man5/modprobe.d.5.html"
context = ssl._create_unverified_context()
html = urlopen(url, context=context, timeout=10).read().decode("utf-8", "replace")
text = re.sub(r"<[^>]+>", " ", html)
text = re.sub(r"\s+", " ", text).lower()

for term in (
    "instead of inserting the module normally",
    "instead of removing the module normally",
    "--ignore-install",
    "--ignore-remove",
):
    print(f"{term}: {term in text}")
PY

sed -n '1,180p' docs/enhancements/0005-modprobed-config.md

Repository: rh-ecosystem-edge/kernel-module-management

Length of output: 9392


Define modprobe.d directive semantics for FR-2 and FR-3. install and remove directives replace normal module insertion and removal; they are not pre-modprobe hooks. Require commands that continue the operation to call modprobe --ignore-install or modprobe --ignore-remove as appropriate. Require KMM's load and unload commands not to use these options, or the directives will be bypassed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/enhancements/0005-modprobed-config.md` around lines 72 - 80, Clarify
FR-2 and FR-3 to define modprobe.d directive semantics: install and remove
directives replace normal module insertion or removal rather than acting as
pre-modprobe hooks. State that directive commands continuing the operation must
invoke modprobe with --ignore-install or --ignore-remove respectively, and
require KMM’s load and unload commands to omit these options so the directives
are honored.

Comment thread docs/enhancements/0005-modprobed-config.md
Comment thread docs/enhancements/0005-modprobed-config.md
Comment thread docs/enhancements/0005-modprobed-config.md
@NataliShemtov
NataliShemtov force-pushed the midstream-modprobed-config-prd branch from 6b61f5d to 5935d42 Compare August 12, 2026 06:00
Adds an enhancement doc describing the requirements for letting users
supply modprobe.d configuration files in their driver container image,
so KMM can apply them during kernel module load/unload.

Upstream-Commit: 03a0eb3d6b03114249b6c90e1fca9d3812ac717d
@NataliShemtov
NataliShemtov force-pushed the midstream-modprobed-config-prd branch from 5935d42 to 8bca4ae Compare August 12, 2026 06:01
@TomerNewman

Copy link
Copy Markdown
Member

/ok-to-test
/approve
/assign @ybettan

@openshift-ci

openshift-ci Bot commented Aug 12, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: NataliShemtov, TomerNewman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@NataliShemtov

Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@TomerNewman

Copy link
Copy Markdown
Member

/retest

@ybettan

ybettan commented Aug 12, 2026

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label Aug 12, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit 32e6e38 into rh-ecosystem-edge:main Aug 12, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants