Skip to content

Commit

Permalink
fix: enable crio configurable on testing nodes
Browse files Browse the repository at this point in the history
our e2e are not working due to permission issue in crio.
cri-o/cri-o#7192 should revert the change.
Until that revert PR is released and available in ci envs, we have to
set special configuration on crio on all nodes
Signed-off-by: Karel Simon <ksimon@redhat.com>
  • Loading branch information
ksimon1 committed Aug 10, 2023
1 parent fc9e0d3 commit 91d3a4e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions automation/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,21 @@ EOF
oc wait --for=condition=Updated --timeout=900s machineconfigpool worker
fi

DEBUG_NS=debug-ns
oc create ns ${DEBUG_NS}
oc label ns ${DEBUG_NS} security.openshift.io/scc.podSecurityLabelSync=false --overwrite
oc label ns ${DEBUG_NS} pod-security.kubernetes.io/enforce=privileged --overwrite

NODES=$(oc get nodes -o json | jq -r .items[].metadata.name)

while IFS= read -r node
do
echo "setting device_ownership_from_security_context for ${node}.."
oc debug node/${node} --to-namespace ${DEBUG_NS} -- chroot /host sed -i '/^\[crio\.runtime\]/a device_ownership_from_security_context = true' /etc/crio/crio.conf
echo "restarting crio service on ${node}"
oc debug node/${node} --to-namespace ${DEBUG_NS} -- chroot /host systemctl restart crio
done <<< "${NODES}"

namespace="kubevirt"

_curl() {
Expand Down

0 comments on commit 91d3a4e

Please sign in to comment.