Skip to content
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

e2e/systemd: test with enforcing selinux #2002

Closed
wants to merge 312 commits into from
Closed

e2e/systemd: test with enforcing selinux #2002

wants to merge 312 commits into from

Conversation

EmilienM
Copy link
Contributor

@EmilienM EmilienM commented Dec 13, 2018

e2e/systemd: test with enforcing selinux
Run the e2e/systemd_test with SElinux in enforcing mode.
It'll just enable the mode during the test, and restore previous mode at
the end of the test.
Also, the test will be skipped if SElinux isn't enabled on the host

e2e/systemd: move userns skip to BeforeEach
Moving the skip that check if userns is enabled to the BeforeEach
will help to skip the test quicker if not needed and also allow to add
more tests without adding the check everytime.

@EmilienM EmilienM changed the title Pull request for skip/pre e2e/systemd: test with enforcing selinux Dec 13, 2018
@mheon
Copy link
Member

mheon commented Dec 13, 2018

F28 looks in infra issues
/approve

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 13, 2018
@mheon mheon changed the title e2e/systemd: test with enforcing selinux [WIP] e2e/systemd: test with enforcing selinux Dec 13, 2018
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 13, 2018
@mheon
Copy link
Member

mheon commented Dec 13, 2018

We're waiting on containers/container-selinux#59 to merge before this is ready - WIP will come off once that's good

Copy link
Member

@TomSweeneyRedHat TomSweeneyRedHat left a comment

Choose a reason for hiding this comment

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

Changes LGTM, but the tests are not at all happy.

@rh-atomic-bot
Copy link
Collaborator

☔ The latest upstream changes (presumably #2481) made this pull request unmergeable. Please resolve the merge conflicts.

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 3, 2019
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: EmilienM, mheon

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 4, 2019
@rh-atomic-bot
Copy link
Collaborator

☔ The latest upstream changes (presumably #2704) made this pull request unmergeable. Please resolve the merge conflicts.

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 2, 2019
@giuseppe
Copy link
Member

what is the status of this PR? @EmilienM are you still working on it?

@EmilienM
Copy link
Contributor Author

what is the status of this PR? @EmilienM are you still working on it?

no I have not been catching up on that one, mostly doing it on my free time. I still see some value having it, please give me a bit of time.

@rhatdan
Copy link
Member

rhatdan commented Jun 8, 2019

@EmilienM Is this still something you want/need or has it been fixed in the testing?

@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 10, 2019
@EmilienM
Copy link
Contributor Author

@EmilienM Is this still something you want/need or has it been fixed in the testing?

Just rebased. I'll look at the tests this week if they fail and if I have the time otherwise close it.

@EmilienM EmilienM changed the title [WIP] e2e/systemd: test with enforcing selinux e2e/systemd: test with enforcing selinux Jun 10, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 10, 2019
@EmilienM
Copy link
Contributor Author

@rhatdan ready for review it seems

@rhatdan
Copy link
Member

rhatdan commented Jun 12, 2019

LGTM

@rhatdan
Copy link
Member

rhatdan commented Jun 19, 2019

@EmilienM Not sure what happened here, could you rebase and repush so we can get the CI/CD system running again.

}

mode := selinux.DefaultEnforceMode()
selinux.SetEnforceMode(1)
Copy link
Member

Choose a reason for hiding this comment

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

could you change it to something like:

mode := selinux.EnforceMode()
if mode != selinux.Enforcing {
    err := selinux.SetEnforceMode(selinux.Enforcing)
    Expect(err).To(BeNil())
    defer selinux.SetEnforceMode(mode)
}

then you can also drop the selinux.SetEnforceMode(mode) at line 92

@rhatdan
Copy link
Member

rhatdan commented Aug 5, 2019

@EmilienM Can you make the change requested by @giuseppe ?

Signed-off-by: Matthew Heon <mheon@redhat.com>
fzoske and others added 17 commits August 5, 2019 14:20
Signed-off-by: Fabian Zoske <git@fzoske.de>
capabilities that were added and dropped were several times duplicated. Fix this

Signed-off-by: Peter Hunt <pehunt@redhat.com>
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Take capabilities written in a kube and add to a container
adapt test suite and write cap-add/drop tests

Signed-off-by: Peter Hunt <pehunt@redhat.com>
close https://bugzilla.redhat.com/show_bug.cgi?id=1732280
From the bug Podman search returns 25 results even when limit option `--limit` is larger than 25(maxQueries). They want Podman to return `--limit` results.

This PR fixes the number of output result.
if --limit not set, return MIN(maxQueries, len(res))
if --limit is set, return MIN(option, len(res))

Signed-off-by: Qi Wang <qiwan@redhat.com>
Fedora CI tests are failing on rawhide under kernel
5.3.0-0.rc1.git3.1.fc31 (rhbz#1736758). But there's
another insidious failure, a 4-hour hang in the
rootless tests on the same CI system. The culprit
line is in the podman build test, but it's actually
BATS itself that hangs, not the build command -- which
suggests that it's the usual FD 3 problem (see BATS README).
It would seem that podman is forking a process that
inherits fd 3 but that process is not getting cleaned
up when podman crashes upon encountering the kernel bug.

Today it's podman build, tomorrow it might be something
else. Let's just run all podman invocations in run_podman
with a non-bats FD 3.

Signed-off-by: Ed Santiago <santiago@redhat.com>
If a container is restored multiple times from an exported checkpoint
with the help of '--import --name', the restore will fail if during
'podman run' a static container IP was set with '--ip'. The user can
tell the restore process to ignore the static IP with
'--ignore-static-ip'.

Signed-off-by: Adrian Reber <areber@redhat.com>
Enable podman events to format the output as jsonline

Signed-off-by: Qi Wang <qiwan@redhat.com>
Add warnings/work arounds about NFS and OverlayFS to the troubleshooting guide
and also the main podman page.  Verified that these warnings are on the rootless
page already.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
There are two cases logdriver can be empty, if it wasn't set by libpod, or if the user did --log-driver ""
The latter case is an odd one, and the former is very possible and already handled for LogPath.
Instead of printing an error for an entirely reasonable codepath, let's supress the error

Signed-off-by: Peter Hunt <pehunt@redhat.com>
to help with future debugging, we now display the type of event logger
being used inside podman info -> host.

Signed-off-by: baude <bbaude@redhat.com>
when using build, require a "more" connection to get logs.

when pulling a non-existent image, do not crash varlink connection.

Fixes: #3714
Fixes: #3715

Signed-off-by: baude <bbaude@redhat.com>
Drop errors to debug when trying to setup the runtimetmpdir.  If the tool
can not setup a runtime dir, it will error out with a correct message
no need to put errors on the screen, when the tool actually succeeds.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
if the image is unnamed, pass an nil slice to the parse repotags function instead of getting the image name by index.

after this patch, unnamed images will be shown as <none>

```
Images space usage:

REPOSITORY                    TAG      IMAGE ID       CREATED        SIZE     SHARED SIZE   UNIQUE SIZE   CONTAINERS
docker.io/library/ubuntu      bionic   3556258649b2   11 days ago    66.6MB   0B            66.6MB        0
<none>                        <none>   dd8a8db2c79b   11 days ago    986MB    66.6MB        919MB         0

```

Signed-off-by: Qi Wang <qiwan@redhat.com>
we should be looking for the libpod.conf file in /usr/share/containers
and not in /usr/local.  packages of podman should drop the default
libpod.conf in /usr/share.  the override remains /etc/containers/ as
well.

Fixes: #3702

Signed-off-by: baude <bbaude@redhat.com>
Old versions of conmon have a bug where they create the exit file before
closing open file descriptors causing a race condition when restarting
containers with open ports since we cannot bind the ports as they're not
yet closed by conmon.

Killing the old conmon PID is ~okay since it forces the FDs of old
conmons to be closed, while it's a NOP for newer versions which should
have exited already.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
A container restored from an exported checkpoint did not have its
StartedTime set. Which resulted in a status like 'Up 292 years ago'
after the restore.

This just sets the StartedTime to time.Now() if a container is restored
from an exported checkpoint.

Signed-off-by: Adrian Reber <areber@redhat.com>
@openshift-ci-robot openshift-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/S labels Aug 5, 2019
@EmilienM
Copy link
Contributor Author

EmilienM commented Aug 5, 2019

I broke the PR by accident, let me fix that

Run the e2e/systemd_test with SElinux in enforcing mode.
It'll just enable the mode during the test, and restore previous mode at
the end of the test.

Also, the test will be skipped if SElinux isn't enabled on the host.

Signed-off-by: Emilien Macchi <emilien@redhat.com>
@openshift-ci-robot openshift-ci-robot added size/S and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Aug 5, 2019
@EmilienM EmilienM closed this Aug 5, 2019
@EmilienM
Copy link
Contributor Author

EmilienM commented Aug 5, 2019

I'm going to create a new PR

@EmilienM EmilienM deleted the skip/pre branch August 5, 2019 18:38
@EmilienM
Copy link
Contributor Author

EmilienM commented Aug 5, 2019

#3727

@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 26, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 26, 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. 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.