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

fix: support disk discovery on Windows Gen2 and v6 VM sku #2671

Merged

Conversation

andyzhangx
Copy link
Member

@andyzhangx andyzhangx commented Nov 25, 2024

What type of PR is this?
/kind bug

What this PR does / why we need it:
fix: support disk discovery on Windows Gen2 and v6 VM sku

Windows team provided the following info:

  • normal scsi data disk
    "Model": "Microsoft Virtual Disk"
  • v6 nvme controller data disk
    "Model": "Virtual_Disk NVME Premium"

thus I think we could use this filter: ConvertTo-Json @(Get-CimInstance win32_diskdrive | Where-Object { $_.Model -eq "Virtual_Disk NVME Premium" -or $_.SCSIPort -Ne 0 } | Select-Object Index, SCSILogicalUnit, SCSITargetId, SCSIPort, SCSIBus, Model), thus we could fix this issue permanently.

  • original query
ConvertTo-Json @(Get-Disk | select Number, Location)
 - scsi data disk
PS C:\> ConvertTo-Json @(Get-CimInstance win32_diskdrive | Where-Object { $_.Model -like "*Virtual?Disk*" } | Select-Object Index, SCSILogicalUnit, SCSITargetId, SCSIPort, SCSIBus, Model)
[
    {
        "Index":  2,
        "SCSILogicalUnit":  0,
        "SCSITargetId":  0,
        "SCSIPort":  3,
        "SCSIBus":  0,
        "Model":  "Microsoft Virtual Disk"
    },
    {
        "Index":  3,
        "SCSILogicalUnit":  1,
        "SCSITargetId":  0,
        "SCSIPort":  3,
        "SCSIBus":  0,
        "Model":  "Microsoft Virtual Disk"
    },
    {
        "Index":  4,
        "SCSILogicalUnit":  2,
        "SCSITargetId":  0,
        "SCSIPort":  3,
        "SCSIBus":  0,
        "Model":  "Microsoft Virtual Disk"
    },
    {
        "Index":  5,
        "SCSILogicalUnit":  3,
        "SCSITargetId":  0,
        "SCSIPort":  3,
        "SCSIBus":  0,
        "Model":  "Microsoft Virtual Disk"
    }
]

- v6 nvme controller data disk
PS C:\hpc> ConvertTo-Json @(Get-CimInstance win32_diskdrive | Where-Object { $_.Model -like "*Virtual?Disk*" } | Select-Object Index, SCSILogicalUnit, SCSITargetId, SCSIPort, SCSIBus, Model)
[
    {
        "Index":  0,
        "SCSILogicalUnit":  0,
        "SCSITargetId":  0,
        "SCSIPort":  0,
        "SCSIBus":  0,
        "Model":  "Virtual_Disk NVME Premium"
    },
    {
        "Index":  2,
        "SCSILogicalUnit":  1,
        "SCSITargetId":  0,
        "SCSIPort":  0,
        "SCSIBus":  0,
        "Model":  "Virtual_Disk NVMe Premium"
    },
    {
        "Index":  3,
        "SCSILogicalUnit":  2,
        "SCSITargetId":  0,
        "SCSIPort":  0,
        "SCSIBus":  0,
        "Model":  "Virtual_Disk NVMe Premium"
    },
    {
        "Index":  4,
        "SCSILogicalUnit":  3,
        "SCSITargetId":  0,
        "SCSIPort":  0,
        "SCSIBus":  0,
        "Model":  "Virtual_Disk NVMe Premium"
    },
    {
        "Index":  5,
        "SCSILogicalUnit":  4,
        "SCSITargetId":  0,
        "SCSIPort":  0,
        "SCSIBus":  0,
        "Model":  "Virtual_Disk NVMe Premium"
    }
]

Which issue(s) this PR fixes:

Fixes #2365, #2661

Requirements:

Special notes for your reviewer:

Release note:

fix: support disk discovery on Windows Gen2 and v6 VM sku

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 25, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 25, 2024
@andyzhangx
Copy link
Member Author

/retest

1 similar comment
@andyzhangx
Copy link
Member Author

/retest

@andyzhangx andyzhangx force-pushed the fix-v6-disk-mount-windows branch from fb0a86f to 3265997 Compare November 26, 2024 06:12
@andyzhangx
Copy link
Member Author

/retest

@andyzhangx andyzhangx force-pushed the fix-v6-disk-mount-windows branch 2 times, most recently from f43c544 to 34b3a33 Compare November 27, 2024 14:27
@andyzhangx
Copy link
Member Author

/retest

@andyzhangx andyzhangx force-pushed the fix-v6-disk-mount-windows branch from 34b3a33 to 7c070fe Compare November 28, 2024 02:37
@andyzhangx
Copy link
Member Author

/retest

@andyzhangx andyzhangx changed the title fix: support disk discovery on v6 nvme controller Windows VM fix: support disk discovery on Windows Gen2 and v6 VM sku Nov 28, 2024
@andyzhangx
Copy link
Member Author

/retest

@andyzhangx andyzhangx merged commit 3da2b22 into kubernetes-sigs:master Nov 28, 2024
22 of 23 checks passed
@andyzhangx
Copy link
Member Author

/cherrypick release-1.31

@k8s-infra-cherrypick-robot

@andyzhangx: new pull request created: #2686

In response to this:

/cherrypick release-1.31

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-sigs/prow repository.

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/bug Categorizes issue or PR as related to a bug. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mounting Disks under NVMe diskcontroller in windows failes
4 participants