File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -281,6 +281,20 @@ runcmd:
281
281
- /usr/local/bin/install-or-upgrade-rke2.sh
282
282
- echo 'alias crictl="sudo /var/lib/rancher/rke2/bin/crictl -r unix:///run/k3s/containerd/containerd.sock"' >> /home/${ system_user} /.bashrc
283
283
- echo 'alias ctr="sudo /var/lib/rancher/rke2/bin/ctr --address /run/k3s/containerd/containerd.sock --namespace k8s.io"' >> /home/${ system_user} /.bashrc
284
+ - >
285
+ for MNT in /mnt; do
286
+ RETRIES=0; MAX_RETRIES=30;
287
+ until mountpoint -q "$MNT"; do
288
+ RETRIES=$((RETRIES + 1));
289
+ if [ $RETRIES -ge $MAX_RETRIES ]; then
290
+ echo "ERROR: $MNT not mounted after $MAX_RETRIES retries.";
291
+ exit 1;
292
+ fi;
293
+ echo "$MNT not mounted yet, retrying in 10 seconds...";
294
+ sleep 5;
295
+ done;
296
+ echo "$MNT mounted successfully.";
297
+ done;
284
298
%{ ~ if is_server ~}
285
299
- systemctl restart systemd-modules-load.service # ensure ipvs is loaded
286
300
- echo 'alias kubectl="sudo /var/lib/rancher/rke2/bin/kubectl --kubeconfig /etc/rancher/rke2/rke2.yaml"' >> /home/${ system_user} /.bashrc
You can’t perform that action at this time.
0 commit comments