fix parsing the output of parted in parted.list_() #23124
Merged
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.
Hi there,
Parsing the output of parted may fail in partition.list (in the code: parted.list_).
Here is an example of such a case:
At
salt/salt/modules/parted.py
Line 182 in 6560839
To correct this, I simply changed cmd.run to cmd.run_stdout since the message Warning: Not all of the space available to /dev/sdb appears to be used, you can fix the GPT to use all of the space (an extra 44662784 blocks) or continue with the current setting? is written on stderr.
The log with the path of this pull request on a test virtual machine:
May be related to #16188 (some other things are bugging me, but I can not directly work around this one).