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 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? 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-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Wed, Aug 4, 2010 at 12:32 PM, Rob McBroom <mailinglist0@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-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@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-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Aug 4, 2010, at 3:11 PM, Tony G. wrote:>> 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.Yes, that appears to be the case. I tested the “present” value just to see the actual behavior because I thought the documentation must be wrong, but it does in fact unmount the thing: notice: //Mount[/unixteam]/ensure: ensure changed ''mounted'' to ''present'' I don’t understand this behavior. Why on Earth would I want to define something in `fstab` that is guaranteed to get unmounted at some random time in the next 30 minutes? -- 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-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Thu, Aug 5, 2010 at 7:41 AM, Rob McBroom <mailinglist0@skurfer.com>wrote:> On Aug 4, 2010, at 3:11 PM, Tony G. wrote: > > >> 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. > > Yes, that appears to be the case. I tested the “present” value just to see > the actual behavior because I thought the documentation must be wrong, but > it does in fact unmount the thing: > > notice: //Mount[/unixteam]/ensure: ensure changed ''mounted'' to ''present'' > > I don’t understand this behavior. Why on Earth would I want to define > something in `fstab` that is guaranteed to get unmounted at some random time > in the next 30 minutes? > > Open a Feature Request if you find your use case required. :)> -- > 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-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@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-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.