Commit Graph

129 Commits

Author SHA1 Message Date
David Zhu
92cb06a2e7 Refactor CSI Translation Library into a struct that is injected into various components to simplify unit testing in future 2019-09-27 12:59:53 -07:00
Yi Tang
8c13f9dea3 fix pv controller not find pv for pvc provisioning 2019-07-26 16:24:30 +08:00
AllenZMC
852040c036
fix typos in pv_controller.go
make code kinda more readable
2019-07-25 11:28:19 +08:00
Shintaro Murakami
7c0b33e012 Add check to reduce orphaned volume 2019-07-11 16:31:56 +09:00
Ted Yu
a18633427b Drop unnecessary claim parameter from PersistentVolumeController#updateBindVolumeToClaim 2019-07-01 13:30:11 +08:00
xiangqian
38a884aa04 using storage class provisioner instead of annotation of a pv for external provisioner
minor updates
2019-05-30 10:19:36 -07:00
xiangqian
9688511595 record provision and deletion latency metric
instead of using provisioner from storage class directly, uses plugin name firstly
2019-05-29 14:15:30 -07:00
Yecheng Fu
2d0d226371 Move all private annotations to shared package and update code 2019-05-05 09:43:43 +08:00
Yecheng Fu
842fed658c Refactor PV scheduling library into separate package 2019-05-02 14:45:52 +08:00
Deep Debroy
1da91ad39a Add GetIntreeNameFromCSIName and SupersedesInTreePlugin APIs and unit tests
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2019-03-04 16:36:45 -08:00
Deep Debroy
23478f104f PV Controller changes to support provisioning in CSI Migration scenarios
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2019-02-26 08:39:54 -08:00
Andrew Kim
ca6a051b00 remove cloud provider dependencies to pkg/volume
Co-authored-by: Weibin Lin <linweibin1@huawei.com>
2019-02-09 01:16:55 -05:00
Yecheng Fu
8b79fe3ebe Do not call methods on PersistentVolumeController 2019-02-06 12:04:05 +08:00
Kubernetes Prow Robot
ccb1e1f26d
Merge pull request #72045 from cofyc/fix71928
Make volume binder resilient to races
2019-01-11 17:42:32 -08:00
Yecheng Fu
13d87fbff8 Make volume binder resilient to races
- FindPodVolumes do not error if PVC is assumed with selected node
- BindPodVolumes check against API objects
2019-01-08 02:14:13 +08:00
Saugat Acharya
926cabfc3a
Remove multiple spaces after a full stop 2019-01-07 17:04:46 +05:45
Saugat Acharya
956a21cd31
Aesthetic changes
* Remove multiple spaces after full stop
* Include a single space after a comment
* Fixed a typo
```diff
- eixst
+ exist
```
* Make comment and function name the same
2019-01-07 16:49:12 +05:45
Jordan Liggitt
73dcfe12da Stop checking VolumeScheduling feature gate 2018-12-27 17:45:45 -05:00
Matthew Wong
dd517c9ff2 Update all tests to account for BlockVolume enabled by default 2018-11-16 13:38:59 -05:00
Tomas Smetana
f9c9ef6ec0 PV Controller: fix recycling
In the situation when a PVC is deleted and a new one with the same name
bound to a different PV the "old" PV may fail to recycle since it's
associaded with a PVC that is detected as being in use. This may cause
the recycler processes to hang.
2018-11-15 16:38:25 +01:00
Davanum Srinivas
954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Walter Fender
f3f46d5f5a Moving the cloudprovider interface to staging.
Individual implementations are not yet being moved.
Fixed all dependencies which call the interface.
Fixed golint exceptions to reflect the move.
Added project info as per @dims and
https://github.com/kubernetes/kubernetes-template-project.
Added dims to the security contacts.
Fixed minor issues.
Added missing template files.
Copied ControllerClientBuilder interface to cp.
This allows us to break the only dependency on K8s/K8s.
Added TODO to ControllerClientBuilder.
Fixed GoDeps.
Factored in feedback from JustinSB.
2018-10-04 14:41:20 -07:00
lichuqiang
b4a57f6855 combine feature gate VolumeScheduling and DynamicProvisioningScheduling into one 2018-08-29 10:30:08 +08:00
Yecheng Fu
493502d0ae Double check PVC if not found in syncVolume.
If PV is bound by external PV binder (e.g. kube-scheduler), it's
possible on heavy load that corresponding PVC is not synced to
controller local cache yet.
2018-08-16 10:33:28 +08:00
Fabio Bertinatto
a15cc29442 Add extra metrics for PV Controller
Specifically:

* Total provision time
* Total PV deletion time
* Number of times PV provisioning failed
* Number of times PV deletion failed
2018-07-19 15:36:37 +02:00
Fabio Bertinatto
97e63985dc Return error in provisionClaimOperation 2018-07-19 15:27:40 +02:00
Jonathan Pentecost
b4cab1be0e persistentvolume: fix spelling of storageClasseName
Fixed spelling of error in 'pv_controller', was 'storageClasseName', is
now 'storageClassName'.
2018-07-17 14:34:51 +01:00
lichuqiang
bccc8fe979 Provision interface change 2018-06-05 16:35:16 +08:00
lichuqiang
446f36559e pv_controller change for provisioning 2018-05-24 17:12:38 +08:00
lichuqiang
95b530366a Add dynamic provisioning process 2018-05-24 17:12:38 +08:00
Kubernetes Submit Queue
8de8ca7bc8
Merge pull request #59947 from mkimuram/issue/59942
Automatic merge from submit-queue (batch tested with PRs 62448, 59317, 59947, 62418, 62352). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add binding error message for volumeMode:Block unsupported case

**What this PR does / why we need it**:
This PR adds a binding error message for volumeMode:Block
unsupported case.
With this message, users can understand why PV is not bound to
PVC on dynamic provisioning.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes: #59942

**Special notes for your reviewer**:
/cc @mtanino 
/sig storage

**Release note**:

```release-note
NONE
```
2018-04-17 16:31:21 -07:00
mkimuram
0ee71f0cc2 Add binding error message for volumeMode:Block unsupported case
This commit adds a binding error message for volumeMode:Block
unsupported case.
With this message, users can understand why PV is not bound to
PVC on both dynamic provisioning and manually creating volume.

This patch works as follows:

- In syncVolume, before adding the claim to claimQueue, check if
  there is a volumeMode mismatch, and if there is, record the
  event for both pv and pvc and skip adding to the queue.

fixes: #59942
2018-04-16 15:22:35 -04:00
hzxuzhonghu
a5b121724d pv controller clean code 2018-03-27 20:00:45 +08:00
wackxu
f737ad62ed update import 2018-02-27 20:23:35 +08:00
NickrenREN
dad0fa07b7 rename StorageProtection to StorageObjectInUseProtection 2018-02-21 10:48:56 +08:00
Di Xu
48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
Jan Safranek
53efb0fff7 Don't recycle PVs that are used by a pod 2018-02-05 16:41:39 +01:00
Jan Safranek
c96c0495f4 Pass pod informer to PV controller 2018-02-05 15:40:25 +01:00
Kubernetes Submit Queue
6f89c4742a
Merge pull request #59185 from jamiefang/fix-typo
Automatic merge from submit-queue (batch tested with PRs 55606, 59185, 58763, 59072, 59251). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix a typo in pkg/controller/volume/persistentvolume/pv_controller.go

**What this PR does / why we need it**:
Fix typo (a -> an)

**Special notes for your reviewer**:
none

**Release note**:

```release-note
none
```
2018-02-02 18:26:35 -08:00
Jamie Fang
8b9bfd5e5d
Fix typo (a -> an) 2018-02-01 16:29:45 +08:00
NickrenREN
b99580ba3f existing PV controller changes 2018-01-31 20:02:01 +08:00
Jan Safranek
691fec5e34 Don't bind PVs and PVCs with different access modes.
PVC pre-bound to a PV can bind to the PV only if it has correct access mode.
Report an event if it does not and keep the PVC Pending.
2018-01-24 09:48:38 +01:00
Jan Safranek
24400c24ae Clean up error messages for pre-bound PVCs.
When a PVC explicitly requests specific PV and the PV does not match,
we should tell the user what exactly does not match.

From:
Volume's size is smaller than requested or volume's class does not match with claim

To:
Cannot bind to requested volume "<volume name>": %s
where %s is one of:
- requested PV is too small
- storageClasseNames do not match
- incompatible volumeMode
- error checking volumeMode: api defaulting for volumeMode failed (this should not ever happen)
2018-01-19 15:43:45 +01:00
Kubernetes Submit Queue
a73aee954f
Merge pull request #56872 from davidz627/logImprovement
Automatic merge from submit-queue (batch tested with PRs 56375, 56872, 57053, 57165, 57218). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Improved event generation in volume mount,attach, and extend operations

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #57217

refactored mount, attach, extend operation's so that all failures generate events and event generation is more consistent.

```release-note
Improved event generation in volume mount, attach, and extend operations
```
2017-12-17 05:33:41 -08:00
David Zhu
e3f8f64c17 refactored mount, attach, resize operation's so that all failures generate events and event generation is more consistent.
refactored operation generator and operation executor to use more general generated functions for operations, completions, and events.
2017-12-14 11:09:12 -08:00
supereagle
032416c75d use core client with explicit version
fix more usage of deprecated core client
2017-11-25 08:14:10 +08:00
Michelle Au
58823a75a4 In findMatchingVolumes:
- Delay binding until Pod is scheduled
- Check for PV node affinity and access modes
- Exclude volumes from being matching
2017-11-21 21:42:35 -08:00
Michelle Au
3d0b510e25 Refactor bindVolumeToClaim() into 1) forming new PV object 2) making API and cache update 2017-11-21 19:11:36 -08:00
Scott Creeley
86742a2c92 VolumeMode binding logic update 2017-11-20 15:18:19 -05:00
Dr. Stefan Schimanski
012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00