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

Supply Portworx StorageClass paramters in volume spec labels for server-side processing #49526

Merged
merged 2 commits into from
Aug 1, 2017

Conversation

harsh-px
Copy link
Contributor

What this PR does / why we need it:
This change offloads the requirement of successfully parsing all existing and new portworx volume parameters to it's server-side components. As a result, for fixing bugs in existing volume parameters parsing and adding new support, we will not need to submit a k8s PR.

Which issue this PR fixes: fixes #49525

Release note:

Fix incorrect parsing of io_priority in Portworx volume StorageClass and add support for new paramters.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 25, 2017
@k8s-ci-robot
Copy link
Contributor

Hi @harsh-px. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

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.

@k8s-github-robot k8s-github-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Jul 25, 2017
@jsafrane
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 25, 2017
return "", 0, nil, err
spec, _ := specHandler.SpecFromOpts(p.options.Parameters)
if spec == nil {
spec = specHandler.DefaultSpec()
Copy link
Member

Choose a reason for hiding this comment

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

I am puzzled by this PR. StorageClass A has these parameters:

   repl: "3"

SpecFromOpts returns a spec with HaLevel = 3 and you pass it to driver.Create. Cool.

StorageClass B has these parameters:

   repl: "3"
   io_priority: "high"

In #49526 you say that SpecFromOpts fails. Now you pass the default spec with HaLevel = 1, Cos = 0 and with repl and io_priority labels to driver.Create. Is this correct? Will driver.Create parse the labels again and override spec.HaLevel and spec.Cos? So what's the point of calling SpecFromOpts if everything can be passed as labels?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now you pass the default spec with HaLevel = 1, Cos = 0 and with repl and io_priority labels to driver.Create. Is this correct?
Yes.
Will driver.Create parse the labels again and override spec.HaLevel and spec.Cos?

Yes, our latest server side implementation of driver.Create will overide the spec with entries given in the labels.

So what's the point of calling SpecFromOpts if everything can be passed as labels?

If everyone is running the latest Portworx version, we don't need to call SpecFromOpts
This is done to handle the case, someone updates to the latest k8s but doesn't update Portworx. Since previous versions of Portworx do not overide spec from labels, I am still calling SpecFromOpts for backward compatibility.

The err is ignored because going forward, we don't want any StorageClass parsing errors in the k8s driver to block volume creation.

Copy link
Member

Choose a reason for hiding this comment

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

A comment about this would be nice, the code is really confusing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in latest incremental.

@deads2k deads2k removed their assignment Jul 25, 2017
@harsh-px
Copy link
Contributor Author

/test pull-kubernetes-e2e-gce-etcd3

@harsh-px harsh-px force-pushed the fix-vol-param-parsing branch from f2599c1 to c692710 Compare July 27, 2017 23:12
@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 Jul 28, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: harsh-px, jsafrane

Associated issue: 49525

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

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 28, 2017
@fejta-bot
Copy link

/retest
Automatic flake /retester. Please send feedback to @fejta

4 similar comments
@fejta-bot
Copy link

/retest
Automatic flake /retester. Please send feedback to @fejta

@fejta-bot
Copy link

/retest
Automatic flake /retester. Please send feedback to @fejta

@fejta-bot
Copy link

/retest
Automatic flake /retester. Please send feedback to @fejta

@fejta-bot
Copy link

/retest
Automatic flake /retester. Please send feedback to @fejta

@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.

5 similar comments
@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.

@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.

@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.

@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.

@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.

@jsafrane
Copy link
Member

/retest

@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

Automatic merge from submit-queue (batch tested with PRs 49284, 49555, 47639, 49526, 49724)

@k8s-github-robot k8s-github-robot merged commit 6748543 into kubernetes:master Aug 1, 2017
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. 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. 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.

Portworx volume provisioner does not support many volume parameters
6 participants