-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Correct output when inspecting containers created with --ipc #17201
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
LGTM |
Fixes: containers#17189 Signed-off-by: Daniel J Walsh <[email protected]>
@Luap99 Mine or yours, or should we merge. |
I don't care, both seem to do the same code and test wise, they are just using a bit different syntax. How about we let @edsantiago decide which test change he likes better? This PR or #17200? |
I've only skimmed these two (and restarted flakes). I will review in the next hour, but am OK if someone beats me to it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry y'all, this is not a decision I can make. Tests look great to me (side note: I am really, really, really appreciative of all the thought everyone is giving to tests). But the changes in setting IpcMode
are beyond my ability to understand.
} | ||
} | ||
case c.config.NoShm: | ||
hostConfig.IpcMode = "none" | ||
case c.config.NoShmShare: | ||
hostConfig.IpcMode = "private" | ||
} | ||
if hostConfig.IpcMode == "" { | ||
hostConfig.IpcMode = "shareable" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer a switch
to the if/elses
in #17200, but I can't convince myself that this part of the change is equivalent. If a default
case is possible, and none of the conditions trigger, won't IpcMode
be left blank? (I don't know if this is possible)
Moving line 186 (initialization to "host") to line 177 (before the switch) would ease my mind, but perhaps it's obvious to those familiar with this code why that is not necessary.
is "$output" "$hostipc" "HostIPC and container IPC should be same" | ||
run_podman inspect IPC --format '{{ .HostConfig.IpcMode }}' | ||
is "$output" "host" "host mode should be selected" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just as a suggestion for future, not a blocker: I like my failure messages to make it clear why something is expected, not what is expected. (The "what" will be shown as part of the error message). Something like
is "$output" "host" ".HostConfig.IpcMode when --ipc=host"
That makes the error message something like:
FAIL: .HostConfig.IpcMode when --ipc=host
expected: host
got: slaartibartfast
Ok I will merge mine, but I still think we can get some of @Luap99 improvements in a different PR. |
containers/pull/17186 and containers/pull/17201 have been merged at roughly the same time. Both work fine in isolation but the new kube test breaks in combination. Fix the IPC kube test to make CI healthy. Signed-off-by: Valentin Rothberg <[email protected]>
Fixes: #17189
Signed-off-by: Daniel J Walsh [email protected]
Does this PR introduce a user-facing change?