Skip to content

Commit

Permalink
Merge pull request #19259 from harche/new_ign
Browse files Browse the repository at this point in the history
Add secondary runtime handler and cgroup v2 config to CRIO tests
  • Loading branch information
k8s-ci-robot authored Sep 23, 2020
2 parents b660a52 + cf9d6c3 commit a419897
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 26 deletions.
51 changes: 46 additions & 5 deletions config/jobs/kubernetes/sig-node/sig-node-presubmit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -255,18 +255,20 @@ presubmits:
env:
- name: GOPATH
value: /go
- name: pull-kubernetes-node-crio1-18-e2e
- name: pull-kubernetes-node-crio-cgrpv2-e2e
skip_branches:
- release-\d+\.\d+ # per-release image
annotations:
testgrid-dashboards: sig-node-cri-o
testgrid-tab-name: pr-crio-1-18-gce-e2e
testgrid-tab-name: pr-crio-cgrpv2-gce-e2e
always_run: false
optional: true
max_concurrency: 12
labels:
preset-service-account: "true"
preset-k8s-ssh: "true"
preset-pull-kubernetes-e2e: "true"
preset-pull-kubernetes-e2e-gce: "true"
spec:
containers:
- image: gcr.io/k8s-testimages/kubekins-e2e:v20200918-58bdf8d-master
Expand All @@ -283,12 +285,51 @@ presubmits:
- --env=KUBE_SSH_USER=core
- --gcp-project=k8s-jkns-pr-node-e2e
- --gcp-zone=us-west1-b
- '--node-test-args=--container-runtime=remote --container-runtime-endpoint=unix:///run/crio/crio.sock --container-runtime-process-name=/usr/local/sbin/crio-v1.18.3/bin/crio-static --container-runtime-pid-file= --kubelet-flags="--cgroups-per-qos=true --cgroup-root=/" --extra-log="{\"name\": \"crio.log\", \"journalctl\": [\"-u\", \"crio\"]}"'
- '--node-test-args=--container-runtime=remote --container-runtime-endpoint=unix:///run/crio/crio.sock --container-runtime-process-name=/usr/local/bin/crio --container-runtime-pid-file= --kubelet-flags="--cgroups-per-qos=true --cgroup-root=/" --extra-log="{\"name\": \"crio.log\", \"journalctl\": [\"-u\", \"crio\"]}"'
- --node-tests=true
- --provider=gce
- --test_args=--nodes=8 --focus="\[NodeConformance\]" --skip="\[Flaky\]|\[Slow\]|\[Serial\]"
- --test_args=--nodes=8 --focus="\[NodeConformance\]|\[NodeFeature:.+\]" --skip="\[Flaky\]|\[Slow\]|\[Serial\]"
- --timeout=180m
- --node-args=--image-config-file=/workspace/test-infra/jobs/e2e_node/crio/latest/image-config-cgrpv2.yaml
resources:
requests:
memory: "6Gi"
- name: pull-kubernetes-node-crio-e2e
skip_branches:
- release-\d+\.\d+ # per-release image
annotations:
testgrid-dashboards: sig-node-cri-o
testgrid-tab-name: pr-crio-gce-e2e
always_run: false
optional: true
max_concurrency: 12
labels:
preset-service-account: "true"
preset-k8s-ssh: "true"
preset-pull-kubernetes-e2e: "true"
preset-pull-kubernetes-e2e-gce: "true"
spec:
containers:
- image: gcr.io/k8s-testimages/kubekins-e2e:v20200918-58bdf8d-master
args:
- --root=/go/src
- "--job=$(JOB_NAME)"
- "--repo=k8s.io/$(REPO_NAME)=$(PULL_REFS)"
- "--service-account=/etc/service-account/service-account.json"
- "--upload=gs://kubernetes-jenkins/pr-logs"
- "--timeout=240"
- --scenario=kubernetes_e2e
- -- # end bootstrap args, scenario args below
- --deployment=node
- --env=KUBE_SSH_USER=core
- --gcp-project=k8s-jkns-pr-node-e2e
- --gcp-zone=us-west1-b
- '--node-test-args=--container-runtime=remote --container-runtime-endpoint=unix:///run/crio/crio.sock --container-runtime-process-name=/usr/local/bin/crio --container-runtime-pid-file= --kubelet-flags="--cgroups-per-qos=true --cgroup-root=/" --extra-log="{\"name\": \"crio.log\", \"journalctl\": [\"-u\", \"crio\"]}"'
- --node-tests=true
- --provider=gce
- --test_args=--nodes=8 --focus="\[NodeConformance\]|\[NodeFeature:.+\]" --skip="\[Flaky\]|\[Slow\]|\[Serial\]"
- --timeout=180m
- --node-args=--image-config-file=/workspace/test-infra/jobs/e2e_node/crio/1.18/image-config.yaml
- --node-args=--image-config-file=/workspace/test-infra/jobs/e2e_node/crio/latest/image-config-cgrpv1.yaml
resources:
requests:
memory: "6Gi"
16 changes: 10 additions & 6 deletions jobs/e2e_node/crio/crio.ign
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{
"ignition": { "version": "3.0.0" },
"ignition": {
"version": "3.1.0"
},
"systemd": {
"units": [{
"name": "crio.service",
"enabled": true,
"contents": "[Unit]\nDescription=Download and install crio binaries and configurations.\nAfter=network-online.target\n\n[Service]\nType=oneshot\nExecStartPre=/usr/bin/curl --fail --retry 5 --retry-delay 3 --silent --show-error -o /usr/local/sbin/crio-config.sh https://raw.githubusercontent.com/harche/crio-fcos-config/master/test.sh\nExecStartPre=/bin/chmod 544 /usr/local/sbin/crio-config.sh\nExecStart=/usr/local/sbin/crio-config.sh\n\n[Install]\nWantedBy=multi-user.target\n"
}]
"units": [
{
"contents": "[Unit]\nDescription=Download and install crio binaries and configurations.\nAfter=network-online.target\n\n[Service]\nType=oneshot\nExecStartPre=/usr/bin/bash -c '/usr/bin/curl --fail --retry 5 --retry-delay 3 --silent --show-error -o /usr/local/crio.tar.gz https://storage.googleapis.com/k8s-conform-cri-o/artifacts/crio-$(git ls-remote https://github.com/cri-o/cri-o master | cut -c1-9).tar.gz -o crio.tar.gz'\nExecStartPre=/usr/bin/tar -zxvf /usr/local/crio.tar.gz -C /usr/local/\nExecStartPre=/usr/bin/bash -c '/usr/bin/mv -f /usr/local/crio-* /usr/local/crio-latest'\nExecStartPre=/usr/bin/bash -c '/usr/bin/mv -f /usr/local/crio-latest/bin/* /usr/local/bin/'\nExecStartPre=/usr/bin/mkdir -p /opt/cni/bin\nExecStartPre=/usr/bin/bash -c '/usr/bin/mv -f /usr/local/crio-latest/cni-plugins/* /opt/cni/bin/'\nExecStartPre=/usr/bin/mv -f /usr/local/crio-latest/contrib/10-crio-bridge.conf /etc/cni/net.d/.\nExecStartPre=/usr/bin/bash -c '/usr/bin/mv -f /usr/local/crio-latest/etc/* /etc/'\nExecStartPre=/usr/bin/mkdir -p /etc/crio/crio.conf.d\nExecStartPre=/usr/bin/bash -c 'echo -e \"[crio.runtime]\\n [crio.runtime.runtimes]\\n [crio.runtime.runtimes.preconfigured-handler]\\n runtime_path=\\\\\\\"/usr/local/bin/crun\\\\\\\"\" \u003e /etc/crio/crio.conf.d/10-crun.conf'\nExecStartPre=/usr/bin/mv -f /usr/local/crio-latest/contrib/crio.service /etc/systemd/system/ \nExecStartPre=/usr/bin/systemctl enable crio.service\nExecStartPre=/usr/sbin/restorecon /etc/systemd/system/crio.service\nExecStart=/usr/bin/systemctl start crio.service\n\n[Install]\nWantedBy=multi-user.target\n",
"enabled": true,
"name": "crio-install.service"
}
]
}
}
19 changes: 19 additions & 0 deletions jobs/e2e_node/crio/crio_cgrpv2.ign
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"ignition": {
"version": "3.1.0"
},
"systemd": {
"units": [
{
"contents": "[Unit]\nDescription=Enable cgroup v2\nBefore=network-online.target\nConditionFirstBoot=yes\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/rpm-ostree kargs --append systemd.unified_cgroup_hierarchy=1 --reboot\n[Install]\n\nWantedBy=multi-user.target\n",
"enabled": true,
"name": "cgroupv2.service"
},
{
"contents": "[Unit]\nDescription=Download and install crio binaries and configurations.\nAfter=network-online.target\n\n[Service]\nType=oneshot\nExecStartPre=/usr/bin/bash -c '/usr/bin/curl --fail --retry 5 --retry-delay 3 --silent --show-error -o /usr/local/crio.tar.gz https://storage.googleapis.com/k8s-conform-cri-o/artifacts/crio-$(git ls-remote https://github.com/cri-o/cri-o master | cut -c1-9).tar.gz -o crio.tar.gz'\nExecStartPre=/usr/bin/tar -zxvf /usr/local/crio.tar.gz -C /usr/local/\nExecStartPre=/usr/bin/bash -c '/usr/bin/mv -f /usr/local/crio-* /usr/local/crio-latest'\nExecStartPre=/usr/bin/bash -c '/usr/bin/mv -f /usr/local/crio-latest/bin/* /usr/local/bin/'\nExecStartPre=/usr/bin/mkdir -p /opt/cni/bin\nExecStartPre=/usr/bin/bash -c '/usr/bin/mv -f /usr/local/crio-latest/cni-plugins/* /opt/cni/bin/'\nExecStartPre=/usr/bin/mv -f /usr/local/crio-latest/contrib/10-crio-bridge.conf /etc/cni/net.d/.\nExecStartPre=/usr/bin/bash -c '/usr/bin/mv -f /usr/local/crio-latest/etc/* /etc/'\nExecStartPre=/usr/bin/mkdir -p /etc/crio/crio.conf.d\nExecStartPre=/usr/bin/bash -c 'echo -e \"[crio.runtime]\\n default_runtime = \\\\\\\"crun\\\\\\\"\\n[crio.runtime.runtimes]\\n [crio.runtime.runtimes.crun]\\n runtime_path=\\\\\\\"/usr/local/bin/crun\\\\\\\"\" \u003e /etc/crio/crio.conf.d/20-crun.conf'\nExecStartPre=/usr/bin/bash -c 'echo -e \"[crio.runtime]\\n [crio.runtime.runtimes]\\n [crio.runtime.runtimes.preconfigured-handler]\\n runtime_path=\\\\\\\"/usr/local/bin/runc\\\\\\\"\" \u003e /etc/crio/crio.conf.d/10-crun.conf'\nExecStartPre=/usr/bin/mv -f /usr/local/crio-latest/contrib/crio.service /etc/systemd/system/ \nExecStartPre=/usr/bin/systemctl enable crio.service\nExecStartPre=/usr/sbin/restorecon /etc/systemd/system/crio.service\nExecStart=/usr/bin/systemctl start crio.service\n\n[Install]\nWantedBy=multi-user.target\n",
"enabled": true,
"name": "crio-install.service"
}
]
}
}
15 changes: 0 additions & 15 deletions jobs/e2e_node/crio/fcos_cgroupv2.ign

This file was deleted.

File renamed without changes.
5 changes: 5 additions & 0 deletions jobs/e2e_node/crio/latest/image-config-cgrpv2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
images:
fedora:
image_family: fedora-coreos-stable
project: fedora-coreos-cloud
metadata: "user-data</workspace/test-infra/jobs/e2e_node/crio/crio_cgrpv2.ign"

0 comments on commit a419897

Please sign in to comment.