On Jun 24, 2009, at 6:20 AM, Sven Mueller wrote:

>
> Luke Kanies schrieb:
>> On Jun 22, 2009, at 9:54 AM, Sven Mueller wrote:
>>
>>> I currently have a problem setting up fstab options without
>>> interfering
>>> with whatever software is currently using the mounts (or not).
>>> More precisely, these are devices shared between two hosts where  
>>> only
>>> one host can have them mounted at a time (via DRBD).
>>>
>>> The behaviour I'm trying to achieve is similar to what the service
>>> type
>>> allows: Set defaults without changing its current state (ensure vs.
>>> enable). Back to the mount type, this means I want the type to allow
>>> updating of /etc/fstab (or netinfo) without having an effect on the
>>> current status of the mount.
>>>
>>> Currently the type allows for ensure:
>>> absent => unmount, remove from /etc/fstab
>>> present => add to/update in /etc/fstab, mount
>>>
>>> What I would like would be (but see below):
>>>
>>> absent => remove from /etc/fstab (I don't care about the unmount  
>>> here)
>>> mounted => ensure its correctly in /etc/fstab, make sure its mounted
>>> present => ensure its correctly in /etc/fstab, remount if already
>>>          mounted and options changed
>>> perhaps: unmounted => ensure its in fstab, make sure not mounted
>>
>> The 'present' value should mean 'in fstab but not mounted'.  Are you
>> not seeing that behaviour?
>
> That's precisely the behaviour I see (and that is causing me  
> problems).
>
>> If that is working, do you still need a behaviour change?
>
> Perhaps my intention was unclear:
> The behaviour I need is:
>
> make sure the entry is in fstab as specified, but don't touch the  
> actual
> mounting state of the mount point (i.e. leave it unmounted if it is  
> not
> mounted, leave it mounted if it already is, optionally remount it if  
> it
> is already mounted but with the wrong set of options).
>
> This is a behaviour that I currently can't achieve withe the "mount"  
> type.

Ah; you want to specify the presence but not specify the mount state.   
Hmm.

>
>>> So as not to change the current semantics of the type, we could
>>> introduce a new parameter: handle_mount with values:
>>>
>>> true => unmount/mount like before
>>> false => never mount/unmount/remount
>>> remount_only => only remount if mounted and options changed,
>>>               don't mount/unmount
>>>
>>> I currently worked around the issue by using a rather complicated
>>> exec.
>>> Should I open a ticket?
>>>
>>> regards,
>>> Sven
>>>
>>> PS: While my Ruby skills certainly improved over the past weeks, I
>>> still
>>> don't understand types/provides in puppet fully yet... I will try to
>>> take a stab at implementing this next weekend perhaps...

I like the idea, but I'm not too stoked with the implementation.   
Having a separate attribute that's only sometimes used seems clumsy.   
That being said, I don't have a better idea, either.

Anyone have any other ideas on how to specify this?

-- 
Somebody has to do something, and it's just incredibly pathetic that it
has to be us. --Jerry Garcia
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com
To unsubscribe from this group, send email to 
puppet-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to