daemon: mount writable /tmp for mstconfig lockfiles#146
Merged
e0ne merged 1 commit intoMellanox:network-operator-26.1.xfrom Feb 2, 2026
Merged
daemon: mount writable /tmp for mstconfig lockfiles#146e0ne merged 1 commit intoMellanox:network-operator-26.1.xfrom
e0ne merged 1 commit intoMellanox:network-operator-26.1.xfrom
Conversation
When running with readOnlyRootFilesystem enabled, mstconfig fails to create its lockfiles because the path /tmp/mstflint_lockfiles is hardcoded in the mstflint source code. This patch adds an emptyDir volume mounted at /tmp to provide a writable location for these lockfiles while maintaining the security benefits of a read-only root filesystem for the rest of the container. Signed-off-by: Fred Rolland <frolland@nvidia.com>
|
Thanks for your PR,
To skip the vendors CIs, Maintainers can use one of:
|
heyvister1
approved these changes
Feb 1, 2026
Collaborator
heyvister1
left a comment
There was a problem hiding this comment.
Nice and elegant. Thanks
I think that this should be also accepted by upstream
Greptile OverviewGreptile SummaryThis PR adds a writable Changes:
Impact:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant K8s as Kubernetes
participant Pod as sriov-network-config-daemon Pod
participant Container as Daemon Container
participant EmptyDir as /tmp emptyDir Volume
participant mstconfig as mstconfig Binary
participant Lockfiles as /tmp/mstflint_lockfiles
K8s->>Pod: Create DaemonSet Pod
K8s->>EmptyDir: Create emptyDir volume (tmp)
K8s->>Container: Start container with readOnlyRootFilesystem=true
K8s->>Container: Mount emptyDir at /tmp
Note over Container: Root filesystem is read-only
Note over EmptyDir: /tmp is writable via emptyDir
Container->>mstconfig: Execute mstconfig command
mstconfig->>Lockfiles: Create lockfile at /tmp/mstflint_lockfiles
Note over Lockfiles: Path hardcoded in mstflint source
Lockfiles-->>mstconfig: Lockfile created successfully
mstconfig->>Container: Configure NIC firmware
mstconfig-->>Container: Operation complete
Note over Container,EmptyDir: Security maintained: only /tmp is writable
|
e0ne
approved these changes
Feb 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When running with readOnlyRootFilesystem enabled, mstconfig fails to create its lockfiles because the path /tmp/mstflint_lockfiles is hardcoded in the mstflint source code.
This patch adds an emptyDir volume mounted at /tmp to provide a writable location for these lockfiles while maintaining the security benefits of a read-only root filesystem for the rest of the container.