Skip to content

Rescan disks before resize operations on Windows#2881

Open
torredil wants to merge 1 commit intokubernetes-sigs:masterfrom
torredil:windows-8891929391
Open

Rescan disks before resize operations on Windows#2881
torredil wants to merge 1 commit intokubernetes-sigs:masterfrom
torredil:windows-8891929391

Conversation

@torredil
Copy link
Member

What type of PR is this?

/kind cleanup

What is this PR about? / Why do we need it?

Both CSI proxy mounters have had a Rescan() method in the interface since they were written, but it was never actually called anywhere. This wires it up before Resize operations on Windows so the host storage cache is refreshed (see https://learn.microsoft.com/en-us/powershell/module/storage/update-hoststoragecache) before we query disk sizes or extend a filesystem. Today, resize works without rescanning but this adds a safety margin against any edge case where the cache might be stale and its also a cheap call to make, so I consider it a defensive best practice.

Rescan errors are logged and not treated as fatal since the resize and size check operations that follow are what actually matter.

How was this change tested?

make update && make verify && make test

CI

Does this PR introduce a user-facing change?

Rescan disks before resize operations on Windows.

Signed-off-by: Eddie Torres <torredil@amazon.com>
@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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 27, 2026
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign bertinatto for approval. For more information see the Code Review Process.

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

Details 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 size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Feb 27, 2026
@github-actions
Copy link

Code Coverage Diff

This PR does not change the code coverage

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 2, 2026
@ElijahQuinones
Copy link
Member

/lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

3 participants