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

Return serial number in ListDiskIDs #116

Merged
merged 1 commit into from
Mar 8, 2021

Conversation

wongma7
Copy link
Contributor

@wongma7 wongma7 commented Feb 26, 2021

What type of PR is this?
/kind feature

What this PR does / why we need it: For aws ebs csi driver, this will help me to map disk number (e.g. 5) to volume ID (e.g. vol0cea9d623bc50cdbd).

Reference script that uses SerialNumber from Get-Disk to print out a table with disk number and volume ID columns https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-windows-volumes.html#list-nvme-powershell

Sample response. Note how disks without serial number are just blank.
E0226 00:05:46.369668 4596 node_windows.go:46] response: diskIDs:<key:"0" value:<identifiers:<key:"page83" value:"01000000766f6c30a002dc3231f9d001" > identifiers:<key:"serialNumber" value:"vol02190fee5da4d75e3_00000001." > > > diskIDs:<key:"1" value:<identifiers:<key:"page83" value:"4d53465420202020fab3b2c87668fa4cb45895b4d7179184" > identifiers:<key:"serialNumber" value:"" > > > diskIDs:<key:"2" value:<identifiers:<key:"page83" value:"4d53465420202020cee945791f1f404380765f3a5d180adb" > identifiers:<key:"serialNumber" value:"" > > > diskIDs:<key:"3" value:<identifiers:<key:"page83" value:"4d5346542020202037fc320d6ebce047b085967210a2c14c" > identifiers:<key:"serialNumber" value:"" > > > diskIDs:<key:"4" value:<identifiers:<key:"page83" value:"4d5346542020202037fc320d6ebce047b085967210a2c14c" > identifiers:<key:"serialNumber" value:"" > > > diskIDs:<key:"5" value:<identifiers:<key:"page83" value:"01000000766f6c30a002dc6365f1d001" > identifiers:<key:"serialNumber" value:"vol0cea9d623bc50cdbd_00000001." > > >

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Include Serial Numbers in ListDiskIDs response

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 26, 2021
@k8s-ci-robot
Copy link
Contributor

Welcome @wongma7!

It looks like this is your first PR to kubernetes-csi/csi-proxy 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-csi/csi-proxy has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 26, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @wongma7. Thanks for your PR.

I'm waiting for a kubernetes-csi 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.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Feb 26, 2021
@ayberk
Copy link

ayberk commented Feb 26, 2021

/lgtm

@k8s-ci-robot
Copy link
Contributor

@ayberk: changing LGTM is restricted to collaborators

In response to this:

/lgtm

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.

@jingxu97
Copy link
Contributor

jingxu97 commented Mar 5, 2021

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jingxu97, wongma7

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 5, 2021
@jingxu97
Copy link
Contributor

jingxu97 commented Mar 5, 2021

/test pull-kubernetes-csi-csi-proxy

Path string `json:"Path"`
type Disk struct {
Path string `json:"Path"`
SerialNumber string `json:"SerialNumber"`
Copy link
Contributor

Choose a reason for hiding this comment

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

@jingxu97 @ddebroy do we also need to bump the api version?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is an internal type not exported through the client APIs. So no API version bump needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Specifically, keeping the types of disk identifiers generic at https://github.com/kubernetes-csi/csi-proxy/blob/master/client/api/disk/v1beta2/api.proto#L71 helped.

@ddebroy
Copy link
Contributor

ddebroy commented Mar 8, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 8, 2021
@ddebroy
Copy link
Contributor

ddebroy commented Mar 8, 2021

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 8, 2021
@k8s-ci-robot k8s-ci-robot merged commit 7dff4b1 into kubernetes-csi:master Mar 8, 2021
pohly added a commit to pohly/csi-proxy that referenced this pull request Mar 18, 2021
1d60e77 Merge pull request kubernetes-csi#131 from pohly/kubernetes-1.20-tag
9f10459 prow.sh: support building Kubernetes for a specific version
fe1f284 Merge pull request kubernetes-csi#121 from kvaps/namespace-check
8fdf0f7 Merge pull request kubernetes-csi#128 from fengzixu/master
1c94220 fix: fix a bug of csi-sanity
a4c41e6 Merge pull request kubernetes-csi#127 from pohly/fix-boilerplate
ece0f50 check namespace for snapshot-controller
dbd8967 verify-boilerplate.sh: fix path to script
9289fd1 Merge pull request kubernetes-csi#125 from sachinkumarsingh092/optional-spelling-boilerplate-checks
ad29307 Make the spelling and boilerplate checks optional
5f06d02 Merge pull request kubernetes-csi#124 from sachinkumarsingh092/fix-spellcheck-boilerplate-tests
48186eb Fix spelling and boilerplate errors
71690af Merge pull request kubernetes-csi#122 from sachinkumarsingh092/include-spellcheck-boilerplate-tests
981be3f Adding spelling and boilerplate checks.
2bb7525 Merge pull request kubernetes-csi#117 from fengzixu/master
3b6d17b Merge pull request kubernetes-csi#118 from pohly/cloud-build-timeout
9318c6c cloud build: double the timeout, now 1 hour
4ab8b15 use the tag to replace commit of csi-test
5d74e45 change the csi-test import path to v4
7dcd0a9 upgrade csi-test to v4.0.2
86ff580 Merge pull request kubernetes-csi#116 from andyzhangx/export-image-name
c3a9662 allow export image name and registry name
c6a88c6 Merge pull request kubernetes-csi#113 from xing-yang/install_snapshot_controller
45ec4c6 Fix the install of snapshot CRDs and controller
5d874cc Merge pull request kubernetes-csi#112 from xing-yang/cleanup
79bbca7 Cleanup
d437673 Merge pull request kubernetes-csi#111 from xing-yang/update_snapshot_v1_rc
57718f8 Update snapshot CRD version

git-subtree-dir: release-tools
git-subtree-split: 1d60e7792624a9938c0bd1b045211fbb89e513d6
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/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

6 participants