fix: refuse network_mode with its own pod-model reason - #119
Merged
Merged
Conversation
`network_mode` fell through to the generic unsupported-key path, so a user got `unsupported key 'network_mode'` for a key podman honours perfectly well inside a pod (measured, 4.9.3). The refusal is ADR-0003's, and now says so: honouring it would move the container out of the pod's shared network namespace. Closes #115
This was referenced Sep 20, 2026
Closed
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.
Closes #115. The ADR correction that issue asked for landed in #112; this is the remaining half, which the issue itself set aside as "a separate change from this correction".
Before
That is wrong twice over.
network_modeis not unsupported in the sense the message implies — podman honours--networkfor a container that joined a pod, measured on 4.9.3 in #115:And the real reason is invisible: honouring it is exactly what makes it unacceptable, because it moves the container out of the namespace every other service reaches it on.
After
The site is a
_POD_MODEL_REFUSALStable checked just before the generic unknown-key raise, with the ADR-0003 pointer in a comment above it rather than in the message.What this deliberately does not do
links,external_linksandexposestill get the generic message. ADR-0003 names them in the same clause asnetwork_mode, and the table is shaped to hold them. I left them out because their reasons are not the same sentence and I have not measured them:external_linksreaches a container outside the pod, which is close tonetwork_mode's reason, butexposedoes not pull anything out of anything — inside a shared namespace it is simply inert, which is a different claim and arguably makes it anIGNORED_SERVICE_KEYSentry rather than a refusal. Writing one message for all four would restate a reason I would then have to correct, which is the failure mode #115 exists to document.Worth a follow-up issue; not worth guessing here.
Also
test_unsupported_service_key_raisesusednetwork_modeas its example of an unknown key, which it no longer is. Switched tocgroup_parentso the generic path stays tested.(#115)tracking pointer and gained one clause noting the distinction now reaches the user, not only the reader of the ADR.Verification
just lint,just test-ci: green, 100% line coverage held.just test-conformanceagainst realdocker compose configv5.1.2: 865 passed, 6 over-rejections — identical to themainbaseline I ran during fix: declare podman 4.9 the floor and refuse every subpath above it #117.