reduce cpu, memory usage in CSI drivers on Windows #2010
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
Is your feature request related to a problem?/Why is this needed
powershell command would consume more memory and cpu on Windows, it's better replace with Golang API in Windows host process mode
Test-Path $Env:remotepath
// PathValid determines whether all elements of a path exist
// https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/test-path?view=powershell-7
// for a remote path, determines whether connection is ok
// e.g. in a SMB server connection, if password is changed, connection will be lost, this func will return false
replace with
os.Stat
, related to fix: mount-utils: Detect potential stale file handle kubernetes/kubernetes#106906(Get-Item -Path $Env:mount).Target
replace with
os.Readlink
does not work: [WIP] fix: replace Get-Item powershell cmd with golang api azuredisk-csi-driver#2265there are other powershell commands in following code, it's better replacing them all with Golang APIs (search
RunPowershellCmd
)https://github.com/kubernetes-sigs/azurefile-csi-driver/blob/master/pkg/os/smb/smb.go
Describe the solution you'd like in detail
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: