Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Add SELinux Support for CRI #1487

Merged
merged 2 commits into from
May 26, 2020
Merged

Conversation

crosbymichael
Copy link
Member

This is a carry of #1246.

We are splitting up the work and I will be carrying this PR to merge.

@crosbymichael
Copy link
Member Author

I went ahead and squashed this as it had many WIP commits and unsigned commits from the previous PR causing CI to fail.

hack/utils.sh Outdated Show resolved Hide resolved
@mikebrow
Copy link
Member

/test pull-cri-containerd-node-e2e

@mikebrow
Copy link
Member

e2e bucket timed out for no obvious reason restarting

@crosbymichael
Copy link
Member Author

I'm not getting good info on why this is timing out....

Carry of containerd#1246

Signed-off-by: Darren Shepherd <darren@rancher.com>
Signed-off-by: Michael Crosby <michael@thepasture.io>
@crosbymichael
Copy link
Member Author

/test pull-cri-containerd-node-e2e

it looks like a normal timeout now for a single test, going to rerun

@crosbymichael
Copy link
Member Author

victory!

@crosbymichael
Copy link
Member Author

Tested labeling for volumes:

system_u:system_r:container_t:s0:c192,c450 root 9226 0.0  0.1 10636 5168 ?       Ss   11:57   0:00 nginx: master process nginx -g daemon off;
system_u:system_r:container_t:s0:c192,c450 101 9240 0.0  0.0 11100 2552 ?        S    11:57   0:00 nginx: worker process

process ^^

drwxr-xr-x. 2 root root unconfined_u:object_r:mnt_t:s0                  6 May 26 11:57 mnt
drwxr-xr-x. 2 root root system_u:object_r:container_file_t:s0:c192,c450 6 May 26 11:57 test

mount ^^

@crosbymichael
Copy link
Member Author

I think we could merge this and then follow up on adding reference counting to the pod level and off of the container.

Copy link
Member

@mxpv mxpv left a comment

Choose a reason for hiding this comment

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

LGTM

pkg/server/sandbox_run.go Outdated Show resolved Hide resolved
This moves most of the API calls off of the `labels` package onto the root
selinux package.  This is the newer API for most selinux operations.

Signed-off-by: Michael Crosby <michael@thepasture.io>
@crosbymichael
Copy link
Member Author

Updated, please take another look

Copy link
Member

@dmcgowan dmcgowan left a comment

Choose a reason for hiding this comment

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

LGTM

c := &criService{
config: config,
client: client,
os: osinterface.RealOS{},
sandboxStore: sandboxstore.NewStore(),
containerStore: containerstore.NewStore(),
sandboxStore: sandboxstore.NewStore(labels),
Copy link
Member

Choose a reason for hiding this comment

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

We should try to decouple this a little bit, maybe having the label store could be registered through the plugin system in the future.

Copy link
Member

Choose a reason for hiding this comment

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

In a follow up or maybe post merge back into containerd

@dmcgowan dmcgowan merged commit 129bdd7 into containerd:master May 26, 2020
@crosbymichael
Copy link
Member Author

crosbymichael commented May 26, 2020 via email

Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

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

LGTM
thanks for taking this on

@estesp estesp mentioned this pull request Jul 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants