azurefile-csi-driver
azurefile-csi-driver copied to clipboard
reduce cpu, memory usage in CSI drivers on Windows
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: https://github.com/kubernetes/kubernetes/pull/106906 -
(Get-Item -Path $Env:mount).Target replace with
os.Readlinkdoes not work: https://github.com/kubernetes-sigs/azuredisk-csi-driver/pull/2265 -
there 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 Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle stale - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle stale - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle rotten - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
would be fixed in csi driver v1.33.0