Skip to content

Conversation

@barneysowood
Copy link
Collaborator

@barneysowood barneysowood commented Nov 26, 2025

What does this PR do?

Fixes issue with disk.tune passing incorrect args of "read-only", "read-write" rather than "setro" and "setrw" to blockdev.

Also cleans up handling of args, so that "read-only" and "read-write" can only have a value of True - they can't be negated.

Adds checking of return status from blockdev - that was just being discarded.

What issues does this PR fix or reference?

Fixes 68490

Previous Behavior

Calling the function with read-write=True or read-only=True would show and error from blockdev and fail to make the change. Despite this it would not return a failure.

New Behavior

Options work correctly and change state of blockdevice.

Other incorrect args such as read-only=False or read-write=False will now raise a SaltInvocationError.

Failures in blockdev will raise a CommandExecutionError

Merge requirements satisfied?

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

Commits signed with SSH key?

Yes

Fixes issue with disk.tune passing incorrect args of "read-only",
"read-write" rather than "setro" and "setrw" to blockdev.

Also cleans up handling of args, so that "read-only" and "read-write"
can only have a value of True - they can't be negated.

Adds checking of return status from blockdev - that was just being
discarded.
@barneysowood barneysowood force-pushed the 68490-disk-tune-fixes branch from f46a00f to 848148b Compare December 2, 2025 16:28
@barneysowood barneysowood changed the base branch from master to 3006.x December 2, 2025 16:28
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.

1 participant