From 2dd576e6cbffbcb40878136e109acd0d2283e6e5 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Sun, 30 Nov 2025 18:31:36 -0500 Subject: [PATCH] fix mounter issue Signed-off-by: Davanum Srinivas --- cluster/gce/gci/mounter/mounter.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cluster/gce/gci/mounter/mounter.go b/cluster/gce/gci/mounter/mounter.go index 88dc459ea81..7827556c405 100644 --- a/cluster/gce/gci/mounter/mounter.go +++ b/cluster/gce/gci/mounter/mounter.go @@ -28,6 +28,7 @@ const ( // Location of the mount file to use chrootCmd = "chroot" mountCmd = "mount" + mountBin = "/bin/mount" rootfs = "rootfs" nfsRPCBindErrMsg = "mount.nfs: rpc.statd is not running but is required for remote locking.\nmount.nfs: Either use '-o nolock' to keep locks local, or start statd.\nmount.nfs: an incorrect mount option was specified\n" rpcBindCmd = "/sbin/rpcbind" @@ -60,12 +61,12 @@ func main() { } } -// MountInChroot is to run mount within chroot with the passing root directory +// mountInChroot runs mount within chroot with the passing root directory func mountInChroot(rootfsPath string, args []string) error { if _, err := os.Stat(rootfsPath); os.IsNotExist(err) { return fmt.Errorf("path <%s> does not exist", rootfsPath) } - args = append([]string{rootfsPath, mountCmd}, args...) + args = append([]string{rootfsPath, mountBin}, args...) output, err := exec.Command(chrootCmd, args...).CombinedOutput() if err == nil { return nil