@@ -78,9 +78,6 @@ func (d *Driver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolu
78
78
attrib := req .GetVolumeContext ()
79
79
mountFlags := req .GetVolumeCapability ().GetMount ().GetMountFlags ()
80
80
81
- klog .V (2 ).Infof ("target %v\n fstype %v\n \n readonly %v\n volumeId %v\n context %v\n mountflags %v\n " ,
82
- targetPath , fsType , readOnly , volumeID , attrib , mountFlags )
83
-
84
81
var accountName , accountKey , containerName string
85
82
86
83
secrets := req .GetSecrets ()
@@ -116,18 +113,22 @@ func (d *Driver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolu
116
113
}
117
114
}
118
115
119
- // "allow_other" option refer to http://manpages.ubuntu.com/manpages/xenial/man8/mount. fuse.8.html
120
- options := []string {"-o allow_other" }
116
+ // todo: option allow_other only allowed if 'user_allow_other' is set in /etc/ fuse.conf
117
+ options := []string {}
121
118
if readOnly {
122
119
options = append (options , "-o ro" )
123
120
}
124
121
mountOptions := k8sutil .JoinMountOptions (mountFlags , options )
125
122
123
+ klog .V (2 ).Infof ("target %v\n fstype %v\n \n readonly %v\n volumeId %v\n context %v\n mountflags %v\n mountOptions %v\n " ,
124
+ targetPath , fsType , readOnly , volumeID , attrib , mountFlags , mountOptions )
125
+
126
126
cmd := exec .Command ("/usr/blob/blobfuse" , targetPath , "--tmp-path=/mnt/" + volumeID ,
127
127
"--container-name=" + containerName , util .GetMountOptions (mountOptions ))
128
128
cmd .Env = append (os .Environ (), "AZURE_STORAGE_ACCOUNT=" + accountName , "AZURE_STORAGE_ACCESS_KEY=" + accountKey )
129
- err = cmd .Run ()
129
+ output , err : = cmd .CombinedOutput ()
130
130
if err != nil {
131
+ klog .Errorf ("Mount failed with error: %v" , string (output ))
131
132
notMnt , mntErr := d .mounter .IsLikelyNotMountPoint (targetPath )
132
133
if mntErr != nil {
133
134
klog .Errorf ("IsLikelyNotMountPoint check failed: %v" , mntErr )
0 commit comments