Skip to content

Commit

Permalink
fix namespace reporting
Browse files Browse the repository at this point in the history
somehow, containers#14501 got through CI even though the remote tests fail. The testa are failing
due to the PodSpecGenerator not containing the UTSNs entitiy and infra's spec is not yet allowed to be accessed remotely

[NO NEW TESTS NEEDED]

resolves containers#14847

Signed-off-by: Charlie Doern <[email protected]>
  • Loading branch information
cdoern committed Jul 7, 2022
1 parent 48c8923 commit 0424084
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions pkg/specgen/podspecgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ type PodBasicConfig struct {
// Any containers created within the pod will inherit the pod's userns settings.
// Optional
Userns Namespace `json:"userns,omitempty"`
// UtsNs is used to indicate the UTS mode the pod is in
UtsNs Namespace `json:"utsns,omitempty"`
// Devices contains user specified Devices to be added to the Pod
Devices []string `json:"pod_devices,omitempty"`
// Sysctl sets kernel parameters for the pod
Expand Down
4 changes: 1 addition & 3 deletions test/e2e/pod_create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1145,9 +1145,7 @@ ENTRYPOINT ["sleep","99999"]
session = podmanTest.Podman([]string{"run", "-it", "--pod", session.OutputToString(), ALPINE, "printenv", "HOSTNAME"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
if !IsRemote() { // remote hostname will not match os.Hostname()
Expect(session.OutputToString()).To(ContainSubstring(hostname))
}
Expect(session.OutputToString()).To(ContainSubstring(hostname))

podName := "utsPod"
ns := "ns:/proc/self/ns/"
Expand Down

0 comments on commit 0424084

Please sign in to comment.