On Wed, Aug 4, 2010 at 12:32 PM, Rob McBroom <mailingli...@skurfer.com>wrote:
> I'm trying to use the native `mount` type for the first time and I seem to > have encountered a bug. Here's a simple test I put together: > > mount { "/unixteam": > device => "some_server:/vol/UnixTeam", > fstype => "nfs", > options => "_netdev,vers=3,tcp,rsize=8192,wsize=8192,noauto", > } > > When Puppet runs, it sees the changes and acts like it's making them: > > # puppet mount.pp > notice: //Mount[/unixteam]/device: defined 'device' as > 'some_server:/vol/UnixTeam' > notice: //Mount[/unixteam]/fstype: defined 'fstype' as 'nfs' > notice: //Mount[/unixteam]/options: defined 'options' as > '_netdev,vers=3,tcp,rsize=8192,wsize=8192,noauto' > notice: //Mount[/unixteam]/pass: defined 'pass' as '0' > notice: //Mount[/unixteam]/dump: defined 'dump' as '0' > notice: //Mount[/unixteam]: Refreshing self > > Seems like *ensure* must be defined otherwise this behaviour is followed, I was able to reproduce your results, here the output with debug and trace filtered by mount. debug: Prefetching parsed resources for mount debug: //Node[foo.com]/Mount[/mnt]: Changing device,fstype,options,pass,dump debug: //Node[foo.com]/Mount[/mnt]: 5 change(s) notice: //Node[foo.com]/Mount[/mnt]/device: defined 'device' as 'bar.com: /vol/test' notice: //Node[foo.com]/Mount[/mnt]/fstype: defined 'fstype' as 'nfs' notice: //Node[foo.com]/Mount[/mnt]/options: defined 'options' as 'rw,bg,hard,nfsvers=3,tcp,nointr,timeo=600' notice: //Node[foo.com]/Mount[/mnt]/pass: defined 'pass' as '0' notice: //Node[foo.com]/Mount[/mnt]/dump: defined 'dump' as '0' debug: Flushing mount provider target /etc/fstab notice: //Node[foo.com]/Mount[/mnt]: Refreshing self debug: Puppet::Type::Mount::ProviderParsed: Executing '/bin/mount' Running Puppet v0.24.8 > But the changes aren't made. If you run Puppet again, it will give the same > output because the mount isn't actually defined in `/etc/fstab`. (If you add > it by hand, Puppet will be silent because there’s nothing to change.) But > you can see from looking at the first three lines of `fstab` that Puppet has > touched it: > > # HEADER: This file was autogenerated at Wed Aug 04 11:40:37 -0400 2010 > # HEADER: by puppet. While it can still be managed manually, it > # HEADER: is definitely not recommended. > > If I add `ensure => present`, the entry gets added, but according to the > documentation, "if the filesystem is currently mounted, it will be > unmounted". > > I don't want Puppet to unmount (or mount) it. I just want it defined in > `fstab` so it can be easily mounted as needed. Can that be done? > I sounds like the use case you are looking for is not supported, as you want it only in fstab but not perform any action, e.g. if mounted it should keep mounted, or if unmounted leave it unmounted. > Thanks. > > -- > Rob McBroom > <http://www.skurfer.com/> > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-us...@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com<puppet-users%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > -- Tony http://blog.tonyskapunk.net -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.