#2603 PR merged: #2596 Have unused LVM PV devices only as comment in disklayout.conf file

Labels: enhancement, fixed / solved / done

gdha opened issue at 2021-04-21 14:45:

Signed-off-by: Gratien D'haese gratien.dhaese@gmail.com

  • Type: Enhancement

  • Impact: Low

  • Reference to related issue (URL): #2596

  • How was this pull request tested? manually via savelayout

  • Brief description of the changes in this pull request: Do not stop with an Error during the savelayout when we discover a PV that is not part of a VG

jsmeix commented at 2021-04-22 09:09:

@gdha
if you like I could make changes to your pull request.
Do you agree that I change your pull request?

gdha commented at 2021-04-22 09:17:

@jsmeix Be my guest ;-)

jsmeix commented at 2021-04-22 10:31:

@gdha
oops - I changed it very much - I hope you don't mind.
Hopefully with my changes it is still OK for you.

jsmeix commented at 2021-04-22 10:36:

@gdha
I do not like in my current code that the last command in the loop is an error exit.
I would perfer the last line is the normal output when all is ok.
I could re-reorganize the error checking code if you like.

jsmeix commented at 2021-04-22 11:32:

When code looks bad it is bad so I re-reorganized the error checking code:
Now it looks much simpler and it is more straightforward (KISS).
In particular it checks the abort condition first and errors out directly there.

gdha commented at 2021-04-22 12:44:

@jsmeix It is fine for me. Thanks for the rewrite

jsmeix commented at 2021-04-30 10:38:

@gdha
would you like to do more tests before you merge it
or should I merge it right now (provided you agree with my changes)?

jsmeix commented at 2021-05-03 10:23:

When there is no objection I will merge it tomorrow afternoon .


[Export of Github issue for rear/rear.]