Re: [autofs] Autofs weirdness in nsswitch.conf and other stuff...

2007-03-16 Thread Erich Weiler
 You misunderstood.  Each time a lookup occurs the name service switch
 is consulted.

If it is consulted each time a lookup occurs, then why do ldap lookups 
fail if ldap is listed *after* files in nsswitch.conf?  It looks to me 
like when the automounter daemon starts it looks at nsswitch.conf once, 
loads the first options on the automount line (and the second if the + 
option is used) and that's it, nsswitch.conf is never consulted again. 
Looking in /proc/mounts shows automounters listening for specific 
requests only, not simply a name service switch query able type thing. 
Am I misunderstanding the behavior I am seeing?

-erich

___
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs


Re: [autofs] Autofs weirdness in nsswitch.conf and other stuff...

2007-03-15 Thread Erich Weiler
Hi Ian,

Fantastic!  Just what I needed, all is well now.  Thanks a million for 
the insight!

Regards,
erich

Ian Kent wrote:
 On Thu, 2007-03-15 at 15:05 -0700, [EMAIL PROTECTED] wrote:
 Hey all-

 I'm testing out CentOS 5 (i.e. RedHat 5) and and playing around with
 autofs 5.0.1 which is the version that ships with it.  I'm noticing three
 odd things based on what I was seeing in RedHat 4.4 (which has autofs
 4.1.3):

 1: Before, with autofs 4.1.3, I had in /etc/nsswitch.conf:

 automount: files ldap

 And I had some maps in /etc/auto.master that mounted AND I had some maps
 in LDAP that mounted, both worked OK together.  But in Autofs 5.0.1, the
 same line in nsswitch.conf only lets me use whatever is first, i.e. if
 files is listed first it automounts with flat files but not LDAP, or vice
 versa.  Is there any way to get them BOTH working again, or is this a
 nifty feature that has been removed?
 
 That's correct.
 That's the behavior of other industry standard automounters.
 Adding a plus include line at the end of /etc/auto.master (as in the
 default configuration) will allow the inclusion of the LDAP master map
 in the above example.
 
 2: When it loads flat files from auto.master locally, I see all the maps
 mount at once randomly, i.e. if I have 1 map with 10 mounts listed in it,
 I see them ALL mount at once!  Even though I didn't access them.  They
 seem to come and go randomly...  Is this normal with autofs 5?
 
 No, you have a process accessing the filesystems.
 Find out what it is and get an update for it.
 Using debug logging for a little while may help to identify the culprit
 as version 5 logs the requesting pid. Don't forget to make sure daemon.*
 is being logged somewhere. 
 
 3: I used to see this when I did a ps -ef | grep automount in autofs 4.1.3:

 % ps -ef | grep automount
 [EMAIL PROTECTED] ~]# ps -ef | grep automount
 root  3373 1  0 Mar14 ?00:00:00 /usr/sbin/automount
 --timeout=6000 /cluster file /etc/auto.cluster intr
 root  3442 1  0 Mar14 ?00:00:00 /usr/sbin/automount
 --timeout=6000 /share file /etc/auto.share
 root  3489 1  0 Mar14 ?00:00:00 /usr/sbin/automount
 --timeout=60 --ghost /home ldap nisMapName=auto.home,dc=someuniv,dc=edu
 -hard,intr,rw
 root  3565 1  0 Mar14 ?00:00:00 /usr/sbin/automount
 --timeout=60 --ghost /projects ldap
 nisMapName=auto.projects,dc=someuniv,dc=edu -hard,intr,rw

 But now all I see on 5.0.1 is:

 % ps -ef | grep automount:
 root 25274 1  0 14:43 ?00:00:00 automount
 root 25451 18488  0 15:02 pts/100:00:00 grep automount

 Not nearly as descriptive as to *what* is actually live or not...
 
 Yes, version 5 uses POSIX threads instead of processes.
 You won't see the autofs file system mounts in /etc/mtab anymore either.
 Check /proc/mounts to see the autofs mounts and use the list threads
 option in ps if you want more information.
 
 Ian
 

___
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs


Re: [autofs] Autofs hang, centos 4.4

2006-11-17 Thread Erich Weiler
 And if you Ctrl-C two or more times does it then stop?

Yeah, I can try Ctrl-C and Ctrl-D and ESC a hundred times and nothing 
happens (if I'm a regular user).  As root if I try to automount 
something that hangs, I can hit Ctrl-C and it quits.

 So it is mount that's hanging but there isn't a way to cancel the mount
 process. Difficult.

That's basically it.  It's weird.  And it wouldn't be a big deal but 
some of these mounts will often be unavailable due to our network 
topology, so our users will likely scream if they can't Ctrl-C out of a 
hung mount process.

-erich

___
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs


Re: [autofs] automounter w/ LDAP redundant servers

2006-08-03 Thread Erich Weiler
Er, as soon as I turned on debugging to debug it, it magically started 
working.  Automatically looked to the second server when I turned off 
slapd on the first...  Not sure why it wasn't working before...  Feel a 
little sheepish...  Maybe I rebooted the machine after the change had 
been made or something...  grumble

Oh well, I guess it was something weird I was doing that I wasn't aware 
of...  Thanks for chiming in in any case!

ciao, erich

Ian Kent wrote:
 On Wed, 2006-08-02 at 15:40 -0700, Erich Weiler wrote:
 So
 ldap://server1 server2/.

 should work since the ldap_init call, I believe, will take such an
 argument. But then we need to check that autofs isn't getting in the
 road when it reads the ldap string to start with.
 Sounds fantastic!  How can we check that?  :)
 
 I think that putting more than one server in and running autofs with the
 debug option then checking the log may reveal what we need.
 
 Ian

___
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs


Re: [autofs] automounter w/ LDAP redundant servers

2006-08-02 Thread Erich Weiler
 So
 ldap://server1 server2/.
 
 should work since the ldap_init call, I believe, will take such an
 argument. But then we need to check that autofs isn't getting in the
 road when it reads the ldap string to start with.

Sounds fantastic!  How can we check that?  :)

Thanks very much for responding, btw.

ciao, erich


___
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs


[autofs] automounter w/ LDAP redundant servers

2006-08-01 Thread Erich Weiler
Hi ya'll,

I posted about this earlier but received no response...  I was wondering 
if any of you know if I can ask the developers if this is a feature that 
has not been implemented or if I simply am doing something wrong?  Maybe 
point me in the right direction?

ciao, erich

-

Original post:

Question about the linux automounter that comes with fedora core 5...  I
have 3 ldap servers listed in my /etc/openldap/ldap.conf file.  They are
there for redundancy in case the primary server goes down:

/etc/openldap/ldap.conf:

host primary.domain.com slave1.domain.com slave2.domain.com
base dc=domain,dc=com

And it seems that while the primary server is up, the mounts work fine,
but when I take the primary offline, the automounter has trouble finding
the second one.  All other LDAP related actions/queries work with the 
failover server, just the automounter has troubles.

Is AutoFS for linux tweaked such that it will automatically try second
and third failover servers if they are listed in 
/etc/openldap/ldap.conf?  Or am I just doing something wrong maybe?

Thanks for any hints!

ciao, erich

___
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs


[autofs] automounter w/ LDAP redundant servers

2006-07-27 Thread Erich Weiler
Question about the linux automounter that comes with fedora core 5...  I 
have 3 ldap servers listed in my /etc/openldap/ldap.conf file.  They are 
there for redundancy in case the primary server goes down:

/etc/openldap/ldap.conf:

host primary.domain.com slave1.domain.com slave2.domain.com
base dc=domain,dc=com

And it seems that while the primary server is up, the mounts work fine, 
but when I take the primary offline, the automounter has trouble finding 
the second one.  All other LDAP related actions/queries work, just the 
automounter has troubles.

Is AutoFS for linux tweaked such that it will automatically try second 
and third servers if they are listed in ldap.conf?  Or am I just doing 
something wrong?

Thanks for any hints!

ciao, erich

___
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs


[autofs] AutoFS problem with OpenLDAP server

2006-07-26 Thread Erich Weiler
Greetings all-

I have a strange problem with AutoFS under Fedora Core 5.  Can't seem to 
automount via ldap the way I should be able to.  If I have:

automount: files ldap

in /etc/nsswitch.conf, and have:

/projects 
ldap://ldapserver.domain.com/nisMapName=auto.projects,dc=domain,dc=com

in /etc/auto.master, everything works.  However, I don't want my clients 
to be configured this way because I have two redundant OpenLDAP servers 
and would like AutoFS to automatically try a second LDAP server if the 
first one goes down.  So I put this in /etc/nsswitch.conf:

automount: ldap

and tried to restart AutoFS, and got the error:

[EMAIL PROTECTED] default]# /etc/init.d/autofs start
Starting automount: No Mountpoints Defined [  OK  ]
[EMAIL PROTECTED] default]#

But there ARE automount maps in OpenLDAP, as the first method works.  If 
I try the automount command manually, I get this in the logs:

Jul 26 13:06:34 sunbright automount[22965]: starting automounter version 
4.1.4-19, path = /projects, maptype = ldap, mapname = 
nisMapName=auto.projects,dc=domain,dc=com
Jul 26 13:06:34 starbright automount[22965]: lookup(ldap): couldn't bind 
to default server

The server does accept anonymous lookups.  I even watched the traffic 
(via tcpdump) from the client to the server and there was no traffic at 
all!  Seems the client isn't even trying to contact any of my LDAP 
servers.

Does anyone have any ideas as to what's happening?  Like I said I would 
like the automounter to try each of my 3 servers in order listed in 
/etc/ldap.conf, so manually specifying one server in /etc/auto.master 
isn't very appealing...

Thanks in advance for any insight!

ciao, erich

___
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs


Re: [autofs] AutoFS problem with OpenLDAP server

2006-07-26 Thread Erich Weiler
OK, I figured out that AutoFS looks at /etc/openldap/ldap.conf and NOT 
/etc/ldap.conf.  I'm one step closer.  However, when I copy my 
ldap.conf over to /etc/openldap/ldap.conf, and do a /etc/init.d/autofs 
start, it still gives me the:

Starting automount: No Mountpoints Defined

Error at the command line.  I *DO* see traffic to the Openldap server 
this time though, and in the OpenLDAP logs I see:

ber_scanf fmt ({mm}) ber:
ber_scanf fmt ({mm}) ber:
 filter: ((?=undefined)(?=undefined))
ber_scanf fmt ({M}}) ber:
 attrs: automountMapName automountInformation
== limits_get: conn=10642 op=6 dn=[anonymous]
= bdb_search
bdb_dn2entry(dc=domain,dc=com)

So it looks like the automounter is searching for automountMapName and 
automountInformation.  Which is bad, because my maps are in the form 
of nisMapName and nisMapEntry.  Does anyone know if there is an easy 
way to tell the automounter to look for the other attributes?  Or do I 
have to try to set up some kind of aliasing on my OpenLDAP server?

Thanks for your patience with me!

ciao, erich

Erich Weiler wrote:
 Greetings all-
 
 I have a strange problem with AutoFS under Fedora Core 5.  Can't seem to 
 automount via ldap the way I should be able to.  If I have:
 
 automount: files ldap
 
 in /etc/nsswitch.conf, and have:
 
 /projects 
 ldap://ldapserver.domain.com/nisMapName=auto.projects,dc=domain,dc=com
 
 in /etc/auto.master, everything works.  However, I don't want my clients 
 to be configured this way because I have two redundant OpenLDAP servers 
 and would like AutoFS to automatically try a second LDAP server if the 
 first one goes down.  So I put this in /etc/nsswitch.conf:
 
 automount: ldap
 
 and tried to restart AutoFS, and got the error:
 
 [EMAIL PROTECTED] default]# /etc/init.d/autofs start
 Starting automount: No Mountpoints Defined [  OK  ]
 [EMAIL PROTECTED] default]#
 
 But there ARE automount maps in OpenLDAP, as the first method works.  If 
 I try the automount command manually, I get this in the logs:
 
 Jul 26 13:06:34 sunbright automount[22965]: starting automounter version 
 4.1.4-19, path = /projects, maptype = ldap, mapname = 
 nisMapName=auto.projects,dc=domain,dc=com
 Jul 26 13:06:34 starbright automount[22965]: lookup(ldap): couldn't bind 
 to default server
 
 The server does accept anonymous lookups.  I even watched the traffic 
 (via tcpdump) from the client to the server and there was no traffic at 
 all!  Seems the client isn't even trying to contact any of my LDAP servers.
 
 Does anyone have any ideas as to what's happening?  Like I said I would 
 like the automounter to try each of my 3 servers in order listed in 
 /etc/ldap.conf, so manually specifying one server in /etc/auto.master 
 isn't very appealing...
 
 Thanks in advance for any insight!
 
 ciao, erich
 

-- 
===
Erich Weiler
UNIX Systems Administrator
School of Engineering
University of California Santa Cruz
[EMAIL PROTECTED]
===

___
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs


Re: [autofs] AutoFS problem with OpenLDAP server

2006-07-26 Thread Erich Weiler
Hi Jeff,

 The autofs init script in autofs v4 will invoke a command,
 autofs-ldap-auto-master, to determine if there is an auto.master available
 on your ldap server.  It should try 3 schemas before giving up.
 
 You didn't mention whether you actually had an auto.master in ldap.  Do you?

No, I don't have an auto.master in LDAP, I guess I was figuring Linux's 
AutoFS would kind of figure it out like it does with Solaris.  So AutoFS 
requires a auto.master in LDAP?  Do you know what I need to do to tweak 
this by any chance?

Thanks for the response!

ciao, erich

___
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs


Re: [autofs] AutoFS problem with OpenLDAP server

2006-07-26 Thread Erich Weiler
Somehow I feel I didn't send this correctly last time, resending:

Hi Jeff,

  The autofs init script in autofs v4 will invoke a command,
  autofs-ldap-auto-master, to determine if there is an auto.master 
available
  on your ldap server.  It should try 3 schemas before giving up.
 
  You didn't mention whether you actually had an auto.master in ldap. 
Do you?

No, I don't have an auto.master in LDAP, I guess I was figuring Linux's 
AutoFS would kind of figure it out like it does with Solaris.  So AutoFS 
requires a auto.master in LDAP?  Do you know what I need to do to tweak 
this by any chance?  Or maybe point me to a how-to or something of that 
nature?

Thanks for the response!

ciao, erich

___
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs