Commit Graph

18 Commits

Author SHA1 Message Date
saadali
79012f6d53 Rename volume.Builder to Mounter and volume.Cleaner to Unmounter 2016-03-25 11:29:58 -07:00
k8s-merge-robot
315a509340 Merge pull request #20900 from jsafrane/devel/volume-names
Auto commit by PR queue bot
2016-02-13 17:58:29 -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
Jan Safranek
1d0b1c227b Add PV.Name into names of generated GCE/AWS/OSP volumes.
Volume names have now format <cluster-name>-dynamic-<pv-name>.

pv-name is guaranteed to be unique in Kubernetes cluster, adding
<cluster-name> ensures we don't conflict with any running cluster
in the cloud project (kube-controller-manager --cluster-name=XXX).

'kubernetes' is the default cluster name.
2016-02-12 09:46:59 +01:00
Tim Hockin
7cab7bd472 fix a few go-vet errors 2016-02-09 13:20:31 -08:00
Chao Xu
184440f8ef rename release_1_2 to internalclientset 2016-02-05 14:02:28 -08:00
Chao Xu
1b047f8e67 rename legacy to core 2016-02-04 14:26:56 -08:00
Chao Xu
f9f5736b01 grep sed 2016-02-03 13:06:07 -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
k8s-merge-robot
52cb4c1d9d Merge pull request #18445 from resouer/fix-emptydir
Auto commit by PR queue bot
2016-01-26 02:45:54 -08:00
harry
0fa5b6c4f7 Add e2e test for wrapper volumes
Use git server in e2e and refactor wrapper builder

Update e2e test to use a fake git server
2016-01-24 16:57:44 +08:00
Jan Safranek
400ebf87a1 Add PV.Name to volume tags.
We add claim.Name and claim.Namespace as tags to AWS EBS / GCE PD / OpenStack
Cinder volumes created by Kubernetes. To easily match Kubernetes volumes and
cloud volumes, let's add also PV.Name.
2016-01-04 12:28:02 +01:00
Jan Safranek
6ff5286df9 Implement Creater and Deleter interfaces for AWS EBS.
Also mark the created EBS volumes with tags, so the admin knows
who/what created the volumes.
2015-12-15 10:22:49 +01:00
Wojciech Tyczynski
960808bf08 Switch to versioned ListOptions in client. 2015-12-14 14:26:09 +01:00
markturansky
4fc1bf1f23 Added PersistentVolumeController 2015-12-11 10:33:30 -05:00