-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
LVM many small fixes #58133
Merged
Merged
LVM many small fixes #58133
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- The LVM commands does a lot of tests before any destructive operation. Usually these tests prompts questions and waits for the user answers. But the user is not there to answer any of them. - Some functions in the module have a "force" parameter which defaults the answers to "yes". Others have the "yes" hardcoded. And others yet have the "force" parameter in examples e documentation but no code to handle it. - Added the "force" parameter on all destructive operations. - Those functions which previously have the "yes" hardcoded, had the "force" parameter defaulted to "True" - Functions which didn't have the "force" parameter have it defaulted to "False" and now the "False" forces all answers to be "no". - Also, added the parameter "resizefs" to lvm.lvresize
- pvcreate and pvremove from linux_lvm execution module raises a trackback when they should fail graciously. - Initial work to remove the trackbacks and substitute then with clean failures.
- Fixed the tests for pvcreate and pvremove from linux_lvm so they didn't expect a trackback as return anymore. - The exception trackback cleaning is done.
- Added new functions to linux_lvm.py module - lvextend to increase the size of a logical volume and - pvresize to resize a physical volume to the current physical device size.
- Added tests for pvresize and lvextend - Added support to shrink a LVM logical volume in state lvm.lv_present - Added support to resize filesystem in state lvm.lv_present - Fixed linux_lvm.py modules to have some output even with '-qq' - Adjusted tests in test_linux_lvm and test_lvm to complies with the modifications in linux_lvm module and lvm state. Most of them to handle the change from cmd.run to cmd.run_all
cmcmarrow
approved these changes
Aug 10, 2020
@piterpunk thanks for the PR. Its good to be merged. |
dwoz
approved these changes
Aug 24, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR does a few visible changes:
This PR does also an invisible change to the user, default answers.
Some LVM commands asks questions to the user, but the user isn't there to answer any of them. To avoid this situation, we used the "force" paramenter to set the default answers. It's invisible because the current behaviour is preserved. The functions that already had the "yes" or "force" hardcoded are now with the "force" defaulted to True. The functions that didn't have it, now have the "force" defaulted to False.
What issues does this PR fix or reference?
Fixes: #52363 #56089
Merge requirements satisfied?
Commits signed with GPG?
No