kubernetes/test/e2e_node
Kubernetes Submit Queue 84408378f9
Merge pull request #58174 from filbranden/ipcs1
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fixes for HostIPC tests to work when Docker has SELinux support enabled.

**What this PR does / why we need it**:

Fixes for HostIPC tests to work when Docker has SELinux support enabled.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:

N/A

**Special notes for your reviewer**:

The core of the matter is to use `ipcs` from util-linux rather than the one from busybox. The typical SELinux policy has enough to allow Docker containers (running under svirt_lxc_net_t SELinux type) to access IPC information by reading the contents of the files under /proc/sysvipc/, but not by using the shmctl etc. syscalls.

The `ipcs` implementation in busybox will use `shmctl(0, SHM_INFO, ...)` to detect whether it can read IPC info (see source code [here](https://git.busybox.net/busybox/tree/util-linux/ipcs.c?h=1_28_0#n138)), while the one in util-linux will prefer to read from the /proc files directly if they are available (see source code [here](https://github.com/karelzak/util-linux/blob/v2.27.1/sys-utils/ipcutils.c#L108)).

It turns out the SELinux policy doesn't allow the shmctl syscalls in an unprivileged container, while access to it through the /proc interface is fine. (One could argue this is a bug in the SELinux policy, but getting it fixed on stable OSs is hard, and it's not that hard for us to test it with an util-linux `ipcs`, so I propose we do so.)

This PR also contains a refactor of the code setting IpcMode, since setting it in the "common options" function is misleading, as on containers other than the sandbox, it ends up always getting overwritten, so let's only set it to "host" in the Sandbox.

It also has a minor fix for the `ipcmk` call, since support for size suffix was only introduced in recent versions of it.

**Release note**:

```release-note
NONE
```
2018-01-30 17:18:52 -08:00
..
builder cluster: build gci mounter like other go binaries 2017-10-30 13:56:09 -07:00
conformance Revert k8s.gcr.io vanity domain 2017-12-22 14:36:16 -08:00
environment Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
jenkins Removal of KubeletConfigFile feature gate: Step 1 2018-01-24 10:19:15 -08:00
perftype update BUILD files 2017-10-15 18:18:13 -07:00
remote Revert k8s.gcr.io vanity domain 2017-12-22 14:36:16 -08:00
runner Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
services Set generate-kubelet-config-file to true by default. 2018-01-30 00:20:35 +00:00
system Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
apparmor_test.go Port e2e tests for multi architecture 2017-09-01 05:40:52 +05:30
benchmark_util.go use core client with explicit version globally 2017-10-27 15:48:32 +08:00
BUILD Merge pull request #57467 from dashpole/move_eviction_tests 2018-01-29 19:03:32 -08:00
container.go run hack/update-all 2017-06-22 11:31:03 -07:00
container_manager_test.go Remove unnecessary docker specific logic in node e2e test. 2018-01-09 22:59:17 +00:00
cpu_manager_test.go Fix policy conflict in the CPU manager node e2e test. 2018-01-10 09:38:00 -08:00
critical_pod_test.go pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
density_test.go Fix setting qps in density test. 2018-01-29 19:41:31 +00:00
device_plugin.go Rename package deviceplugin => devicemanager. 2018-01-24 22:32:43 -08:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
docker_test.go Use whitelisted test image 2017-11-10 14:16:27 -08:00
docker_util.go Skip log path tests when they are expected to fail. 2018-01-19 10:51:13 -08:00
dockershim_checkpoint_test.go Remove unnecessary docker specific logic in node e2e test. 2018-01-09 22:59:17 +00:00
dynamic_kubelet_config_test.go Make ConfigOK status messages more human readable by including the API path to the object instead of the UID 2018-01-03 16:05:43 -08:00
e2e_node_suite_test.go Fix code implicitly casting clientsets to getters 2017-08-06 15:30:13 +02:00
eviction_test.go remove flaky label from eviction tests 2018-01-16 11:22:17 -08:00
framework.go Add [sig-node] to some unowned e2e_node tests 2017-11-27 11:35:44 -05:00
garbage_collector_test.go Remove unnecessary docker specific logic in node e2e test. 2018-01-09 22:59:17 +00:00
gke_environment_test.go Revert k8s.gcr.io vanity domain 2017-12-22 14:36:16 -08:00
gpu_device_plugin.go Move common functions together 2018-01-10 09:47:05 +08:00
gpus.go use core client with explicit version globally 2017-10-27 15:48:32 +08:00
gubernator.sh cluster: move logging library to hack/ 2018-01-13 16:37:50 -08:00
image_id_test.go Revert k8s.gcr.io vanity domain 2017-12-22 14:36:16 -08:00
image_list.go Add getCRIClient and set default values for CRI related flags 2018-01-09 22:59:17 +00:00
kubelet_test.go Use framework.ConformanceIt for node e2e conformance tests 2017-11-17 17:28:20 +08:00
lifecycle_hook_test.go Use framework.ConformanceIt for node e2e conformance tests 2017-11-17 17:28:20 +08:00
log_path_test.go Skip log path tests when they are expected to fail. 2018-01-19 10:51:13 -08:00
mirror_pod_test.go Use framework.ConformanceIt for node e2e conformance tests 2017-11-17 17:28:20 +08:00
node_container_manager_test.go Merge pull request #55898 from dashpole/fix_flaky_allocatable 2017-11-18 13:13:24 -08:00
node_problem_detector_linux.go Revert k8s.gcr.io vanity domain 2017-12-22 14:36:16 -08:00
OWNERS Add balajismaniam, ConnorDoyle node-e2e approvers 2017-11-22 10:01:14 -08:00
pods_container_manager_test.go e2e-node:the value of bestEffortCgroup is wrong 2017-10-27 17:10:53 +08:00
README.md Update docs/ URLs to point to proper locations 2017-06-05 22:13:54 -07:00
resource_collector.go Benchmark non docker specific 2018-01-16 15:38:35 +08:00
resource_usage_test.go Add [sig-node] to some unowned e2e_node tests 2017-11-27 11:35:44 -05:00
restart_test.go Remove unnecessary docker specific logic in node e2e test. 2018-01-09 22:59:17 +00:00
runtime_conformance_test.go Revert k8s.gcr.io vanity domain 2017-12-22 14:36:16 -08:00
security_context_test.go Merge pull request #58174 from filbranden/ipcs1 2018-01-30 17:18:52 -08:00
simple_mount.go run hack/update-all 2017-06-22 11:31:03 -07:00
summary_test.go Merge pull request #55984 from derekwaynecarr/summary-tests 2017-12-13 23:25:59 -08:00
util.go Merge pull request #54792 from ScorpioCPH/add-stub-device-plugin-for-e2e 2018-01-12 04:05:55 -08:00
volume_manager_test.go Port e2e tests for multi architecture 2017-09-01 05:40:52 +05:30