Re: [Puppet Users] Re: Clarification on mount type behaviour

2017-03-30 Thread Stefan Schulte

Hi

On 30.03.2017 14:57, jcbollinger wrote:


mounted.  But perhaps it doesn't have to be limited that way.  Expanding
its scope to cover the options with which the filesystem is actually
mounted seems like a reasonable feature request.  And if you don't want
to wait, then very likely you can roll your own by writing and using an
extension of the existing "parsed" provider that adds the behavior you want.


John


actually there is an ancient one

https://projects.puppetlabs.com/issues/6309

that finally ended in a forge module

https://forge.puppet.com/puppetlabs/mount_providers

The problem is that if you describe the desired value (e.g. options => 
"ro"), what is the current value? The value in /etc/fstab or in 
/proc/self/mounts?


The forge module solves this dilemma by introducing two separate types 
(that can be abstracted again to one define) but since the original 
intention was to merge this back into core and this never happened I am 
not sure of the general quality of this module. When it was first 
released (which is a while back now) it introduced issues that had been 
solved in the original mount provider and have been reintroduced in the 
module (e.g. https://projects.puppetlabs.com/issues/4914) so make sure 
the module is usable first.


- Stefan

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/a9c1f057-b005-4a03-e48e-8cf82bc8f7d3%40posteo.de.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Clarification on mount type behaviour

2017-03-30 Thread jcbollinger


On Wednesday, March 29, 2017 at 6:36:01 AM UTC-5, apgrif...@gmail.com wrote:
>
> Hi,
>
> From my testing it seems that when managing mount resources puppet only 
> compares the manifest against fstab and not mtab. For example if I have
>
> mount { '/tmp':
>   ensure  => mounted,
>   options => 'noexec,nodev,nosuid',
> }
>
> And then do mount -o remount,exec /tmp
>
> I would expect the next puppet run to correct this, but I'm not seeing 
> this, only if I edit fstab is the resource updated. Is this expected 
> behavior?
>
>
It is the longtime behavior associated with the "parsed" provider for the 
Mount resource type (the only provider for that type included in the box).  
The documentation does not explicitly say that mtab is ignored, but if you 
read carefully then you will find that the behavior is characterized in 
some places in terms of the "filesystem table" and in at least one place 
explicitly in terms of fstab.  Look in particular at the documentation for 
Mount.ensure 
.

Overall, then, the Mount resource type primarily manages entries in fstab, 
and only secondarily manages whether the designated filesystem is mounted.  
But perhaps it doesn't have to be limited that way.  Expanding its scope to 
cover the options with which the filesystem is actually mounted seems like 
a reasonable feature request.  And if you don't want to wait, then very 
likely you can roll your own by writing and using an extension of the 
existing "parsed" provider that adds the behavior you want.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/3be04523-0565-4ed8-9fe8-54e2bb8f812f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.