Ordering of resources and removal of some defaults in class lvm #100
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, thank you all for this fine module! I have a couple of issues though (and a proposal for solution).
When using the lvm class I discovered that the resources are created in random order, so what happens is, the code fails because the vg can't be created on non-existent pv, mkfs can't create file systems on none-existent logvols and so on. This happens and is reproducable when provision several devices. Another example, vgcreate will fail if the drive has an msdos label (in lack of --yes parameter), which happens often, I guess (given eg clearpart --all in anaconda). However, if those drives are pvcreated first, it works. These problems are addressed in manifests/volume_group.pp line 13 and manifests/logical_volume.pp line 58.
The other issue is with the creation of logical volumes using the lvm class. By the current design one has to provide size parameter (while extents should suffice), and it's assumed that the user want's a filesystem and mountpoint, and the device mounted afterwards. However, there are several use cases where this is not what the user want's (me). What I want is a logical volume without file system, and therefore no mountpoints or mounting either. I have tried to address these issues here without removing any functionality. I do, however, see a caveat with these changes, depending on whether users are using default values for fs_type and mountpath. There may very well be better ways to do this.
I do apologize if dragging two differing issues into one request is bad karma. My experience in these matters are rather limited for now.