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

Cinder volume attacher: use instanceID instead of NodeID when verifying attachment #39998

Merged
merged 2 commits into from
Feb 10, 2017

Conversation

DukeXar
Copy link
Contributor

@DukeXar DukeXar commented Jan 17, 2017

What this PR does / why we need it: Cinder volume attacher incorrectly uses NodeID instead of openstack instance id, so that reconciliation fails.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #39978

Special notes for your reviewer:

Release note:

Fixed checking of InstanceID when attaching OpenStack Cinder volume.

@k8s-ci-robot
Copy link
Contributor

Hi @DukeXar. 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 @k8s-bot 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.

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-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Jan 17, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@DukeXar
Copy link
Contributor Author

DukeXar commented Jan 17, 2017

@k8s-ci-robot I signed it!

@DukeXar DukeXar force-pushed the cinder_instance_id branch from 148bac9 to c53cf22 Compare January 17, 2017 08:58
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jan 17, 2017
@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note-label-needed labels Jan 17, 2017
@resouer
Copy link
Contributor

resouer commented Jan 17, 2017

@k8s-bot ok to test

return volumesAttachedCheck, err
}

attachedResult, err := attacher.cinderProvider.DisksAreAttached(volumeIDList, instanceid)
Copy link
Contributor

@resouer resouer Jan 17, 2017

Choose a reason for hiding this comment

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

It would be better to have a unit test to verify this change.

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

@DukeXar DukeXar force-pushed the cinder_instance_id branch from c53cf22 to d1ed363 Compare January 17, 2017 22:17
@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. and removed cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 18, 2017
@DukeXar DukeXar force-pushed the cinder_instance_id branch from 832c297 to 0842b90 Compare January 18, 2017 01:53
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jan 18, 2017
@DukeXar DukeXar force-pushed the cinder_instance_id branch from 0842b90 to 084d801 Compare January 18, 2017 01:55
@k8s-github-robot k8s-github-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 18, 2017
test: func(testcase *testcase) (string, error) {
attacher := newAttacher(testcase)
attachments, err := attacher.VolumesAreAttached([]*volume.Spec{spec}, nodeName)
return serializeAttachments(attachments), err
Copy link
Contributor Author

Choose a reason for hiding this comment

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

serializeAttachments

Does not look like the best thing to do, open for suggestions on what is idiomatic in Go

return volumesAttachedCheck, err
}

attachedResult, err := attacher.cinderProvider.DisksAreAttached(volumeIDList, instanceid)
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

@resouer
Copy link
Contributor

resouer commented Jan 18, 2017

Leave rest of this to @saad-ali for final review, thanks a lot!

@xsgordon
Copy link

xsgordon commented Feb 6, 2017

@idvoretskyi can you add the sig/openstack label?

@jsafrane jsafrane added the area/provider/openstack Issues or PRs related to openstack provider label Feb 7, 2017
@jsafrane jsafrane added release-note-none Denotes a PR that doesn't merit a release note. and removed release-note-label-needed labels Feb 7, 2017
@jsafrane
Copy link
Member

no response from @saad-ali, I reviewed it by myself
/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

The following people have approved this PR: DukeXar, jsafrane

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 Feb 10, 2017
@jsafrane
Copy link
Member

@k8s-bot node e2e test this

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 41246, 39998)

@k8s-github-robot k8s-github-robot merged commit 6ea92b4 into kubernetes:master Feb 10, 2017
@resouer
Copy link
Contributor

resouer commented Feb 13, 2017

@DukeXar Congratulations! ㊗️ ! Enjoy the contribution.

@DukeXar
Copy link
Contributor Author

DukeXar commented Feb 22, 2017

@resouer Thanks. Do I need to cherry-pick it manually to get into the release 1.5?

@DukeXar
Copy link
Contributor Author

DukeXar commented Feb 23, 2017

@jsafrane does it need to have a milestone and a release note in order to be cherry-picked into the 1.5? I am a bit confused with the process.

@jsafrane jsafrane added this to the v1.6 milestone Feb 23, 2017
@jsafrane
Copy link
Member

@DukeXar, I added milestone and cherrypick-candidate label, IMO that should be enough

@DukeXar DukeXar deleted the cinder_instance_id branch February 23, 2017 09:04
@enisoc enisoc modified the milestones: v1.5, v1.6 Mar 23, 2017
k8s-github-robot pushed a commit that referenced this pull request Jul 5, 2017
…8-upstream-release-1.5

Automatic merge from submit-queue

Automated cherry pick of #39998

Cherry pick of #39998 on release-1.5.

#39998: Cinder volume attacher: use instanceID not NodeID
@k8s-cherrypick-bot
Copy link

Commit found in the "release-1.5" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked.

dims pushed a commit to dims/kubernetes that referenced this pull request Feb 8, 2018
Automatic merge from submit-queue (batch tested with PRs 41246, 39998)

Cinder volume attacher: use instanceID instead of NodeID when verifying attachment

**What this PR does / why we need it**: Cinder volume attacher incorrectly uses NodeID instead of openstack instance id, so that reconciliation fails.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes kubernetes#39978 

**Special notes for your reviewer**:

**Release note**:

```release-note
```
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. area/provider/openstack Issues or PRs related to openstack provider 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-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cinder volumes attacher uses NodeName instead of instanceID
10 participants