Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

integration: update cpuset tests #2846

Merged
merged 2 commits into from
Sep 11, 2020

Conversation

egernst
Copy link
Member

@egernst egernst commented Sep 10, 2020

Remove cpuset test

This test will fail until we have appropriate CPUSet support inside the
guest. Today CPUSets are only supported on the host, and are done by
placing the entire guest into a CPUset that matches the sum of container
cpusets. This isn't reflected via nproc in the guest.

@egernst
Copy link
Member Author

egernst commented Sep 10, 2020

/test

egernst added a commit to egernst/runtime that referenced this pull request Sep 10, 2020
Kata doesn't map any numa topologies in the guest. Let's make sure we
clear the Cpuset fields before passing container updates to the
guest. Without this, we could encounter a runtime failure:

```
process_linux.go:297: applying cgroup configuration for process caused
"failed to write 0,1 to cpuset.mems: writea 0,1 to cpuset.mems: write
0,1 to cpuset.mems: write /sys/fs/cgroup/cpuset .... /cpuset.mems:
numerical result out of range"": unknown
```

Note, in the future we may want to have a vCPU to guest CPU mapping and
still include the cpuset.Cpus. Until we have this support, clear this as
well.

Fixes: kata-containers#2176
Depends-on: github.com/kata-containers/tests#2846

Signed-off-by: Eric Ernst <[email protected]>
The minimum number of CPUs were wrong.

sum of cpus in set 0,2 is 2, not 3.
sum of cpus in set 0,3 is 2, not 3.

Fixes: kata-containers#2845

Signed-off-by: Eric Ernst <[email protected]>
@egernst egernst changed the title Cpuset updates integration: update cpuset tests Sep 10, 2020
@egernst
Copy link
Member Author

egernst commented Sep 10, 2020

/test

@egernst egernst requested a review from devimc September 10, 2020 23:14
@egernst
Copy link
Member Author

egernst commented Sep 11, 2020

/test

This test will fail until we have appropriate CPUSet support inside the
guest. Today CPUSets are only supported on the host, and are done by
placing the entire guest into a CPUset that matches the sum of container
cpusets. This isn't reflected via nproc in the guest.

- Remove test that checked nproc
- Update cpu test to check host cpuset cgroup

Fixes: kata-containers#2845

Signed-off-by: Eric Ernst <[email protected]>
@jodh-intel
Copy link
Contributor

/test

@jodh-intel
Copy link
Contributor

@egernst - thanks. Does this also need raising in the 2.0-dev branch of this repo?

@egernst
Copy link
Member Author

egernst commented Sep 11, 2020

Yes, @jodh-intel

Copy link
Member

@fidencio fidencio left a comment

Choose a reason for hiding this comment

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

lgtm!

I'd like to have @devimc's input before getting this one merged.

Copy link

@devimc devimc left a comment

Choose a reason for hiding this comment

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

thanks @egernst

@fidencio
Copy link
Member

@egernst, my understanding is that we will also need this one backported to the stable-1.11 branch.
Please, if that's not the case just remove the added label.

@fidencio fidencio added backport Change from a newer branch / repository needs-backport Changes need to be applied to an older branch / repository and removed backport Change from a newer branch / repository labels Sep 11, 2020
fidencio pushed a commit to fidencio/kata-runtime that referenced this pull request Sep 11, 2020
Kata doesn't map any numa topologies in the guest. Let's make sure we
clear the Cpuset fields before passing container updates to the
guest. Without this, we could encounter a runtime failure:

```
process_linux.go:297: applying cgroup configuration for process caused
"failed to write 0,1 to cpuset.mems: writea 0,1 to cpuset.mems: write
0,1 to cpuset.mems: write /sys/fs/cgroup/cpuset .... /cpuset.mems:
numerical result out of range"": unknown
```

Note, in the future we may want to have a vCPU to guest CPU mapping and
still include the cpuset.Cpus. Until we have this support, clear this as
well.

Fixes: kata-containers#2176
Depends-on: github.com/kata-containers/tests#2846

Signed-off-by: Eric Ernst <[email protected]>
@egernst egernst merged commit 06f7090 into kata-containers:master Sep 11, 2020
chavafg pushed a commit to chavafg/runtime-1 that referenced this pull request Oct 16, 2020
Kata doesn't map any numa topologies in the guest. Let's make sure we
clear the Cpuset fields before passing container updates to the
guest. Without this, we could encounter a runtime failure:

```
process_linux.go:297: applying cgroup configuration for process caused
"failed to write 0,1 to cpuset.mems: writea 0,1 to cpuset.mems: write
0,1 to cpuset.mems: write /sys/fs/cgroup/cpuset .... /cpuset.mems:
numerical result out of range"": unknown
```

Note, in the future we may want to have a vCPU to guest CPU mapping and
still include the cpuset.Cpus. Until we have this support, clear this as
well.

Fixes: kata-containers#2176
Depends-on: github.com/kata-containers/tests#2846

Signed-off-by: Eric Ernst <[email protected]>
(cherry picked from commit b5b8870)
jcvenegas pushed a commit to jcvenegas/runtime that referenced this pull request Oct 19, 2020
Kata doesn't map any numa topologies in the guest. Let's make sure we
clear the Cpuset fields before passing container updates to the
guest. Without this, we could encounter a runtime failure:

```
process_linux.go:297: applying cgroup configuration for process caused
"failed to write 0,1 to cpuset.mems: writea 0,1 to cpuset.mems: write
0,1 to cpuset.mems: write /sys/fs/cgroup/cpuset .... /cpuset.mems:
numerical result out of range"": unknown
```

Note, in the future we may want to have a vCPU to guest CPU mapping and
still include the cpuset.Cpus. Until we have this support, clear this as
well.

Fixes: kata-containers#2176
Depends-on: github.com/kata-containers/tests#2846

Signed-off-by: Eric Ernst <[email protected]>
jcvenegas pushed a commit to jcvenegas/runtime that referenced this pull request Oct 19, 2020
Kata doesn't map any numa topologies in the guest. Let's make sure we
clear the Cpuset fields before passing container updates to the
guest. Without this, we could encounter a runtime failure:

```
process_linux.go:297: applying cgroup configuration for process caused
"failed to write 0,1 to cpuset.mems: writea 0,1 to cpuset.mems: write
0,1 to cpuset.mems: write /sys/fs/cgroup/cpuset .... /cpuset.mems:
numerical result out of range"": unknown
```

Note, in the future we may want to have a vCPU to guest CPU mapping and
still include the cpuset.Cpus. Until we have this support, clear this as
well.

Fixes: kata-containers#2176
Depends-on: github.com/kata-containers/tests#2846

Signed-off-by: Eric Ernst <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-backport Changes need to be applied to an older branch / repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants