summaryrefslogtreecommitdiffhomepage
path: root/test/root/root.go
diff options
context:
space:
mode:
authorIan Lewis <ianlewis@google.com>2019-09-05 19:20:24 -0700
committergVisor bot <gvisor-bot@google.com>2019-09-05 19:21:25 -0700
commit0bfffbcb0163cc7ebb0cbf47fa91247d208502be (patch)
tree25d5092dadcf5c86d00667183811a9efd61890de /test/root/root.go
parent7e94f171f4141e91478ef8b5693db36519c2322f (diff)
Ignore the root container when calculating oom_score_adj for the sandbox.
This is done because the root container for CRI is the infrastructure (pause) container and always gets a low oom_score_adj. We do this to ensure that only the oom_score_adj of user containers is used to calculated the sandbox oom_score_adj. Implemented in runsc rather than the containerd shim as it's a bit cleaner to implement here (in the shim it would require overwriting the oomScoreAdj and re-writing out the config.json again). This processing is Kubernetes(CRI) specific but we are currently only supporting CRI for multi-container support anyway. PiperOrigin-RevId: 267507706
Diffstat (limited to 'test/root/root.go')
-rw-r--r--test/root/root.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/root/root.go b/test/root/root.go
index 349c752cc..0f1d29faf 100644
--- a/test/root/root.go
+++ b/test/root/root.go
@@ -12,5 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Package root is empty. See chroot_test.go for description.
+// Package root is used for tests that requires sysadmin privileges run. First,
+// follow the setup instruction in runsc/test/README.md. You should also have
+// docker, containerd, and crictl installed. To run these tests from the
+// project root directory:
+//
+// ./scripts/root_tests.sh
package root