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

[3006.x] Remove wmic usage from disk grains on Windows #66968

Merged
merged 3 commits into from
Oct 17, 2024

Conversation

twangboy
Copy link
Contributor

@twangboy twangboy commented Oct 14, 2024

What does this PR do?

The wmic binary is being deprecated on Windows. Newer releases of Windows are starting to come with the binary disabled. This can be enabled, but we should probably migrate to something else.

This PR will migrate the "disk" grain from using wmic to using the PowerShell commandlet "Get-PhysicalDisk".

What issues does this PR fix or reference?

Fixes #66959

Previous Behavior

A stack trace would occur and disk grains would be missing.

New Behavior

No stack trace, disk grains are present

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

@twangboy twangboy requested a review from a team as a code owner October 14, 2024 22:23
@salt-project-bot-prod-environment salt-project-bot-prod-environment bot changed the title Remove wmic usage from disk grains on Windows [3006.x] Remove wmic usage from disk grains on Windows Oct 14, 2024
dmurphy18
dmurphy18 previously approved these changes Oct 14, 2024
@twangboy twangboy self-assigned this Oct 16, 2024
@dwoz dwoz merged commit 98f49eb into saltstack:3006.x Oct 17, 2024
181 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TECH DEBT] Micosoft has declared deprecation of wmic, replaced by Powershell for WMI
3 participants