Commit Graph

25 Commits

Author SHA1 Message Date
Chao Xu
ad46715f51 generate fake client for release_1_2 2016-02-17 16:10:02 -08:00
k8s-merge-robot
ad7ed67904 Merge pull request #20213 from jsafrane/devel/pv-reload
Auto commit by PR queue bot
2016-02-12 06:49:29 -08:00
k8s-merge-robot
678958a706 Merge pull request #19868 from jsafrane/devel/syncclaim-twice
Auto commit by PR queue bot
2016-02-12 06:21:21 -08:00
k8s-merge-robot
e3c58293b9 Merge pull request #20197 from markturansky/check_pv_by_pvc_uid
Auto commit by PR queue bot
2016-02-05 21:06:16 -08:00
Chao Xu
1b047f8e67 rename legacy to core 2016-02-04 14:26:56 -08:00
Jan Safranek
1edf34a4e5 Fixed persistent volume claim controllers processing an old claim.
Fixes #19860 (it may be easier to look at the issue to see exact sequence
to reproduce the bug and understand the fix).

When PersistentVolumeProvisionerController.reconcileClaim() is called with the
same claim in short succession (e.g. the claim is created by an user and
at the same time periodic check of all claims is scheduled), the second
reconcileClaim() call gets an old copy of the claim as its parameter.

The method should always reload the claim to get a fresh copy with all
annotations, possibly added by previous reconcileClaim() call.


The same applies to PersistentVolumeClaimBinder.syncClaim().


Also update all the test to store claims in "fake" API server before calling
syncClaim and reconcileClaim.
2016-02-02 13:52:07 +01:00
Jan Safranek
e2826626b1 Fixed persistent volume claim controllers processing an old volume
We should always load the newest version of the volume from APIserver before
processing it.

When PersistentVolumeProvisionerController.reconcileVolume() is called with the
same volume in short succession (e.g. the volume is created by a provisioner
and at the same time periodic check of all volumes is scheduled), the second
reconcileVolume() call gets an old copy of the volume as its parameter and
it does not see annotations updated by the previous call.

This may result in one volume being provisioned several times, creating orphan
volumes in the cloud.

The same error is in PersistentVolumeClaimBinder.syncVolume().
2016-02-01 10:44:31 +01:00
Chao Xu
c72d234bbf replacing handwritten client in several controllers 2016-01-31 15:42:02 -08:00
Fabio Yeon
7205a160ac Remove all instances of "/tmp" from unit tests and replace with a common
tmp directory creator. Exception is documented.
2016-01-27 16:11:22 -08:00
markturansky
1ad2df6b61 verify UID when releasing and binding volumes 2016-01-27 08:43:18 -05:00
Clayton Coleman
33085c0cf2 Update tests to handle codec changes 2016-01-22 13:27:26 -05:00
markturansky
66b5844841 trigger syncClaim after pv provisioning to reduce wait 2015-12-17 21:35:10 -05:00
deads2k
9fda7f1812 update StatusDetails to handle Groups 2015-12-17 09:14:12 -05:00
markturansky
4aacb76149 added cast checks to controllers to prevent nil panics 2015-12-15 11:34:03 -05:00
Phillip Wittrock
c67ce887f2 Volume Metrics Interface and base implementation.
- Add volume.MetricsProvider function to Volume interface.
- Add volume.MetricsDu for providing metrics via executing "du".
- Add volulme.MetricsNil for unsupported Volumes.
2015-12-09 16:06:24 -08:00
markturansky
b9b8cf7fff Fixed race condition in pv binder 2015-11-12 13:55:09 -05:00
k8s-merge-robot
df265b2d6e Merge pull request #15510 from aveshagarwal/master-selflink-objref
Auto commit by PR queue bot
2015-10-27 00:37:21 -07:00
Avesh Agarwal
8e4a8b7260 Addresses issue #6596.
Removes ForTesting_ReferencesAllowBlankSelfLinks.
Fixes controller's persistentvolumes unit tests.
2015-10-12 19:21:48 -04:00
eulerzgy
4ed5f9d240 adjust package name for pkg/controller directory 2015-10-12 09:51:27 +08:00
markturansky
7bc55b5aea configurable pv recyclers 2015-09-15 12:48:25 -04:00
markturansky
0e7f73ad67 expand volume.Spec to include full Volume and PV 2015-09-03 08:57:32 -04:00
deads2k
7e180c258d update testclient for delegating reaction chain 2015-09-01 12:58:35 -04:00
Kris Rousey
ae6c64d9bb Moving everyone to unversioned client 2015-08-18 10:23:03 -07:00
Kris Rousey
565189f5b8 Correcting all go vet errors 2015-08-11 13:55:37 -07:00
markturansky
8e0d391b1e Refactored persistent volume controllers to new packaging structure 2015-08-10 23:18:48 -04:00