From f74df5d637b78bcf3d0d7f5096e3eb66a62bf77c Mon Sep 17 00:00:00 2001 From: Jan Pazdziora Date: Wed, 1 Sep 2021 08:38:55 +0200 Subject: [PATCH] The /var/lib/rancher/k3s/storage now has permissions 0701 which prevent globbing, list the exact volume directory. --- tests/run-master-in-k3s.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/run-master-in-k3s.sh b/tests/run-master-in-k3s.sh index f678967d..fe53d0cb 100755 --- a/tests/run-master-in-k3s.sh +++ b/tests/run-master-in-k3s.sh @@ -21,7 +21,8 @@ kubectl logs -f pod/freeipa-server & trap "kill $! 2> /dev/null || : ; trap - EXIT" EXIT ( set +x ; while true ; do if kubectl get pod/freeipa-server | grep -q '\b1/1\b' ; then kill $! ; break ; else sleep 5 ; fi ; done ) kubectl describe pod/freeipa-server -ls -la /var/lib/rancher/k3s/storage/pvc-* +PV_DIR=$( kubectl get pvc/freeipa-data-pvc -o 'jsonpath={.spec.volumeName}_{.metadata.namespace}_{.metadata.name}' ) +ls -la /var/lib/rancher/k3s/storage/$PV_DIR IPA_SERVER_HOSTNAME=$( kubectl get -o=jsonpath='{.spec.containers[0].env[?(@.name=="IPA_SERVER_HOSTNAME")].value}' pod freeipa-server ) # echo $( kubectl get -o=jsonpath='{.spec.clusterIP}' service freeipa-server-service ) $IPA_SERVER_HOSTNAME >> /etc/hosts if ! test -f /etc/resolv.conf.backup ; then