Skip to content

Commit

Permalink
update mount to check mountinfo (fluid-cloudnative#2739)
Browse files Browse the repository at this point in the history
Signed-off-by: zwwhdls <zww@hdls.me>
  • Loading branch information
zwwhdls authored Mar 14, 2023
1 parent 5e226eb commit eccf878
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion csi/shell/check_bind_mounts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ VolumeName="$1"

MountPattern="pods/.*/volumes/kubernetes\.io~csi/$VolumeName/mount"

mount | grep $MountPattern
cat /proc/self/mountinfo | grep $MountPattern
2 changes: 1 addition & 1 deletion csi/shell/check_mount.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SubPath="$3"

count=0
# while ! mount | grep alluxio | grep $ConditionPathIsMountPoint | grep -v grep
while ! mount | grep $ConditionPathIsMountPoint | grep $MountType
while ! cat /proc/self/mountinfo | grep $ConditionPathIsMountPoint | grep $MountType
do
sleep 3
count=`expr $count + 1`
Expand Down
2 changes: 1 addition & 1 deletion pkg/scripts/poststart/check_fuse.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ SubPath="$3"
count=0
# while ! mount | grep alluxio | grep $ConditionPathIsMountPoint | grep -v grep
while ! mount | grep $ConditionPathIsMountPoint | grep $MountType
while ! cat /proc/self/mountinfo | grep $ConditionPathIsMountPoint | grep $MountType
do
sleep 3
count=¬expr $count + 1¬
Expand Down
3 changes: 2 additions & 1 deletion pkg/scripts/poststart/check_fuse_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package poststart

import (
"fmt"

corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
utilpointer "k8s.io/utils/pointer"
Expand Down Expand Up @@ -53,7 +54,7 @@ for idx in "${!mountPaths[@]}"; do
mp=${mountPaths[$idx]}
mt=${mountTypes[$idx]}
count=0
while ! mount | grep $mp | grep $mt
while ! cat /proc/self/mountinfo | grep $mp | grep $mt
do
sleep 3
count=¬expr $count + 1¬
Expand Down

0 comments on commit eccf878

Please sign in to comment.