-
Notifications
You must be signed in to change notification settings - Fork 39.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ScaleIO Volume Plugin - Volume attribute fixes and updates #48999
ScaleIO Volume Plugin - Volume attribute fixes and updates #48999
Conversation
Hi @vladimirvivien. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/ok-to-test |
@vladimirvivien: you can't request testing unless you are a kubernetes member. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@kubernetes/sig-storage-pr-reviews |
/ok-to-test |
|
/test pull-kubernetes-federation-e2e-gce |
@@ -107,6 +109,12 @@ func validateConfigs(config map[string]string) error { | |||
if config[confKey.system] == "" { | |||
return systemNotProvidedErr | |||
} | |||
if config[confKey.storagePool] == "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this break backward compatibility? A config file without storagePool and protectionDomain was accepted before and now it is not. This needs at least a release note.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jsafrane You are correct, existing/deployed config are ok, but newer configs will require these values to be provided in subsequent deployments. I will add that to the release notes and the documentations will also be updated (separate PR).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jsafrane another clarification on that point. The code was substituting "default"
for those values when they were not provided. However, production deployments are most likely not using that value anyway. Backward compat is ok. Will still add it to release note.
pkg/volume/scaleio/sio_volume.go
Outdated
@@ -248,6 +248,10 @@ func (v *sioVolume) Provision() (*api.PersistentVolume, error) { | |||
// setup volume attrributes | |||
name := v.generateVolName() | |||
capacity := v.options.PVC.Spec.Resources.Requests[api.ResourceName(api.ResourceStorage)] | |||
if capacity.Value() == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This patch chunk is removed in subsequent patch and IMO it should not be - PVC with requesting 0 bytes is wrong and should be probably rejected.
pkg/volume/scaleio/sio_volume.go
Outdated
@@ -248,12 +248,12 @@ func (v *sioVolume) Provision() (*api.PersistentVolume, error) { | |||
// setup volume attrributes | |||
name := v.generateVolName() | |||
capacity := v.options.PVC.Spec.Resources.Requests[api.ResourceName(api.ResourceStorage)] | |||
if capacity.Value() == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I liked this code, refusing wrong PVCs is IMO better than defaulting to magic 8GiB.
This PR fixes things here and there, I'd appreciate separate PRs next time. The biggest change is |
@jsafrane The |
/retest |
/test pull-kubernetes-federation-e2e-gce |
I commented it twice already, perhaps it got lost somewhere. I don't like 8GiB as default volume size if the user does not specify any. This allows user to bypass storage quota - user asks for 0 and is accounted for it, but he gets 8. That's IMO wrong and PVCs with |
@jsafrane Thanks for the feedback. I agree, a request for 0 capacity is an erroneous request. While the minimum size for ScaleIO is 8gig, I will change the code to reject it as you suggested. Thanks. |
/test pull-kubernetes-kubemark-e2e-gce |
/retest |
|
This commit introduces the following updates and fixes: - Enable scaleIO volume multip-mapping based on accessMode - No longer uses "default" as default values for storagepool & protection domain - validates capacity when capacity is zero - Better naming for PV and volume - make mount ro when accessModes contains ROM
/pull-kubernetes-unit |
1 similar comment
/pull-kubernetes-unit |
/test pull-kubernetes-unit |
/lgtm |
/retest |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jsafrane, vladimirvivien Associated issue requirement bypassed by: jsafrane The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Thanks @jsafrane |
/test pull-kubernetes-e2e-kops-aws |
1 similar comment
/test pull-kubernetes-e2e-kops-aws |
Automatic merge from submit-queue (batch tested with PRs 49871, 49422, 49092, 49858, 48999) |
…f-#48999-upstream-release-1.7 Automatic merge from submit-queue ScaleIO Volume Plugin - volume attribute updates This commit introduces the following updates and fixes: - Enable scaleIO volume multip-mapping based on accessMode - No longer uses "default" as default values for storagepool & protection domain - validates capacity when capacity is zero - Better naming for PV and volume - make mount ro when accessModes contains ROM **Special notes for your reviewer**: - Related bug - #50794 - This is being cherry-picked for PR #48999 Fixes: #50794 **Release note**: ```release-note ScaleIO: fixed enforcement of fsGroup, enabled multiple-instance volume mapping, adjusted alignment of PVC, PV, and volume names for dynamic provisioning ```
Commit found in the "release-1.7" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked. |
What this PR does / why we need it:
This is a housekeeping PR for small enhancements and fixes to the ScaleIO volume plugin to address issues:
Special notes for your reviewer:
Release note: