Skip to content

Conversation

@edsantiago
Copy link
Member

Plus a bug fix: the wait_for_output() helper would continue
checking, eventually timing out, even if the container had
already exited (probably because of an error). Fix: as
part of the loop, run 'podman inspect' and bail out if
container is not running. Include exit code and logs.

Signed-off-by: Ed Santiago [email protected]

@edsantiago
Copy link
Member Author

[Test failure was because podman-remote does not emit "Trying to pull ..." messages; so there's no way to distinguish I-pulled from image-was-already-here. Decided to just skip_if_remote.]

@edsantiago
Copy link
Member Author

$ ./bin/podman run --rm --privileged --userns=host quay.io/libpod/alpine_labels:latest cat -v /proc/self/attr/current
WARNING: The same type, major and minor should not be used for multiple devices.

Any ideas?

@edsantiago
Copy link
Member Author

It's not a flake: rerunning fails the same way. There's something weird about the f30 test image, and I suspect it's a real problem. Unfortunately it will be almost impossible to debug. I've submitted opencontainers/runtime-tools#701 as a long-term future way of getting a slight clue about what's wrong, but even if that's accepted (which is unlikely because its CI is failing and I have no idea why) it would take time to vendor this into podman.

@TomSweeneyRedHat
Copy link
Member

Maybe I'm missing something, but I'm not seeing the warning when I run it "by hand" on my F30 vm with upstream Podman. However the output is missing a carriage return, it couldn't be that could it?

$ podman run --rm --privileged --userns=host quay.io/libpod/alpine_labels:latest cat -v /proc/self/attr/current
unconfined_u:system_r:container_runtime_t:s0^@[tom@localhost ~]$

@edsantiago
Copy link
Member Author

No, it works fine (no warning message) on all the f30 systems I've tried. The problem is something specific to the CI one. (And no, it's not the NUL-instead-of-NL terminator. That's just the way /proc/self/attr/current works everywhere). Thanks for checking!

Copy link
Member

@jwhonce jwhonce left a comment

Choose a reason for hiding this comment

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

LGTM when tests pass

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: edsantiago, jwhonce

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 10, 2020
@rhatdan
Copy link
Member

rhatdan commented Jan 10, 2020

sudo podman run --rm --privileged quay.io/libpod/alpine_labels:latest cat -v /proc/self/attr/current
WARNING: The same type, major and minor should not be used for multiple devices.

Something is wacky with --privileged. Looks like a bug.

@rhatdan
Copy link
Member

rhatdan commented Jan 10, 2020

Well the good thing, is this bug exists with older podman.

podman run --privileged alpine echo hello
WARNING: The same type, major and minor should not be used for multiple devices.
hello

rpm -q podman
podman-1.6.2-2.fc31.x86_64

@rhatdan
Copy link
Member

rhatdan commented Jan 10, 2020

Added a little extra ouput

WARNING: The same type, major and minor should not be used for multiple devices. /dev/null

Looks like we have two /dev/null added.

@rhatdan
Copy link
Member

rhatdan commented Jan 10, 2020

Looks like the way my host was configured.

sh-5.0# mknod /dev/foo c 1 3 
sh-5.0# podman run --privileged alpine echo hello
WARNING: The same type, major and minor should not be used for multiple devices.
sh-5.0# rm -f /dev/foo 
sh-5.0# podman run --privileged alpine echo hello
hello

- run: --name (includes 'podman container exists' tests)
- run: --pull (always, never, missing)
- build: new test for ADD URL (containers#4420)
- exec: new test for issue containers#4785 (pipe getting lost)
- diff: new test
- selinux (mostly copied from docker-autotest)

Plus a bug fix: the wait_for_output() helper would continue
checking, eventually timing out, even if the container had
already exited (probably because of an error). Fix: as
part of the loop, run 'podman inspect' and bail out if
container is not running. Include exit code and logs.

Signed-off-by: Ed Santiago <[email protected]>
@edsantiago
Copy link
Member Author

opencontainers/runtime-tools#701 is merged, so some day we'll get greater visibility into what the problem is, but that could take years (new runtime-tools release, then a podman revendor). ITM I've simply special-cased the warning and ignored it. The warning will still appear in test logs, in case anyone wants to fix it, but the selinux test will not fail because of it.

@rhatdan
Copy link
Member

rhatdan commented Jan 15, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 15, 2020
@openshift-merge-robot openshift-merge-robot merged commit 0870e88 into containers:master Jan 15, 2020
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants