Karl Kopper wrote:
-----Original Message-----
From: Brent N. Chun [mailto:[EMAIL PROTECTED]

When we do this on node 1 everything works as expected:

On host unfiwcl1 --

unfiwcl1:/# echo $GEXEC_SVRS
unfiwcl1 unfiwcl2 unfiwcl3 unfiwcl4
unfiwcl1:/# gexec -n 0 hostname
1 unfiwcl2
0 unfiwcl1
2 unfiwcl3
3 unfiwcl4

However, when I run the same command on node 3 it doesn't work

the same way:

On host unfiwcl3 --

unfiwcl3:/# echo $GEXEC_SVRS
unfiwcl1 unfiwcl2 unfiwcl3 unfiwcl4
unfiwcl3:/# gexec -n 0 hostname
1 unfiwcl2
0 unfiwcl1       <-- Gexec node 0 is cluster node "1"
3 unfiwcl4
2 unfiwcl1       <-- Gexec node 2 _should_ be "3" (the localhost)

Have you tried checking /etc/hosts on unfiwcl3?

Since GEXEC_SVRS is set, the n nodes that get picked are simply the
first n hostnames/IPs defined in GEXEC_SVRS.  There's no need for
localhost to be first in the list.

bnc


Hi Brent,

Thanks for your reply.

We use NIS. Here is the config followed by a ping example.
(Same config as on the node that works as far as I can tell). This is Red
Hat 7.3.

unfiwcl3:/# cat /etc/hosts
 # Do not remove the following line, or various programs
 # that require network functionality will fail.
 127.0.0.1               unfiwcl3 localhost.localdomain localhost

Here's how nsswitch.conf is configured:

 unfiwcl3:/# cat /etc/nsswitch.conf | grep hosts
 hosts:      files nis dns

Well, this tells you why unfiwcl3 is resolving to loopback. I haven't been paying as much attention to this thread (or gexec in general *shifts uneasily*) as is probably necessary to understand the relevance of all this, though.

But when nsswitch says to use /etc/hosts first, then NIS, then DNS for a query... it's no wonder you're getting a hit from /etc/hosts and not querying NIS at all.

Two "fixes" for this (either solution may affect other processes which rely on name resolution in unforeseen ways, proceed carefully):

* Remove "files" from or rearrange the order of the hosts: line in /etc/nsswitch.conf.
*  Remove "unfiwcl3" from /etc/hosts.

I never tell people how to manage their own affairs but I can tell you that I've got access to a Redhat 7.2 box here that's operating as a trouble-free NIS client without having its regular hostname in /etc/hosts pointing to loopback. 127.0.0.1 points only to localhost and localhost.localdomain.

Good luck...


Reply via email to