[Puppet Users] Re: Using file and mount more efficiently

2013-09-24 Thread jcbollinger


On Monday, September 23, 2013 2:58:30 PM UTC-5, Forrie wrote:
>
> If Puppet were to manage /home/something, an NFS mount, and ensure it's 
> mounted... it would automatically look to see if both /home and / were also 
> mounted?
>


No.  Puppet manages only the resources you tell it to manage.  Indeed, for 
the most part it manages only the properties you specify of the resources 
you tell it to manage.  What makes you think differently?

 

>   
>
> In most cases, on our older systems, /home is actually just on / -- a full 
> partition that sits on a raid5 layer.   So, at best, Puppet would just get 
> a standard error that / and /home are already present and mounted.
>
> What I'm concerned about is:
>
> - Ensuring the directories are present, with correct permissions and 
> ownership
>
>

That's Puppet's bread & butter.

 

> - Ensuring that the NFS mount is active and available  (possibly send out 
> an error vis syslog if not)
>
>

I'm not sure what you mean.  You want a remote NFS filesystem recorded in 
/etc/fstab?  No sweat.  You also want it mounted?  No problem.

You want to manage properties of the mount point directory other than its 
presence, and also ensure the remote filesystem is mounted?  You can't even 
do that manually unless you are willing to have a service interruption on 
the remote filesystem.  If that's OK, though, then you can do it with 
Puppet.

 

> - NOT causing some bizarre cascade of mount issues by Puppet repeatedly 
> attempting to fix something it cannot, in the case of an error that 
> requires manual intervention.
>
>

Are you talking about Puppet's reports and / or log output, or what?  
Puppet only manages what you tell it to manage.  It will not cause or 
report on a "bizarre cascade of mount issues", but it will certainly tell 
you about each failure or inability to put an aspect of the target node 
into the state that you specified it should be in.

 

> Our environment is growing substantially, to the point where manually 
> editing fstab is becoming a real PITA, and also creates an environment for 
> inconsistencies (and minor typos).   So I really need Puppet to manage 
> those mounts.
>
>

It can.

 

> I'm not sure I would need automounter for these.   
>
>

You never *need* the automounter, and if you are declaring all needed 
filesystems in /etc/fstab then you don't want to automount them, too.  But 
automounting could provide a useful alternative to your growing problem 
with managing fstab.  It also provides for automatic *un*mounting of 
inactive filesystems, which can be a big advantage in some situations.


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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Using file and mount more efficiently

2013-09-23 Thread Forrie
If Puppet were to manage /home/something, an NFS mount, and ensure it's 
mounted... it would automatically look to see if both /home and / were also 
mounted?   

In most cases, on our older systems, /home is actually just on / -- a full 
partition that sits on a raid5 layer.   So, at best, Puppet would just get 
a standard error that / and /home are already present and mounted.

What I'm concerned about is:

- Ensuring the directories are present, with correct permissions and 
ownership

- Ensuring that the NFS mount is active and available  (possibly send out 
an error vis syslog if not)

- NOT causing some bizarre cascade of mount issues by Puppet repeatedly 
attempting to fix something it cannot, in the case of an error that 
requires manual intervention.

Our environment is growing substantially, to the point where manually 
editing fstab is becoming a real PITA, and also creates an environment for 
inconsistencies (and minor typos).   So I really need Puppet to manage 
those mounts.

I'm not sure I would need automounter for these.   



Thanks!




On Friday, September 20, 2013 9:30:35 AM UTC-4, jcbollinger wrote:
>
>
>
> On Thursday, September 19, 2013 1:43:07 PM UTC-5, Forrie wrote:
>>
>> This is something I've been concerned about -- and how to properly 
>> approach this.
>>
>> For example, we can use Puppet to ensure that the directories (mount 
>> points) exist and that the entries are present in /etc/fstab -- but I grow 
>> very concerned about automating the NFS-mount part of this.
>>
>> I don't think we'd want to use autofs, as the namespace isn't visible 
>> unless you "cd" directly into it.   We nixed this idea with /home, for 
>> example.
>>
>
>
> A nitpick: you don't specifically have to "cd" into an automounted 
> filesystem to get it mounted; any access at all to the mount point itself 
> or any child path will do ('ls', fopen(3), I/O redirection, etc.).  A child 
> path works to get the filesystem mounted even if it doesn't actually 
> correspond to a real file.
>
> In a few places I use symlinks to automounted directories.  The symlinks 
> provide visibility in the expected location, but I get all the goodness of 
> automounting (however much that may or may not be).
>
>  
>
>>
>> What would be the safest ideal way to approach this?
>>
>>
>
> It's not clear what exactly you hope to achieve.  Is it different from 
> what declaring a Mount with ensure => 'present' will do (which is to ensure 
> the fs is listed in fstab without managing whether it is mounted)?
>
> You cannot get around the fact that it is impossible to see or touch the 
> mount point directory underneath a mounted filesystem.  Any access to the 
> mount point path refers to the root of the mounted filesystem instead.  
> That is a matter of fundamental Unix architecture, quite outside Puppet's 
> scope.
>
>
> 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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Using file and mount more efficiently

2013-09-20 Thread jcbollinger


On Thursday, September 19, 2013 1:43:07 PM UTC-5, Forrie wrote:
>
> This is something I've been concerned about -- and how to properly 
> approach this.
>
> For example, we can use Puppet to ensure that the directories (mount 
> points) exist and that the entries are present in /etc/fstab -- but I grow 
> very concerned about automating the NFS-mount part of this.
>
> I don't think we'd want to use autofs, as the namespace isn't visible 
> unless you "cd" directly into it.   We nixed this idea with /home, for 
> example.
>


A nitpick: you don't specifically have to "cd" into an automounted 
filesystem to get it mounted; any access at all to the mount point itself 
or any child path will do ('ls', fopen(3), I/O redirection, etc.).  A child 
path works to get the filesystem mounted even if it doesn't actually 
correspond to a real file.

In a few places I use symlinks to automounted directories.  The symlinks 
provide visibility in the expected location, but I get all the goodness of 
automounting (however much that may or may not be).

 

>
> What would be the safest ideal way to approach this?
>
>

It's not clear what exactly you hope to achieve.  Is it different from what 
declaring a Mount with ensure => 'present' will do (which is to ensure the 
fs is listed in fstab without managing whether it is mounted)?

You cannot get around the fact that it is impossible to see or touch the 
mount point directory underneath a mounted filesystem.  Any access to the 
mount point path refers to the root of the mounted filesystem instead.  
That is a matter of fundamental Unix architecture, quite outside Puppet's 
scope.


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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Using file and mount more efficiently

2013-09-19 Thread Forrie
This is something I've been concerned about -- and how to properly approach 
this.

For example, we can use Puppet to ensure that the directories (mount 
points) exist and that the entries are present in /etc/fstab -- but I grow 
very concerned about automating the NFS-mount part of this.

I don't think we'd want to use autofs, as the namespace isn't visible 
unless you "cd" directly into it.   We nixed this idea with /home, for 
example.

What would be the safest ideal way to approach this?


Thanks!




On Sunday, August 25, 2013 2:57:24 AM UTC-4, jcbollinger wrote:
>
>
> On Sunday, August 25, 2013 1:54:09 AM UTC-5, jcbollinger wrote:
>>
>> Therefore, unless you do something to ensure your FS unmounted before the 
>> File is applied, the File will sometimes manage the local directory, but 
>> other times manage the remote one.  That may be tolerable, [...]
>>
>  
> I should clarify: it probably is NOT tolerable to unmount and remount the 
> FS during every Puppet run, but it might be tolerable to have Puppet manage 
> the remote filesystem root when that is already mounted.
>  
>  
> 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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Using file and mount more efficiently

2013-08-24 Thread jcbollinger

On Sunday, August 25, 2013 1:54:09 AM UTC-5, jcbollinger wrote:
>
> Therefore, unless you do something to ensure your FS unmounted before the 
> File is applied, the File will sometimes manage the local directory, but 
> other times manage the remote one.  That may be tolerable, [...]
>
 
I should clarify: it probably is NOT tolerable to unmount and remount the 
FS during every Puppet run, but it might be tolerable to have Puppet manage 
the remote filesystem root when that is already mounted.
 
 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Using file and mount more efficiently

2013-08-24 Thread jcbollinger

On Wednesday, August 21, 2013 1:39:05 PM UTC-5, Forrie wrote:
>
> I have several NFS mounts to manage, on many systems.  On each system, I 
> must ensure that the root directory and path exist and have the correct 
> permissions beforehand, then ensure they are mounted in Puppet.
>  
>
 
What Nick and Peter jointly described is certainly the approach I would 
take to a problem of this general nature, but I want to point out that this 
particular problem has another dimension that may cause you trouble: 
conflation of the mount point directory and the root of the remote file 
system.
 
This is not so much a Puppet issue as a Unix one: while a filesystem is 
mounted on (say) /home/directory1, all references to that path are resolved 
to the root of the mounted filesystem, whereas when nothing is mounted 
there the path refers to the mount point directory.  Therefore, unless you 
do something to ensure your FS unmounted before the File is applied, the 
File will sometimes manage the local directory, but other times manage the 
remote one.  That may be tolerable, but it will not work if you want 
different properties for the mount point than for the root of the 
filesystem mounted on it.
 
 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.