Sorry, just got back to this.  Looks like the leases file contents were not 
relevant.    It appears that the hostname is set in /etc/sysconfig/network 
ipcalc.ksh.  As you can see from ipcalc.ksh.old, it strips any domain name that 
is returned by “host $IP” off.   The following patch should fix it, but I’m 
guessing I’m going to have to build a new installer image.   Still working on 
that.

[root@drdkvm0003 scripts]# diff ipcalc.ksh.old ipcalc.ksh
130c130
<                             HOSTNAME=$(host $IP 2>/dev/null | awk '{print 
$5}' | awk -F. '{print $1}')
>                             # Change here to prevent stripping of domain name 
> from HOSTNAME
>                             HOSTNAME=$(host $IP 2>/dev/null | awk '{print 
> $5}' | sed -e 's/\.$//' )

There are other places that the domain name is stripped, for example, below, 
but fixing these doesn’t affect the final hostname.

[root@drdkvm0003 scripts]# diff post.rh.common.old post.rh.common
34c34,35
< export HOSTNAME=$(host $IP 2>/dev/null | awk '{print $5}' | awk -F. '{print 
$1}')
---
> export HOSTNAME=$(host $IP 2>/dev/null | awk '{print $5}' | sed -e 's/\.$//' )

Note: all during the install, the hostname is fully qualified.   It doesn’t end 
up with the truncated hostname until after the first boot.



From: Bruce M Potter [mailto:[email protected]]
Sent: Monday, November 26, 2012 1:43 PM
To: xCAT Users Mailing list
Subject: Re: [xcat-user] Can a short hostname be converted to a FQDN during an 
install?


Remember that that attribute hosts.hostnames is really aliases that you want 
defined for the node in name resolution (/etc/hosts and dns).  Yes, the 
attribute is poorly named, but it doesn't have anything to do with what 
hostname is set to on the node.  I think a very simple postscript is the way to 
go.

Bruce Potter        STSM, Linux & AIX Cluster Development, IBM, Poughkeepsie, NY
Email: [email protected]<mailto:[email protected]>    Phone:  external: 
845-433-7073, internal: TL 293-7073


[Inactive hide details for Xiao Peng Wang ---11/20/2012 10:21:07 PM---Looks 
like the current code logic does not handle the case]Xiao Peng Wang 
---11/20/2012 10:21:07 PM---Looks like the current code logic does not handle 
the case the customer set the hostname for the nod

From: Xiao Peng Wang <[email protected]<mailto:[email protected]>>
To: xCAT Users Mailing list 
<[email protected]<mailto:[email protected]>>,
Cc: "'xCAT Users Mailing list'" 
<[email protected]<mailto:[email protected]>>
Date: 11/20/2012 10:21 PM
Subject: Re: [xcat-user] Can a short hostname be converted to a FQDN during an 
install?

________________________________



Looks like the current code logic does not handle the case the customer set the 
hostname for the node in the host.hostname. The correct code logic should be to 
check the 'host.hostname' when add the hostname entry for the node to the 
dhcpd.leases file.

You could try to take a look of addnode() in the dhcp.pm


Thanks
Best Regards
----------------------------------------------------------------------
Wang Xiaopeng (王晓朋)
IBM China System Technology Laboratory
Tel: 86-10-82453455
Email: [email protected]<mailto:[email protected]>
Address: 28,ZhongGuanCun Software Park,No.8 Dong Bei Wang West Road, Haidian 
District Beijing P.R.China 100193

[Inactive hide details for "Pocina, Goran" ---2012/11/21 05:37:16---We'd like 
to use short hostnames as all of our keys in the x]"Pocina, Goran" 
---2012/11/21 05:37:16---We'd like to use short hostnames as all of our keys in 
the xCAT tables, to save typing, and have the

From: "Pocina, Goran" 
<[email protected]<mailto:[email protected]>>
To: "'xCAT Users Mailing list'" 
<[email protected]<mailto:[email protected]>>,
Date: 2012/11/21 05:37
Subject: [xcat-user] Can a short hostname be converted to a FQDN during an 
install?
________________________________



We’d like to use short hostnames as all of our keys in the xCAT tables, to save 
typing, and have the FQDN assigned as the hostname after an install.

We could fix the hostname with a postscript,  or perhaps a Kickstart statement, 
however we’d prefer to have it done more transparently.

It would be great if we could use something like a regex in 
“network.nodehostname=”/\z/.nyc.desres.deshaw.com/” to do this automatically:

[root@drdkvm0003 dump1]# lsdef -t network 149_77_52_0-255_255_254_0
Object name: 149_77_52_0-255_255_254_0
   ddnsdomain=nyc.desres.deshaw.com
   domain=nyc.desres.deshaw.com
   dynamicrange=149.77.53.132-149.77.53.191
   gateway=149.77.52.10
   mask=255.255.254.0
   mgtifname=!remote!
   nameservers=149.77.52.53,149.77.52.35,10.232.15.130
   net=149.77.52.0
   nodehostname=/\z/.nyc.desres.deshaw.com/
   ntpservers=149.77.52.24,149.77.52.41,149.77.52.138,149.77.52.129
   tftpserver=149.77.53.252


But this doesn’t seem to have any effect on the DHCP host-name entry generated 
in the leases file, or on the “HOSTNAME=develkv8” entry put in 
/etc/sysconfig/network after the install.

BTW.   We do have the FQDN listed first in /etc/hosts and DNS:

[root@develkv8 ~]# hostname
develkv8
[root@develkv8 ~]# host 149.77.53.121
121.53.77.149.in-addr.arpa domain name pointer develkv8.nyc.desres.deshaw.com.
[root@develkv8 ~]# grep develkv8 /etc/hosts
>>>   149.77.53.121          develkv8.nyc.desres.deshaw.com develkv8       # 
>>> row 0 rack 0 rank 0

Is there a transparent way to do this?

Thanks.------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov_______________________________________________
xCAT-user mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/xcat-user
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov_______________________________________________
xCAT-user mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/xcat-user

<<inline: image001.gif>>

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
xCAT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xcat-user

Reply via email to