----- the node -----
[root@xcatmn01 postscripts]# lsdef compute1
Object name: compute1
arch=x86_64
currchain=boot
currstate=install rhels6.6-x86_64-compute
groups=compute,ipmi,all
initrd=xcat/osimage/rhels6.6-x86_64-install-compute/initrd.img
installnic=eth0
ip=10.4.4.50
kcmdline=quiet repo=http://!myipfn!:80/install/rhels6.6/x86_64
ks=http://!myipfn!:80/install/autoinst/compute1 ksdevice=eth0
kernel=xcat/osimage/rhels6.6-x86_64-install-compute/vmlinuz
mac=00:25:90:14:FA:30!compute1-s|00:25:90:14:FA:31!compute1|00:25:90:14:f3:49!compute1-m
netboot=xnba
nichostnamesuffixes.ipmi=-m
nichostnamesuffixes.eth0=-s
nicips.eth1=10.4.4.50
nicips.ipmi=10.1.240.50
nictypes.ipmi=Ethernet
nictypes.eth1=Ethernet
nictypes.eth0=Ethernet
nodetype=osi
os=rhels6.6
postbootscripts=otherpkgs
postscripts=syslog,remoteshell,syncfiles,create_root_authorized_keys
primarynic=eth1
profile=compute
provmethod=rhels6.6-x86_64-install-compute
PLEASE NOTE THAT ETH0 IS NOT STATICALLY ASSIGNED
----- the process -----
1. Node boots up
2. Node asks for IP via dhcp (eg 10.2.72.50) on mac=00:25:90:14:FA:30
3. Server assigns the lease IP AND creates 2 DDNS entries:
compute1 A 10.2.72.50
50 PTR compute1-s.poc.lzd.co.
4. Node starts netboot/xNBA process
5. Kickstart starts and asks for DHCP again.
6. Server assigns lease IP and
7. kickstart completes and starts the postscripts from the templates (
/opt/xcat/share/xcat/install/scripts/post.rh.common )
----- Here the problem starts -----
As my primarynic=eth1, the script tries to see if eth1 is up or not. If it
is not, it tries to bring it up.
However Line 41 of /opt/xcat/share/xcat/install/scripts/post.rh.common is
:
8. 41 dhclient eth0
This causes the eth0 interface to get a 2nd IP
9. Server assigns another IP to node (eg. 10.2.72.51) and updates DDNS:
compute1 A 10.2.72.51
51 PTR compute1-s.poc.lzd.co.
So on the server:
[root@xcatmn01 scripts]# host 10.2.72.50
Host 50.72.2.10.in-addr.arpa. not found: 3(NXDOMAIN)
[root@xcatmn01 scripts]# host 10.2.72.51
51.72.2.10.in-addr.arpa domain name pointer compute1.poc.lzd.co.
And on the node:
bash-4.1.2 # ip -4 a s eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen
1000
inet 10.2.72.50/24 brd 10.2.72.255 scope global eth0
inet 10.2.72.51/24 brd 10.2.72.255 scope global eth0
Now to connect to the server, the node address used is '10.2.72.50', but
the ip does not resolve to a name anymore.
So the script /install/postscripts/updateflag.awk keeps on trying to update
the server with it's status, and the server keeps ignoring the update,
leaving it in a stuck state.
I hope this clarifies the problem I face.
Regards
On Mon, Jul 6, 2015 at 9:40 AM, Xiao Peng Wang <[email protected]> wrote:
> In your case, why the first line in my email did not get an IP in your
> scenario? Even your IP changed in the dhcp server, the PRINIC should have
> the first IP in this situation.
> And what's your specific requirement to have two IPs?
>
> IP=$(ip addr show dev $PRINIC | grep inet | grep -v inet6 | awk '{print
> $2}' | head -n 1 | awk -F '/' '{print $1}')
> if [ -z $IP ]
> then
> dhclient eth0
> #IP=$(ifconfig $PRINIC | grep inet | awk '{print $2}' | awk -F:
> '{print $2}')
> IP=$(ip addr show dev $PRINIC | grep inet | grep -v inet6 | awk
> '{print $2}' | head -n 1 | awk -F '/' '{print $1}')
> fi
>
> Thanks
> Best Regards
> ----------------------------------------------------------------------
> Wang Xiaopeng (王晓朋)
> IBM China System Technology Laboratory
> Tel: 86-10-82453455
> Email: [email protected]
> Address: 28,ZhongGuanCun Software Park,No.8 Dong Bei Wang West Road,
> Haidian District Beijing P.R.China 100193
>
> [image: Inactive hide details for Samveen ListReceipient ---2015/07/01
> 12:59:45---The IP didn't change. Instead 2 IPs were assigned to]Samveen
> ListReceipient ---2015/07/01 12:59:45---The IP didn't change. Instead 2 IPs
> were assigned to the interface on the node. However, in the DNS,
>
> From: Samveen ListReceipient <[email protected]>
> To: xCAT Users Mailing list <[email protected]>
> Date: 2015/07/01 12:59
> Subject: Re: [xcat-user] Multiple IPs during postinstall in kickstart
> causing DDNS issues
>
> ------------------------------
>
>
>
> The IP didn't change. Instead 2 IPs were assigned to the interface on the
> node. However, in the DNS, the hostname was now associated with the 2nd IP
> provided to the node, while the updateflag.awk requests go via the 1st IP.
> Thus xcat ignores the flag updates.
>
> On Wed, Jul 1, 2015 at 9:52 AM, Xiao Peng Wang <*[email protected]*
> <[email protected]>> wrote:
>
> I don't see problem to adopt your fix. But what caused the IP change
> of your installnic?
>
> Thanks
> Best Regards
> ----------------------------------------------------------------------
> Wang Xiaopeng (王晓朋)
> IBM China System Technology Laboratory
> Tel: 86-10-82453455
> Email: *[email protected]* <[email protected]>
> Address: 28,ZhongGuanCun Software Park,No.8 Dong Bei Wang West Road,
> Haidian District Beijing P.R.China 100193
>
> [image: Inactive hide details for Samveen ListReceipient ---2015/06/29
> 19:25:22---Hi, My diskful install process gets stuck in the post]Samveen
> ListReceipient ---2015/06/29 19:25:22---Hi, My diskful install process gets
> stuck in the post-install process on the
>
> From: Samveen ListReceipient <*[email protected]*
> <[email protected]>>
> To: xCAT <*[email protected]*
> <[email protected]>>
> Date: 2015/06/29 19:25
> Subject: [xcat-user] Multiple IPs during postinstall in kickstart
> causing DDNS issues
> ------------------------------
>
>
>
>
> Hi,
>
> My diskful install process gets stuck in the post-install process on
> the `updateflag.awk` script. I understand that this happens when the IP of
> the node doesn't resolve to a name.
>
> However, what bothers me is that this is caused by the assignment of 2
> IPs to the `ksdevice`.
>
> The DHCP server deletes the ddns entry for the first IP lease, and
> assigns the details of the 2nd lease in the DNS server. However, the
> updateflag.awk script is communicating via the primary IP (it cannot select
> the secondary IP as the local interface to use).
>
> xCAT Server log entries of the process:
> Jun 29 07:38:43 xcatmn01 dhcpd: DHCPDISCOVER from 00:25:90:14:f8:18
> via 10.2.72.1
> Jun 29 07:38:43 xcatmn01 dhcpd: DHCPOFFER on 10.2.72.9 to
> 00:25:90:14:f8:18 via 10.2.72.1
> Jun 29 07:38:43 xcatmn01 dhcpd: DHCPREQUEST for 10.2.72.9 (10.2.80.2)
> from 00:25:90:14:f8:18 via 10.2.72.1
> Jun 29 07:38:43 xcatmn01 dhcpd: DHCPACK on 10.2.72.9 to
> 00:25:90:14:f8:18 via 10.2.72.1
> Jun 29 07:44:28 xcatmn01 dhcpd: DHCPDISCOVER from 00:25:90:14:f8:18
> via 10.2.72.1
> Jun 29 07:44:28 xcatmn01 dhcpd: ICMP Echo reply while lease 10.2.72.9
> valid.
> Jun 29 07:44:28 xcatmn01 named[32259]: client 10.2.80.2#40866: signer
> "xcat_key" approved
> Jun 29 07:44:28 xcatmn01 named[32259]: client 10.2.80.2#40866:
> updating zone '*poc.lzd.co/IN* <http://poc.lzd.co/IN>': deleting an RR
> at *xcatsn01.poc.lzd.co* <http://xcatsn01.poc.lzd.co/> A
> Jun 29 07:44:28 xcatmn01 dhcpd: if *xcatsn01.poc.lzd.co*
> <http://xcatsn01.poc.lzd.co/> IN TXT
> "00f5c60bb5f8359302de635845435af5aa" rrset exists and
> *xcatsn01.poc.lzd.co* <http://xcatsn01.poc.lzd.co/> IN A 10.2.72.9
> rrset exists delete *xcatsn01.poc.lzd.co* <http://xcatsn01.poc.lzd.co/> IN
> A *10.2.72.9* <http://10.2.72.9/>: success.
> Jun 29 07:44:28 xcatmn01 named[32259]: client 10.2.80.2#49121: signer
> "xcat_key" approved
> Jun 29 07:44:28 xcatmn01 named[32259]: client 10.2.80.2#49121:
> updating zone '*poc.lzd.co/IN* <http://poc.lzd.co/IN>': deleting an RR
> at *xcatsn01.poc.lzd.co* <http://xcatsn01.poc.lzd.co/> TXT
> Jun 29 07:44:28 xcatmn01 dhcpd: if *xcatsn01.poc.lzd.co*
> <http://xcatsn01.poc.lzd.co/> IN A rrset doesn't exist and
> *xcatsn01.poc.lzd.co* <http://xcatsn01.poc.lzd.co/> IN AAAA rrset
> doesn't exist delete *xcatsn01.poc.lzd.co*
> <http://xcatsn01.poc.lzd.co/> IN TXT
> "00f5c60bb5f8359302de635845435af5aa": success.
> Jun 29 07:44:28 xcatmn01 named[32259]: client 10.2.80.2#38415: signer
> "xcat_key" approved
> Jun 29 07:44:28 xcatmn01 named[32259]: client 10.2.80.2#38415:
> updating zone '72.2.10.IN-ADDR.ARPA/IN': deleting rrset at
> '9.72.2.10.IN-ADDR.ARPA' PTR
> Jun 29 07:44:28 xcatmn01 dhcpd: removed reverse map on
> 9.72.2.10.in-addr.arpa.
> Jun 29 07:44:28 xcatmn01 dhcpd: Abandoning IP address *10.2.72.9*
> <http://10.2.72.9/>: pinged before offer
> Jun 29 07:44:36 xcatmn01 dhcpd: DHCPDISCOVER from 00:25:90:14:f8:18
> via 10.2.72.1
> Jun 29 07:44:37 xcatmn01 dhcpd: DHCPOFFER on 10.2.72.10 to
> 00:25:90:14:f8:18 via 10.2.72.1
> Jun 29 07:44:37 xcatmn01 named[32259]: client 10.2.80.2#58725: signer
> "xcat_key" approved
> Jun 29 07:44:37 xcatmn01 named[32259]: client 10.2.80.2#58725:
> updating zone '*poc.lzd.co/IN* <http://poc.lzd.co/IN>': adding an RR
> at '*xcatsn01.poc.lzd.co* <http://xcatsn01.poc.lzd.co/>' A
> Jun 29 07:44:37 xcatmn01 named[32259]: client 10.2.80.2#58725:
> updating zone '*poc.lzd.co/IN* <http://poc.lzd.co/IN>': adding an RR
> at '*xcatsn01.poc.lzd.co* <http://xcatsn01.poc.lzd.co/>' TXT
> Jun 29 07:44:37 xcatmn01 dhcpd: Added new forward map from
> *xcatsn01.poc.lzd.co* <http://xcatsn01.poc.lzd.co/> to 10.2.72.10
> Jun 29 07:44:37 xcatmn01 named[32259]: client 10.2.80.2#58276: signer
> "xcat_key" approved
> Jun 29 07:44:37 xcatmn01 named[32259]: client 10.2.80.2#58276:
> updating zone '72.2.10.IN-ADDR.ARPA/IN': deleting rrset at
> '10.72.2.10.IN-ADDR.ARPA' PTR
> Jun 29 07:44:37 xcatmn01 named[32259]: client 10.2.80.2#58276:
> updating zone '72.2.10.IN-ADDR.ARPA/IN': adding an RR at
> '10.72.2.10.IN-ADDR.ARPA' PTR
> Jun 29 07:44:37 xcatmn01 dhcpd: added reverse map from
> 10.72.2.10.in-addr.arpa. to *xcatsn01.poc.lzd.co*
> <http://xcatsn01.poc.lzd.co/>
> Jun 29 07:44:37 xcatmn01 dhcpd: DHCPREQUEST for 10.2.72.10 (10.2.80.2)
> from 00:25:90:14:f8:18 via 10.2.72.1
> Jun 29 07:44:37 xcatmn01 dhcpd: DHCPACK on 10.2.72.10 to
> 00:25:90:14:f8:18 via 10.2.72.1
>
>
> When I check in the console on the node (the 2nd console,
> Ctrl-Alt-F2), I see 2 addresses assigned to the `ksdevice` (Both the IPs
> assigned to MAC 00:25:90:14:f8:18 : 10.2.72.9 and 10.2.72.10).
>
> This is done in the %post section of the kickstart file:
> [root@xcatmn01 tmp]# grep 'dhclient ' /install/autoinst/xcatsn01
> dhclient eth0
>
>
> The primary nic is `eth1`, and the template (
> xCAT-server/share/xcat/install/scripts/post.rh.common) has these line:
>
> [samveen@development xcat-core]$ git blame
> xCAT-server/share/xcat/install/scripts/post.rh.common |tail -n +38 |head
> -n 7
> 53374908 (immarvin 2014-05-30 03:12:08 -0700 38) IP=$(ip addr show dev
> $PRINIC | grep inet | grep -v inet6 | awk '{print $2}' | head -n 1 | awk
> -F '/' '{print $1}')
> 8168b22e (ligc 2012-03-23 08:26:38 +0000 39) if [ -z $IP ]
> 8168b22e (ligc 2012-03-23 08:26:38 +0000 40) then
> 8168b22e (ligc 2012-03-23 08:26:38 +0000 41) dhclient eth0
> 53374908 (immarvin 2014-05-30 03:12:08 -0700 42) #IP=$(ifconfig
> $PRINIC | grep inet | awk '{print $2}' | awk -F: '{print $2}')
> 53374908 (immarvin 2014-05-30 03:12:08 -0700 43) IP=$(ip addr
> show dev $PRINIC | grep inet | grep -v inet6 | awk '{print $2}' | head -n
> 1 | awk -F '/' '{print $1}')
> 8168b22e (ligc 2012-03-23 08:26:38 +0000 44) fi
>
>
> Given that this script sets the variable `PRINIC`, Line 4 should be as
> follows(as can be seen from line 43):
> --- a/xCAT-server/share/xcat/install/scripts/post.rh.common
> +++ b/xCAT-server/share/xcat/install/scripts/post.rh.common
> @@ -38,7 +38,7 @@ fi
> IP=$(ip addr show dev $PRINIC | grep inet | grep -v inet6 | awk
> '{print $2}' | head -n 1 | awk -F '/' '{print $1}')
> if [ -z $IP ]
> then
> - dhclient eth0
> + dhclient $PRINIC
> #IP=$(ifconfig $PRINIC | grep inet | awk '{print $2}' | awk
> -F: '{print $2}')
> IP=$(ip addr show dev $PRINIC | grep inet | grep -v inet6 |
> awk '{print $2}' | head -n 1 | awk -F '/' '{print $1}')
> fi
>
>
> This fixes my problems.
>
> Regards,
> --
> Samveen S. Gulati
> *http://samveen.in* <http://samveen.in/>
>
> The best-laid schemes o' mice an 'men
> Gang aft agley,
> An'lea'e us nought but grief an' pain,
> For promis'd joy!
> -- Robert Burns
> (The best laid plans of mice and men often go awry,
> and bring nothing but grief and pain instead of ..)
>
> ------------------------------------------------------------------------------
> Monitor 25 network devices or servers for free with OpManager!
> OpManager is web-based network management software that monitors
> network devices and physical & virtual servers, alerts via email & sms
> for fault. Monitor 25 devices for free with no restriction. Download
> now
> *http://ad.doubleclick.net/ddm/clk/292181274;119417398;o*
> <http://ad.doubleclick.net/ddm/clk/292181274;119417398;o>
> _______________________________________________
> xCAT-user mailing list
> *[email protected]* <[email protected]>
> *https://lists.sourceforge.net/lists/listinfo/xcat-user*
> <https://lists.sourceforge.net/lists/listinfo/xcat-user>
>
>
>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> *https://www.gigenetcloud.com/* <https://www.gigenetcloud.com/>
> _______________________________________________
> xCAT-user mailing list
> *[email protected]* <[email protected]>
> *https://lists.sourceforge.net/lists/listinfo/xcat-user*
> <https://lists.sourceforge.net/lists/listinfo/xcat-user>
>
>
>
>
>
> --
> --
> Samveen S. Gulati
> *http://samveen.in* <http://samveen.in/>
>
> The best-laid schemes o' mice an 'men
>
> Gang aft agley,
>
> An'lea'e us nought but grief an' pain,
>
> For promis'd joy!
> -- Robert Burns
>
> (The best laid plans of mice and men often go awry,
> and bring nothing but grief and pain instead of ..)
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> xCAT-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/xcat-user
>
>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> xCAT-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/xcat-user
>
>
--
--
Samveen S. Gulati
http://samveen.in
The best-laid schemes o' mice an 'men
Gang aft agley,
An'lea'e us nought but grief an' pain,
For promis'd joy!
-- Robert Burns
(The best laid plans of mice and men often go awry,
and bring nothing but grief and pain instead of ..)
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
xCAT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xcat-user