Skip to content

Conversation

laozc
Copy link
Member

@laozc laozc commented Mar 13, 2025

What type of PR is this?
/kind feature

What this PR does / why we need it:
This PR leverages of WMI interfaces to replace the PowerShell functions for System APIs,
It improves the overall performance of csi-proxy.
Partially for #193

Which issue(s) this PR fixes:

Special notes for your reviewer:
This is part of serial changes for #193 breaking into per-API change.

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 13, 2025
@k8s-ci-robot k8s-ci-robot requested review from carlory and ddebroy March 13, 2025 06:43
@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 Mar 13, 2025
@k8s-ci-robot
Copy link
Contributor

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

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Mar 13, 2025
@laozc laozc changed the title Use WMI to implement iSCSI API for better performance Use WMI to implement iSCSI API to reduce PowerShell overhead Mar 13, 2025
@carlory
Copy link
Member

carlory commented Mar 13, 2025

/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 13, 2025
@laozc laozc force-pushed the wmi-process-iscsi-api branch from 8180563 to 23fdc35 Compare March 13, 2025 11:16
@laozc laozc force-pushed the wmi-process-iscsi-api branch 2 times, most recently from 6e9146e to bc55567 Compare April 18, 2025 14:13
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 22, 2025
@laozc laozc force-pushed the wmi-process-iscsi-api branch from bc55567 to ddd12ba Compare April 23, 2025 04:05
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 23, 2025
@laozc laozc force-pushed the wmi-process-iscsi-api branch from ddd12ba to 5c60a2f Compare May 8, 2025 04:57
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 8, 2025
@laozc laozc changed the title Use WMI to implement iSCSI API to reduce PowerShell overhead feat: Use WMI to implement iSCSI API to reduce PowerShell overhead May 8, 2025
@laozc
Copy link
Member Author

laozc commented May 13, 2025

@andyzhangx Is Azure driver using iSCSI API? Could you verify this API as well?

@mauriciopoppe
Copy link
Member

@laozc
Copy link
Member Author

laozc commented Jun 10, 2025

We have integration testing covering this feature but they don't seem to be enabled in our test pipelines.
The code change passed in my 22H2 machine.

PS C:\Users\Administrator\csi-proxy> $env:ENABLE_ISCSI_TESTS="TRUE"; $env:ETHERNET_NAME="Ethernet0 2"; go test -v -run "^\QTestIscsiAPIGroup\E$" github.com/kubernetes-csi/csi-proxy/integrationtests
=== RUN   TestIscsiAPIGroup
=== RUN   TestIscsiAPIGroup/List/Add/Remove_TargetPortal_(Port=3260)
=== RUN   TestIscsiAPIGroup/List/Add/Remove_TargetPortal_(Port_not_mentioned,_effectively_3260)
=== RUN   TestIscsiAPIGroup/Discover_Target_and_Connect/Disconnect_(No_CHAP)
=== RUN   TestIscsiAPIGroup/Discover_Target_and_Connect/Disconnect_(CHAP)
=== RUN   TestIscsiAPIGroup/Discover_Target_and_Connect/Disconnect_(Mutual_CHAP)
=== RUN   TestIscsiAPIGroup/Full_flow
--- PASS: TestIscsiAPIGroup (64.87s)
    --- PASS: TestIscsiAPIGroup/List/Add/Remove_TargetPortal_(Port=3260) (10.05s)
    --- PASS: TestIscsiAPIGroup/List/Add/Remove_TargetPortal_(Port_not_mentioned,_effectively_3260) (9.92s)
    --- PASS: TestIscsiAPIGroup/Discover_Target_and_Connect/Disconnect_(No_CHAP) (10.10s)
    --- PASS: TestIscsiAPIGroup/Discover_Target_and_Connect/Disconnect_(CHAP) (10.56s)
    --- PASS: TestIscsiAPIGroup/Discover_Target_and_Connect/Disconnect_(Mutual_CHAP) (11.34s)
    --- PASS: TestIscsiAPIGroup/Full_flow (10.97s)
PASS
ok      github.com/kubernetes-csi/csi-proxy/integrationtests    64.936s
Screenshot 2025-06-10 at 14 57 03

Could we say the PR works great based on the testing result,
as the API calls are pretty straightforward in this PR?

@laozc laozc force-pushed the wmi-process-iscsi-api branch 2 times, most recently from fd53815 to dfb404a Compare June 20, 2025 01:29
@laozc laozc force-pushed the wmi-process-iscsi-api branch from 65a3c9f to b5025b7 Compare June 21, 2025 04:02
@laozc laozc force-pushed the wmi-process-iscsi-api branch from b5025b7 to 6556808 Compare June 21, 2025 04:51
@laozc laozc force-pushed the wmi-process-iscsi-api branch from 6556808 to 889967b Compare June 21, 2025 06:59
Copy link
Member

@mauriciopoppe mauriciopoppe left a comment

Choose a reason for hiding this comment

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

lgtm minus a comment about errors

@mauriciopoppe
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: laozc, mauriciopoppe

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 Jun 26, 2025
@mauriciopoppe
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 Jun 26, 2025
@k8s-ci-robot k8s-ci-robot merged commit de04a0b into kubernetes-csi:master Jun 26, 2025
8 checks passed
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-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants