diskimage-builder/diskimage_builder/block_device
Ian Wienand 7302f38f97 Move LVM cleanup phase into cleanup
A recap -- we run umount phase then cleanup phase.

Currently we register a object to do the final LVM cleanup based on
the parent PV.  In light of I697bfbf042816c5ddf170bde9534cc4f0c7279ff,
I believe this should just be done in the cleanup phase.  Note there
was probably additional confusion because the partition removal was
done in the cleanup phase until
I7af3c5cf66afd81a481f454b5207af552ad52a32, where is was moved into the
umount phase.

Thus it is moved into the cleanup() function and this should now run,
per the comment, after everything is unmounted in umount phase.

This also exposes that we didn't have the cleanup phase in the unit
tests (because it wasn't doing anything I guess).  Add it.

Change-Id: I1c5f4ffc9619c774f78d21b918a81647b3dc28f5
2018-07-30 14:35:16 +10:00
..
level0 Move localloop to exec_sudo 2018-06-29 11:22:24 +10:00
level1 Move LVM cleanup phase into cleanup 2018-07-30 14:35:16 +10:00
level2 Convert labels to upper case 2018-06-19 11:12:54 +02:00
level3 Don't fstrim vfat partitions 2018-01-23 13:24:09 +11:00
level4 Move rollback into NodeBase object 2017-06-08 17:14:20 +10:00
tests Move LVM cleanup phase into cleanup 2018-07-30 14:35:16 +10:00
__init__.py Clear __init__.py from cmd move 2017-05-11 18:52:14 +10:00
blockdevice.py Set default label for XFS disks 2018-01-29 15:10:08 +11:00
cmd.py Refactor: use lazy logging 2017-05-30 14:39:58 +10:00
config.py Update pylint to 1.7.6, uncap networkx 2018-07-18 09:27:01 +10:00
exception.py Move exception to it's own file (again) 2017-05-20 06:44:39 +00:00
plugin.py Move rollback into NodeBase object 2017-06-08 17:14:20 +10:00
utils.py Move localloop to exec_sudo 2018-06-29 11:22:24 +10:00