-
Notifications
You must be signed in to change notification settings - Fork 39.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PVC usage metrics incorrect in /stats/summary kubelet endpoint for Windows Azure Files #110261
Comments
@gracewehner: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/sig node storage windows |
I have checked this issue, this is actually related to this issue: kubernetes-csi/csi-proxy#208 |
/remove-sig node since it looks to be a known windows issue |
Asked some SMB folks. In the meantime I've been lookin around and https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getdiskfreespaceexa may be an avenue. Believe it works on smb shares, I can report back tomorrow and push a change if this does actually do the job. |
GetDiskFreeSpaceEx seems to work from testing on an az file share. package main
import (
"fmt"
"log"
"os"
"golang.org/x/sys/windows"
)
func main() {
var (
total uint64
totalFree uint64
)
dirName := windows.StringToUTF16Ptr(os.Args[1])
if err := windows.GetDiskFreeSpaceEx(dirName, nil, &total, &totalFree); err != nil {
log.Fatal(err)
}
toGib := func(bytes uint64) int {
return int(bytes >> 30)
}
fmt.Printf("Total: %d\nTotal Free: %d\n", toGib(total), toGib(totalFree))
} The above reports: with the share I was testing with having a 5TiB quota and a single 20 GiB file inside. I'll wait for the SMB folks to tell me if there's any gotchas, but if not I can push a change to add this to the csi-proxy |
@dcantah what's the |
@andyzhangx \\myserver\myshare, are these mounts actually mapped to drive letters or just accessed via the UNC path? |
@dcantah The k8s file driver would create a symlink to the azure file, like following:
Would |
@andyzhangx Looks like it:
C:\smbtest is just a symlink to my az file share |
@dcantah great, current |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
Hello @dcantah, hope you are doing well. I am following up into this issue to understand if you were able to get this to work. If yes, could you please share the details here? Thank you so much. |
@lualvare this requires csi-proxy change and new csi-proxy version upgrade. And we are in the process of removing csi-proxy and use native call from k8s 1.23, after that csi-proxy removal change, it's easier to fix this issue in csi driver. |
@kiashok FYI |
@andyzhangx thank you so very much for the information provided here, I want to know if this is already in the roadmap and see if there is any ETA for this fix? Thank you so much. |
@lualvare it mainly depends on when csi-proxy removal would be completed: kubernetes-csi/csi-proxy#217, since we don't publish any new version of csi-proxy now, after that work is done, such kind of change is easier. There is no clear ETA yet. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
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:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/reopen |
@andyzhangx: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
FYI. this issue would be fixed on AKS 1.27 with host process deployment directly, here is an example PR (by using GetDiskFreeSpaceEx) how to fix this issue: kubernetes-sigs/azurefile-csi-driver#1337 |
What happened?
Curling
https://<Node-IP>:10250/stats/summary
for a Windows node returns the wrong usage and capacity bytes for aazurefile-csi
PVC used by a Windows pod on that node:This looks like it is the usage of the disk on the node or something else.
azurefile-csi
PVCs used by Linux pods report the correct usage.What did you expect to happen?
The PVC is empty so the usedBytes should be 0 and the capacity should be 2Gi.
How can we reproduce it (as minimally and precisely as possible)?
Apply the following to create an azurefile PVC and a windows pod that uses it:
Then run
curl -s -k -H "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)"https://<NODE_IP>:10250/stats/summary
where <NODE_IP> is the IP of the Windows node the pod is running on and view the output for the pod.Anything else we need to know?
No response
Kubernetes version
1.21.7
Cloud provider
Azure
OS version
Caption: Microsoft Windows Server 2019 Datacenter
Version: 10.0.17763
BuildNumber:17763
OSArchitecture: 64-bit
Install tools
No response
Container runtime (CRI) and version (if applicable)
Docker
Related plugins (CNI, CSI, ...) and versions (if applicable)
AzureFile CSI Driver version: 1.17.0
The text was updated successfully, but these errors were encountered: