1752297 Members
4469 Online
108786 Solutions
New Discussion юеВ

Re: HOSTNAME vs NODENAME

 
SOLVED
Go to solution
Helen French
Honored Contributor

Re: HOSTNAME vs NODENAME

May be this document will give some information (TKB #S3100000875):

http://support2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000047556885

Life is a promise, fulfill it!
Jeff Schussele
Honored Contributor

Re: HOSTNAME vs NODENAME

Shiju,

Thanks...
So it appears that unless the env parm NODENAME is explicitly set by someone or a script, then NODENAME is pulled from the HOSTNAME field in netconf - correct?

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Kim Kendall
Regular Advisor

Re: HOSTNAME vs NODENAME

ok... uname -S gets them sync'd back up, but after a reboot... it reverts back to what it was and now NODENAME != HOSTNAME.

I had already tried to run set_parms hostname but that doesn't sync them up.

Does anybody know where uname is getting it's nodename variable from?
Alan Riggs
Honored Contributor

Re: HOSTNAME vs NODENAME

The uname information is not, to teh best of my knowledge, stored in any flat file. The uname commands point to a structure in kernel memory (if my kernalized memory serves me well) defined in utsname.h. Normally, when a system boots the /sbin/init.d/hostname script will run the uname -S command to set the uname value to be equal to the root of the HOSTNAME variable (everything before the first ".", in case a domainname is specified) defined in /etc/rc.config.d netconf.

See:
man uname (2 and 1M)
James R. Ferguson
Acclaimed Contributor

Re: HOSTNAME vs NODENAME

Hi Jeff:

If NODENAME is undefined, HOSTNAME is used. Have a look at '/sbin/init.d/hostname'. You will see that 'uname -s...' is issued based on HOSTNAME if NODENAME is empty.

Regards!

...JRF...
Helen French
Honored Contributor

Re: HOSTNAME vs NODENAME

Did you check for a parameter "NODENAME=" in the /etc/rc.config.d/netconf file ?

Check the above pointed link.
Life is a promise, fulfill it!
Kim Kendall
Regular Advisor

Re: HOSTNAME vs NODENAME

yes i did... and removed it.
Jeff Schussele
Honored Contributor

Re: HOSTNAME vs NODENAME

OK great thanks guys...

Kim,
So then it appears there has to be a script or a person setting the env var NODENAME for them to get out of sync.

Think you've got some detective work to do.

Good Luck,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
James R. Ferguson
Acclaimed Contributor

Re: HOSTNAME vs NODENAME

Hi (again) Kim:

Yes, you lose the nodename manually set after a boot. As I indicated, declare it as NODENAME in '/etc/rc.config.d/netconf'.

See also my post above, regarding '/sbin/init.d/hostname'.

Regards!

...JRF...
Alan Riggs
Honored Contributor

Re: HOSTNAME vs NODENAME

If it is being set incorrectly after reboot, then you have an incorrect HOSTNAME variable being set in /etc/rc.config.d/*. It might not be in netconf, though. I suspect that someone did something like cp netconf netconf.bak, and then changed the hostname in netconf. Tis is a bad thing. The /sbin/init.d/ sequence sources ALL of /etc/rc.config.d/* when establishing environmental variables for sacripts. So if netconf.bak comes after netconf in an ls, then it has teh values which will be used.