From 19218acbc8c788af6ff2925aff05bb3ad23be0f9 Mon Sep 17 00:00:00 2001 From: yinle Date: Fri, 11 Feb 2011 07:38:02 +0000 Subject: [PATCH] FSP/BPA redundancy: do_makedhcp should check if the node itself is an IP first. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8823 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/lsslp.pm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/lsslp.pm b/xCAT-server/lib/xcat/plugins/lsslp.pm index 85b53d620..14bbb3ed7 100644 --- a/xCAT-server/lib/xcat/plugins/lsslp.pm +++ b/xCAT-server/lib/xcat/plugins/lsslp.pm @@ -2487,11 +2487,15 @@ sub do_makedhcp { # Check if IP and mac are both # existing for this node ##################################### - my ($hostsent) = $db{hosts}->getNodeAttribs( $name, [qw(ip)] ); - if ( !$hostsent or !$hostsent->{ip} ) { - $string = "Cannot find IP address for node $name during makedhcp, skip"; - send_msg( $request, 0, $string ); - next; + my $ifip = xCAT::Utils->isIpaddr($name); + unless( $ifip ) + { + my ($hostsent) = $db{hosts}->getNodeAttribs( $name, [qw(ip)] ); + if ( !$hostsent or !$hostsent->{ip} ) { + $string = "Cannot find IP address for node $name during makedhcp, skip"; + send_msg( $request, 0, $string ); + next; + } } my ($macent) = $db{mac}->getNodeAttribs( $name, [qw(mac)] );