k3s/pkg/volume/util
Kubernetes Submit Queue 2a2f499455 Merge pull request #50036 from wongma7/metrics
Automatic merge from submit-queue

Add volume operation metrics to operation executor and PV controller

This PR implements the proposal for high level volume metrics https://github.com/kubernetes/community/pull/809

**Special notes for your reviewer**:

~Differences from proposal:~ all resolved

~"verify_volume" is now "verify_volumes_are_attached" + "verify_volumes_are_attached_per_node" + "verify_controller_attached_volume." Which of them do we want?~

~There is no "mount_device" metric because the MountVolume operation combines MountDevice and mount (plugin.Setup). Do we want to extract the mount_device metric or is it okay to keep mountvolume as one? For attachable volumes, MountDevice is the actual mount and Setup is a bindmount + setvolumeownership. For unattachable, mountDevice does not occur and Setup is an actual mount + setvolumeownership.~

~PV controller metrics I did not implement following the proposal at all. I did not change goroutinemap nor scheduleOperation. Because provisionClaimOperation does not return an error, so it's impossible for the caller to know if there is actually a failure worth reporting. So I manually create a new metric inside the function according to some conditions.~

@gnufied 

I have tested the operationexecutor metrics but not provision & delete. Sample: 
![screen shot 2017-08-02 at 15 01 08](https://user-images.githubusercontent.com/13111288/28889980-a7093526-7793-11e7-9aa9-ad7158be76fa.png)


**Release note**:

```release-note
Add error count and time-taken metrics for storage operations such as mount and attach, per-volume-plugin.
```
2017-08-28 04:20:49 -07:00
..
nestedpendingoperations Add volume operation metrics to operation executor and PV controller 2017-08-23 14:27:47 -04:00
operationexecutor Merge pull request #50036 from wongma7/metrics 2017-08-28 04:20:49 -07:00
types Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
volumehelper SafeFormatAndMount should use volume.Exec provided by VolumeHost 2017-08-14 12:16:27 +02:00
BUILD Add volume operation metrics to operation executor and PV controller 2017-08-23 14:27:47 -04:00
OWNERS Update OWNERS for pkg/volume/util/ 2016-11-13 18:02:15 -08:00
atomic_writer.go use built-in path separator instead of hard coded 2017-07-09 23:24:34 +08:00
atomic_writer_test.go move authoritative client-go utils out of pkg 2017-01-24 08:59:18 -05:00
device_util.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
device_util_linux.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
device_util_linux_test.go fix go vet errors 2016-08-10 16:45:41 -07:00
device_util_unsupported.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
fs.go switch from package syscall to x/sys/unix 2017-07-21 12:14:42 +02:00
fs_unsupported.go pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
io_util.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
metrics.go Add volume operation metrics to operation executor and PV controller 2017-08-23 14:27:47 -04:00
util.go Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
util_test.go Manual changes. 2017-07-17 15:05:37 -07:00