Skip to content
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

Take mount options to GA by adding PV.spec.mountOptions #50919

Merged
merged 2 commits into from
Aug 29, 2017

Conversation

wongma7
Copy link
Contributor

@wongma7 wongma7 commented Aug 18, 2017

What this PR does / why we need it: Implements kubernetes/community#771

issue: kubernetes/enhancements#168

Special notes for your reviewer:

TODO:

  • StorageClass mountOptions

As described in proposal, this adds PV.spec.mountOptions + mountOptions parameter to every plugin that is both provisionable & supports mount options.

(personally, even having done all the work already, i don't agree w/ the proposal that mountOptions should be SC parameter but... :))

Release note:

Add mount options field to PersistentVolume spec

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 18, 2017
@k8s-github-robot k8s-github-robot added kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Aug 18, 2017
@wongma7
Copy link
Contributor Author

wongma7 commented Aug 18, 2017

@kubernetes/sig-storage-api-reviews

@k8s-ci-robot k8s-ci-robot added sig/storage Categorizes an issue or PR as relevant to SIG Storage. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels Aug 18, 2017
@wongma7 wongma7 force-pushed the mount-options branch 2 times, most recently from efb3f50 to bb67cef Compare August 18, 2017 18:04
@wongma7 wongma7 changed the title WIP: Take mount options to GA Take mount options to GA by adding PV.spec.mountOptions & standard SC.parameters[mountOptions] Aug 18, 2017
@wongma7
Copy link
Contributor Author

wongma7 commented Aug 18, 2017

/retest

1 similar comment
@wongma7
Copy link
Contributor Author

wongma7 commented Aug 21, 2017

/retest

@jsafrane
Copy link
Member

/assign

@jsafrane
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 21, 2017
@jsafrane
Copy link
Member

/approve
(the volume plugin part)

@jsafrane
Copy link
Member

/assign @thockin
for approval

@k8s-github-robot k8s-github-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Aug 22, 2017
pkg/api/types.go Outdated
@@ -455,6 +455,9 @@ type PersistentVolumeSpec struct {
// means that this volume does not belong to any StorageClass.
// +optional
StorageClassName string
// A comma-separated list of mount options. Not validated--mount will simply fail if one is invalid.
// +optional
MountOptions *string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this a comma-sep string rather than a []string ? I dislike embedded syntax unless well-justified...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the discussion kubernetes/community#321 (comment), it seems people had no strong objections to a comma-separated string once we decided to give up per-option validation, so it made it into the final proposal. I guess that's not a very good justification.

The only other reason I can think of is: since StorageClass.parameters is restricted to map[string]string, there is some consistency in making persistentVolume.spec.mountOptions a string like storageClass.parameters[mountOptions] is.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since beta version was implemented using annotations and that by definition means key and value has to be string (unless we perform special decoding of annotation and since this is exposed to end user, it gets hairy fast) - that was the main reason we gave up on the idea of the mount option being []string . It is probably still not a very good justification. But I think that - using string here is fine as well.

@wongma7
Copy link
Contributor Author

wongma7 commented Aug 22, 2017

ping @gnufied

@thockin
Copy link
Member

thockin commented Aug 22, 2017 via email

@wongma7
Copy link
Contributor Author

wongma7 commented Aug 22, 2017

In this mount options case, if it has to be a parameter string, I think a comma-string is better for users than a stricter kind of encoding. Because comma-separated options is how mount -o takes them. and I'm picturing some admin copy-pasting a known set of options v.s. filling it in our way & making a typo.

Hate to take a step backwards, but if we introduce storageClass.mountOptions as a first-class field instead, then we don't need to worry about this as we can have both PV.spec.mountoptions & storageclass.mountoptions be string arrays.

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 23, 2017
@thockin
Copy link
Member

thockin commented Aug 23, 2017 via email

@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 25, 2017
@wongma7
Copy link
Contributor Author

wongma7 commented Aug 25, 2017

/retest
#42597

@wongma7
Copy link
Contributor Author

wongma7 commented Aug 25, 2017

@thockin ping again, PV.spec.mountOptions is ready for final pass !

@thockin
Copy link
Member

thockin commented Aug 25, 2017

/lgtm
/approve

Don't forget a docs PR, please. @devin-donnelly

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 25, 2017
@k8s-github-robot k8s-github-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 26, 2017
@k8s-github-robot k8s-github-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Aug 28, 2017
@wongma7
Copy link
Contributor Author

wongma7 commented Aug 28, 2017

needs re-lgtm please, I just rebased!
/assign @gnufied

@gnufied
Copy link
Member

gnufied commented Aug 28, 2017

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 28, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gnufied, jsafrane, thockin, wongma7

Associated issue: 168

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 /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@wongma7
Copy link
Contributor Author

wongma7 commented Aug 28, 2017

/retest

@wongma7
Copy link
Contributor Author

wongma7 commented Aug 28, 2017

/retest
W0828 21:58:54.609] 2017/08/28 21:58:54 main.go:233: Something went wrong: error starting federation: error during ./federation/cluster/federation-up.sh: exit status 124

@wongma7
Copy link
Contributor Author

wongma7 commented Aug 28, 2017

/retest
if the next one fails I guess the failure is legit and I'll look through logs, no idea why federation of all tests would fail though

@msau42
Copy link
Member

msau42 commented Aug 28, 2017

It looks like federation tests are failing for everyone: https://k8s-gubernator.appspot.com/builds/kubernetes-jenkins/pr-logs/directory/pull-kubernetes-federation-e2e-gce

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to @fejta).

Review the full test history for this PR.

@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@jsafrane
Copy link
Member

/retest

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 50919, 51410, 50099, 51300, 50296)

@k8s-github-robot k8s-github-robot merged commit ae17c1f into kubernetes:master Aug 29, 2017
k8s-github-robot pushed a commit that referenced this pull request Aug 30, 2017
Automatic merge from submit-queue

Add storageClass.mountOptions and use it in all applicable plugins

split off from #50919 and still dependent on it. cc @gnufied


issue: kubernetes/enhancements#168

```release-note
Add mount options field to StorageClass. The options listed there are automatically added to PVs provisioned using the class.
```
dims pushed a commit to dims/openstack-cloud-controller-manager that referenced this pull request Sep 6, 2017
Automatic merge from submit-queue

Add storageClass.mountOptions and use it in all applicable plugins

split off from kubernetes/kubernetes#50919 and still dependent on it. cc @gnufied


issue: kubernetes/enhancements#168

```release-note
Add mount options field to StorageClass. The options listed there are automatically added to PVs provisioned using the class.
```
dims pushed a commit to dims/openstack-cloud-controller-manager that referenced this pull request Jan 13, 2018
Automatic merge from submit-queue

Add storageClass.mountOptions and use it in all applicable plugins

split off from kubernetes/kubernetes#50919 and still dependent on it. cc @gnufied


issue: kubernetes/enhancements#168

```release-note
Add mount options field to StorageClass. The options listed there are automatically added to PVs provisioned using the class.
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.