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

[PR #7304/324c22f6 backport][stable-7] Prevent parted warnings in script mode #7365

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Oct 8, 2023

This is a backport of PR #7304 as merged into main (324c22f).

SUMMARY

Add automatic answer "fix" when script mode -s is used with parted version >= 3.4.64

Comments from the project parted :
automatically answer exceptions with "fix" in script mode, which is useful for:
GPT header not including full disk size;
moving the backup GPT table to the end of the disk;
MAC fix missing partition map entry;
etc.
see: https://www.mail-archive.com/[email protected]/msg00369.html

Fixes #1653 #1461

minor_changes:

  • parted - on resize, use --fix option if available
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

parted

ADDITIONAL INFORMATION

just use -f with -s and resizepart in the same command.


Before:
When you enhance the drive on the vcenter, and refresh in the OS, the community.general.parted with resize=true hang like that:

Warning: Not all of the space available to /dev/sdx appears to be used, you can fix the GPT to use all of the space (an extra xxxxx blocks) or continue with the current setting? 
Error: Unable to satisfy all constraints on the partition.

After:
the resize is done correctly.

* Prevent parted warnings in script mode

* Update parted.py with check parted version

* Typo

* Create 7304-prevent-parted-warnings.yml

* Update 7304-prevent-parted-warnings.yml

* Update 7304-prevent-parted-warnings.yml

* Update 7304-prevent-parted-warnings.yml

* Update 7304-prevent-parted-warnings.yml

* Update 7304-prevent-parted-warnings.yml

* Update changelogs/fragments/7304-prevent-parted-warnings.yml

Co-authored-by: Felix Fontein <[email protected]>

* Update plugins/modules/parted.py

Co-authored-by: Felix Fontein <[email protected]>

* Update parted.py - simplification

---------

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit 324c22f)
@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added backport bug This issue/PR relates to a bug module module new_contributor Help guide this first time contributor plugins plugin (any type) labels Oct 8, 2023
@felixfontein felixfontein merged commit ef8fb88 into stable-7 Oct 8, 2023
141 checks passed
@felixfontein felixfontein deleted the patchback/backports/stable-7/324c22f6129864ea69ce866b19ca58fd8857b25c/pr-7304 branch October 8, 2023 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug module module new_contributor Help guide this first time contributor plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants