From 0a63d7cc9a86409153b8ba6cd832876b5ccb6197 Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Thu, 8 Feb 2018 05:56:16 +0000 Subject: [PATCH] return error if New-SmbGlobalMapping failed in azure file mount --- pkg/util/mount/mount_windows.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/util/mount/mount_windows.go b/pkg/util/mount/mount_windows.go index b39951add1..0c63626ea3 100644 --- a/pkg/util/mount/mount_windows.go +++ b/pkg/util/mount/mount_windows.go @@ -89,10 +89,7 @@ func (mounter *Mounter) Mount(source string, target string, fstype string, optio cmdLine += fmt.Sprintf(";New-SmbGlobalMapping -RemotePath %s -Credential $Credential", source) if output, err := exec.Command("powershell", "/c", cmdLine).CombinedOutput(); err != nil { - // we don't return error here, even though New-SmbGlobalMapping failed, we still make it successful, - // will return error when Windows 2016 RS3 is ready on azure - glog.Errorf("azureMount: SmbGlobalMapping failed: %v, only SMB mount is supported now, output: %q", err, string(output)) - return os.MkdirAll(target, 0755) + return fmt.Errorf("azureMount: SmbGlobalMapping failed: %v, only SMB mount is supported now, output: %q", err, string(output)) } }