kubernetes-sigs / vsphere-csi-driver

vSphere storage Container Storage Interface (CSI) plugin
https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/index.html
Apache License 2.0
296 stars 179 forks source link

attempt to logout and clear idle sessions before creating new one #2930

Closed adikul30 closed 3 months ago

adikul30 commented 3 months ago

What this PR does / why we need it:

After the current VC session is determined to be invalid, we can attempt to logout of that session and clear any idle sessions associated with that govmomiClient before creating a new client and a new session.

After testing on DSM clusters, they found idle sessions were not piling up as before.

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

Testing done:

Block-vanilla

Build #2853 (Jun 26, 2024, 9:53:06 PM)
adkulkarni
PR 2930
------------------------------ Ran 1 of 877 Specs in 373.242 seconds SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 876 Skipped PASS Ginkgo ran 1 suite in 7m13.584881461s Test Suite Passed -- ------------------------------ Ran 2 of 877 Specs in 3841.310 seconds SUCCESS! -- 2 Passed | 0 Failed | 1 Flaked | 0 Pending | 875 Skipped PASS Ginkgo ran 1 suite in 1h4m18.245782855s Test Suite Passed -- ------------------------------ Ran 12 of 877 Specs in 1036.846 seconds SUCCESS! -- 12 Passed | 0 Failed | 0 Pending | 865 Skipped Ginkgo ran 1 suite in 17m34.240638449s Test Suite Passed

Build #2848 (Jun 26, 2024, 7:35:40 PM)
adkulkarni
PR 2930
------------------------------ Ran 12 of 877 Specs in 1036.231 seconds SUCCESS! -- 12 Passed | 0 Failed | 0 Pending | 865 Skipped Ginkgo ran 1 suite in 18m13.516747066s Test Suite Passed 

Special notes for your reviewer:

Release note:

adikul30 commented 3 months ago

/ok-to-test

k8s-ci-robot commented 3 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adikul30, divyenpatel

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: - ~~[OWNERS](https://github.com/kubernetes-sigs/vsphere-csi-driver/blob/master/OWNERS)~~ [adikul30,divyenpatel] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment