-
Notifications
You must be signed in to change notification settings - Fork 159
Add VolumeStats for Windows #627
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
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jingxu97 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
/retest |
pkg/mount-manager/statter_windows.go
Outdated
zero := int64(0) | ||
return zero, zero, zero, zero, zero, zero, fmt.Errorf("Not implemented") | ||
//return zero, zero, zero, zero, zero, zero, fmt.Errorf("Not implemented") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed.
pkg/gce-pd-csi-driver/node.go
Outdated
@@ -412,7 +412,7 @@ func (ns *GCENodeServer) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGe | |||
}, nil | |||
} | |||
|
|||
available, capacity, used, inodesFree, inodes, inodesUsed, err := ns.VolumeStatter.StatFS(req.VolumePath) | |||
available, capacity, used, inodesFree, inodes, inodesUsed, err := getStatFS(ns.VolumeStatter, req.VolumePath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why have to to thunk through getStatFS and can't just use the Statter interface directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are right, directly use Statter is good. I kind of follow some other calls, which seem have to use this route.
updated the code. PTAL
add support for getting volume stats for windows
/assign |
/retest |
add support for getting volume stats for windows. Tested on Windows node with following and it is working.
note: Inode is not available for windows.
invoke-webrequest http://localhost:10255/metrics -outfile metrics
What type of PR is this?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #628
Special notes for your reviewer:
Does this PR introduce a user-facing change?: