puppet link and automount

61 views
Skip to first unread message

Arnau Bria

unread,
Apr 23, 2015, 6:44:37 AM4/23/15
to puppet...@googlegroups.com
Hello all,

we had some NFS mounts in /nfs/mount1. Then we created a link
from /nfs/mount1 to /mount1. Both resources were defined using puppet
(mount and file). As the mounts were defined in fstab, the file
resource was applied every time with no problem (it ensured that the
link was created).

Now we have moved from fstab mounts to automount, and now the file
resource that creates the link triggers an automatic mount everytime
puppet runs (not desired).

A part from creating those links in an exec, anyone has a better idea on
how to manage this somehow more elegant?

TIA,
Arnau

Peter Bukowinski

unread,
Apr 23, 2015, 7:19:06 AM4/23/15
to puppet...@googlegroups.com
Is automounting directly at /mount1 out of the question?

--
Peter

jcbollinger

unread,
Apr 23, 2015, 9:53:27 AM4/23/15
to puppet...@googlegroups.com
Puppet needs to gather information about the managed file (symlink) on every run.  I don't see why this would need to involve the link target being stat()ed, but if it does, and if the target path is on an autofs file system, then that will trigger a mount.

It shouldn't make a difference to set links => 'manage' on the File resource, as that pertains to recursive operations, but you could give it a shot.  Otherwise, I don't see how this issue could be worked around at the DSL level without abandoning use of a File resource to manage the symlink.  It may be that Puppet itself could be fixed to avoid the behavior you observe, but that's a whole different story.


John


Julien Pivotto

unread,
Apr 23, 2015, 10:02:29 AM4/23/15
to puppet...@googlegroups.com
On Thu, Apr 23, 2015 at 06:53:27AM -0700, jcbollinger wrote:
>
>
> On Thursday, April 23, 2015 at 5:44:37 AM UTC-5, Arnau wrote:
> >
> > Hello all,
> >
> > we had some NFS mounts in /nfs/mount1. Then we created a link
> > from /nfs/mount1 to /mount1. Both resources were defined using puppet
> > (mount and file). As the mounts were defined in fstab, the file
> > resource was applied every time with no problem (it ensured that the
> > link was created).
> >
> > Now we have moved from fstab mounts to automount, and now the file
> > resource that creates the link triggers an automatic mount everytime
> > puppet runs (not desired).
> >
> > A part from creating those links in an exec, anyone has a better idea on
> > how to manage this somehow more elegant?
> >
> >
>
> Puppet needs to gather information about the managed file (symlink) on
> every run. I don't see why this would need to involve the link *target*
> being stat()ed, but if it does, and if the target path is on an autofs file
> system, then that will trigger a mount.

Maybe replace => no might help as well.


--
(o- Julien Pivotto
//\ Open-Source Consultant
V_/_ Inuits - https://www.inuits.eu
signature.asc

Arnau Bria

unread,
Apr 27, 2015, 5:07:35 AM4/27/15
to puppet...@googlegroups.com
Thanks to both.
I'm going to give it a try.

Cheers,
Arnau
Reply all
Reply to author
Forward
0 new messages