On Tue, Feb 22, 2011 at 10:43:36AM -0800, Nigel Kersten wrote:
> [...]
>
> Yep. We're going to treat the device much like "content" on the file
> type to try and be consistent.
>
> mount { "/mnt/a": ensure => unmounted, }
> # Will ensure nothing is mounted at /mnt/a
>
> mount { "/mnt/a": ensure => mounted, }
> # Will ensure something is mounted at /mnt/a, if no device info is
> available from fstab, fail.
>
> mount { "/mnt/a": ensure => unmounted, device => "/dev/sda4" }
> # Will ensure nothing is mounted at /mnt/a, device is essentially irrelevant
>
> mount { "/mnt/a": ensure => mounted, device => "/dev/sda4" }
> # Will ensure /dev/sda4 is mounted at /mnt/a
>
>
> Does that match your expectations Stefan?
> Yes that does match my expectations. I'm just curious to know how you would implement this. The current patch returns unmounted in case of »wrong device mounted« so that puppet remounts when it tries to enforce ensure=>mounted. Now the following can happen should: device => /dev/sda1 in fstab: device => /dev/sda1 actually mounted: device => /dev/sda2 Should puppet now report »device out of sync«? What if fstab states '/dev/sda3'? What is the current value of »device«? Or you can create a new value for ensure like "uncorrectly mounted". Then the user would see "ensure is 'uncorrectly mounted' should be 'mounted'". I dont know if thats such a helpful message. -Stefan
pgpB8OC9FY2gF.pgp
Description: PGP signature
