linux-system-roles / storage

Ansible role for linux storage management
https://linux-system-roles.github.io/storage/
MIT License
100 stars 59 forks source link

feat: PV resize support #438

Closed japokorn closed 3 months ago

japokorn commented 5 months ago

There is an usecase when the physical device size can change (e.g. on VM). We need to be able to change the size of the LVM PV to accomodate that. This adds a new pool parameter grow_to_fill. When set, pool PVs will try to take all available space on their respective devices. Defaults to False.

Requires blivet version that supports this feature. For tests this is checked by using does_library_support script.

Storage role development often relies on blivet library and changes in it. Whether or not is specific feature supported by blivet is usually determined by blivet version. That is a cumbersome process, especially when the feature has not yet been added into blivet and the version has to be guessed.

Added script does_library_support verifies existence of the feature by using python introspection and asking for existence of specific item in the library (e.g. blivet.formats.lvmpv.LVMPhysicalVolume.grow_to_fill). The script is supposed to be used for the tests only.

Blivet PR: #1229 JIRA issue: STORAGECFG-743

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 0% with 13 lines in your changes missing coverage. Please review.

Project coverage is 11.57%. Comparing base (acd20be) to head (957534e). Report is 18 commits behind head on main.

:exclamation: Current head 957534e differs from pull request most recent head 0572eca

Please upload reports for the commit 0572eca to get more accurate results.

Files Patch % Lines
library/blivet.py 0.00% 13 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #438 +/- ## ========================================== - Coverage 16.54% 11.57% -4.98% ========================================== Files 2 8 +6 Lines 284 1806 +1522 Branches 79 0 -79 ========================================== + Hits 47 209 +162 - Misses 237 1597 +1360 ``` | [Flag](https://app.codecov.io/gh/linux-system-roles/storage/pull/438/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linux-system-roles) | Coverage Δ | | |---|---|---| | [sanity](https://app.codecov.io/gh/linux-system-roles/storage/pull/438/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linux-system-roles) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linux-system-roles#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

spetrosi commented 5 months ago

[citest]

japokorn commented 5 months ago

[citest]

richm commented 4 months ago

[citest]

japokorn commented 4 months ago

Issues seem unrelated to this change since they are currently happening in the main branch as well.

richm commented 4 months ago

please rebase on top of the latest main branch to pick up test fixes

richm commented 3 months ago

@japokorn please rebase on top of latest main branch and then we can merge