Operating System - HP-UX
1836379 Members
2471 Online
110100 Solutions
New Discussion

can I change /etc/nsswitch.conf and not affect Serviceguard?

 
SOLVED
Go to solution
Christine Hartman
Valued Contributor

can I change /etc/nsswitch.conf and not affect Serviceguard?

I'm new to serviceguard...and wanted to know if it cares when you make any changes to the /etc/nsswitch.conf. I want to change it to use DNS first and then files second for name resolution. I need to be able to say with confidence that the serviceguard stuff won't be affected by this change.

Thanks.
5 REPLIES 5
Geoff Wild
Honored Contributor
Solution

Re: can I change /etc/nsswitch.conf and not affect Serviceguard?

SG does use it - and the recommended way for SG is to have files first.

If you mean by will a package go down? no - it won't.

SG won't failover packages due to slow resolution - but you could have timig issues - IE - say the DNS server goes down, well, resolution will be slow:

If you have a non-responsive/down DNS server configured in your /etc/resolv.conf the resolver will retry 4 times after its initial request then give and error similar to this:

"Cant find server name for address X.X.X.X: No response from server"

Then it will move on to the next nameserver in your resolv.conf file, if that server is not available it repeats the retry, times out and goes to the next server.

This can happen up to 3 times, depending on the # of nameserver entries you have in your /etc/resolv.conf.

The timeouts are doubled each time a retry is attempted.

timeout 1 ( 5 seconds)
timeout 2 (10 seconds)
timeout 3 (20 seconds)
timeout 4 (40 seconds)

So a total of 75 seconds for each nameserver that may be unavailable.

If you have 3 thats 225 seconds 3.75 minutes..which is forever.

You can adjust these timeouts in the /etc/resolv.conf file with the retry and retrans options. See man page for resolv.conf.

For example, to have a system wait 1 second for a reply and retry 1 time after
a timeout:

retrans 1000
retry 1


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
A. Clay Stephenson
Acclaimed Contributor

Re: can I change /etc/nsswitch.conf and not affect Serviceguard?

As long as you have DNS entries defined for the package addresses before changing the nsswitch.conf file then you should have no problems. The packages actually use IP addresses rather than hostnames in their configuration files. If your package startup scripts or monitors make use of some hostname related functions then you could have problems but as long as everything that is defined in /etc/hosts is also defined in DNS then you should be fine. Even if the hostnames are missing from DNS then DNS will be searched first and then files so you will still function although you might suffer a performance problem is the packages are doing many hostname resolutions but this is not common in packages.
If it ain't broke, I can fix that.
melvyn burnard
Honored Contributor

Re: can I change /etc/nsswitch.conf and not affect Serviceguard?

Will it affect Serviceguard? Well if the DNS server does not have all the correct entries, then it may cause slight delays.
However, it is a recommendation with SG clusters that you use FILES first before DNS, as losing connectivity or functionality of the DNS server could severely impact a cluster.

The choice is yours.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Christine Hartman
Valued Contributor

Re: can I change /etc/nsswitch.conf and not affect Serviceguard?

ok thanks....maybe I will not change the nsswitch.conf file then. The problem was an oracle app trying to resolve to FQDN...well in the /etc/hosts files the FDQN name is listed second instead of first...it sounds like oracle is using gethostbyname vs. gethostname, which is why I wanted to point over to DNS first (dns returns the FQDN, short name is in CNAME field of output).
I was wondering why the /etc/hosts file contained a ton of entries (looks like they're not using dns at all).
melvyn burnard
Honored Contributor

Re: can I change /etc/nsswitch.conf and not affect Serviceguard?

Oracle should still be able to resolvethe hostname correctly using the entries in /etc/hosts, but I have seen "funnies" when the /etc/hosts file permissions were set to a value that prevented Oracle user from reading the file.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!