k3s/pkg/controller
Kubernetes Submit Queue e9f4db2748 Merge pull request #27714 from jsafrane/event-recycle
Automatic merge from submit-queue

Send recycle events from pod to pv.

This allows users to diagnose what's wrong with recycler. Recycler pods are started automatically with a cryptic name and they are deleted immediately when they finish.

e.g, `kubectl describe pv` could show that NFS cannot be mounted (and how many pods have tried it):

```
  FirstSeen     LastSeen        Count   From                            SubobjectPath   Type            Reason          Message
  ---------     --------        -----   ----                            -------------   --------        ------          -------
  59m           59m             1       {persistentvolume-controller }                  Warning         RecyclerPod     Recycler pod: Unable to mount volumes for pod "recycler-for-nfs_default(5421800e-347b-11e6-a79b-3c970e965218)": timeout expired waiting for volumes to attach/mount for pod "recycler-for-nfs"/"default". list of unattached/unmounted volumes=[vol]
  53m           53m             1       {persistentvolume-controller }                  Warning         RecyclerPod     Recycler pod: Unable to mount volumes for pod "recycler-for-nfs_default(3c9809e5-347c-11e6-a79b-3c970e965218)": timeout expired waiting for volumes to attach/mount for pod "recycler-for-nfs"/"default". list of unattached/unmounted volumes=[vol]
  46m           46m             1       {persistentvolume-controller }                  Warning         RecyclerPod     Recycler pod: Unable to mount volumes for pod "recycler-for-nfs_default(250dd2a2-347d-11e6-a79b-3c970e965218)": timeout expired waiting for volumes to attach/mount for pod "recycler-for-nfs"/"default". list of unattached/unmounted volumes=[vol]
  40m           40m             1       {persistentvolume-controller }                  Warning         RecyclerPod     Recycler pod: Unable to mount volumes for pod "recycler-for-nfs_default(0d84ea33-347e-11e6-a79b-3c970e965218)": timeout expired waiting for volumes to attach/mount for pod "recycler-for-nfs"/"default". list of unattached/unmounted volumes=[vol]
  33m           33m             1       {persistentvolume-controller }                  Warning         RecyclerPod     Recycler pod: Unable to mount volumes for pod "recycler-for-nfs_default(f5fb63bf-347e-11e6-a79b-3c970e965218)": timeout expired waiting for volumes to attach/mount for pod "recycler-for-nfs"/"default". list of unattached/unmounted volumes=[vol]
  27m           27m             1       {persistentvolume-controller }                  Warning         RecyclerPod     Recycler pod: Unable to mount volumes for pod "recycler-for-nfs_default(de7128fd-347f-11e6-a79b-3c970e965218)": timeout expired waiting for volumes to attach/mount for pod "recycler-for-nfs"/"default". list of unattached/unmounted volumes=[vol]
  1h            3m              75      {persistentvolume-controller }                  Normal          RecyclerPod     Recycler pod: Successfully assigned recycler-for-nfs to 127.0.0.1
  1h            3m              76      {persistentvolume-controller }                  Normal          RecyclerPod     Recycler pod: Pod was active on the node longer than specified deadline
  1h            1m              12      {persistentvolume-controller }                  Warning         RecyclerPod     Recycler pod: Error syncing pod, skipping: timeout expired waiting for volumes to attach/mount for pod "recycler-for-nfs"/"default". list of unattached/unmounted volumes=[vol]
  20m           1m              4       {persistentvolume-controller }                  Warning         RecyclerPod     (events with common reason combined)
```

These steps were necessary:

- added event watcher to volume.RecycleVolumeByWatchingPodUntilCompletion
- pass all these events through volume plugins to volume controller
- rework volume.RecycleVolumeByWatchingPodUntilCompletion unit tests to a table (too much copy-paste)
- fix all unit tests along the way
2016-09-22 12:18:53 -07:00
..
certificates Merge pull request #32876 from errordeveloper/more-cert-utils 2016-09-22 01:29:46 -07:00
daemon Merge pull request #32877 from deads2k/client-09-fixup-lister 2016-09-16 22:39:37 -07:00
deployment controller: enhance timeout error message for Recreate deployments 2016-09-20 15:53:24 +02:00
disruption Merge pull request #33103 from deads2k/controller-03-kill-non-generatedclient 2016-09-22 11:37:01 -07:00
endpoint Merge pull request #33103 from deads2k/controller-03-kill-non-generatedclient 2016-09-22 11:37:01 -07:00
garbagecollector Avoid unnecessary API calls from GC 2016-09-18 07:09:11 +02:00
informers convert daemonset controller to shared informers 2016-09-16 10:40:46 -04:00
job fix job controller hot loop 2016-09-20 22:25:11 +08:00
namespace move informer and controller to pkg/client/cache 2016-09-15 12:50:08 -07:00
node Merge pull request #32655 from dshulyak/fix_node_fake_update 2016-09-22 07:43:18 -07:00
petset switch controller manager to generated clientset 2016-09-20 12:53:47 -04:00
podautoscaler move informer and controller to pkg/client/cache 2016-09-15 12:50:08 -07:00
podgc move informer and controller to pkg/client/cache 2016-09-15 12:50:08 -07:00
replicaset change factorization of listers to make them easier to add 2016-09-16 14:49:00 -04:00
replication Revert "simplify RC and SVC listers" 2016-09-21 15:49:38 -07:00
resourcequota move informer and controller to pkg/client/cache 2016-09-15 12:50:08 -07:00
route Don't update NodeNetworkUnavailable condition if it's already set correctly 2016-09-16 21:03:20 +02:00
scheduledjob Move ScheduledJob controller to use generated clientset 2016-09-14 11:27:29 +02:00
service Revert "simplify RC and SVC listers" 2016-09-21 15:49:38 -07:00
serviceaccount move core resource registry packages 2016-09-21 10:11:50 -04:00
volume Merge pull request #27714 from jsafrane/event-recycle 2016-09-22 12:18:53 -07:00
OWNERS
controller_ref_manager.go fix tests; convert IsPodActive to operate on *Pod 2016-08-17 13:05:37 -07:00
controller_utils.go move informer and controller to pkg/client/cache 2016-09-15 12:50:08 -07:00
controller_utils_test.go fix tests; convert IsPodActive to operate on *Pod 2016-08-17 13:05:37 -07:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
lookup_cache.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00