From bea95cbe380cafa64e7937d43a4eecf918b98f6a Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 16 Feb 2011 15:51:08 +0000 Subject: [PATCH] Rework message when uuid is not available to be less severe git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8858 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Client.pm | 4 ++++ xCAT-server/lib/xcat/plugins/dhcp.pm | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/perl-xCAT/xCAT/Client.pm b/perl-xCAT/xCAT/Client.pm index dec5cac44..2fdc3a0e8 100644 --- a/perl-xCAT/xCAT/Client.pm +++ b/perl-xCAT/xCAT/Client.pm @@ -967,6 +967,10 @@ sub handle_response { $desc.=": Error: ".$node->{error}->[0]; $errflg=1; } + if ($node->{warning}) { + $desc.=": Warning: ".$node->{warning}->[0]; + $errflg=1; + } if ($node->{data}) { if (ref(\($node->{data}->[0])) eq 'SCALAR') { $desc=$desc.": ".$node->{data}->[0]; diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index ccfb54769..a5504b09e 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -152,14 +152,13 @@ sub addnode6 { #omshell to add host dynamically my $node = shift; unless ($vpdhash) { - $callback->({error => ["Unable to open vpd table, it may not exist yet"], errorcode => [1] }); + $callback->({node=>{name=>[$node],warning => ["Skipping DHCPv6 setup due to missing vpd.uuid information."]}}); return; } my $ent = $vpdhash->{$node}->[0]; #tab->getNodeAttribs($node, [qw(mac)]); unless ($ent and $ent->{uuid}) { - print Dumper($vpdhash); - $callback->( { error => ["Unable to find UUID for $node"], errorcode => [1] }); + $callback->({node=>{name=>[$node],warning => ["Skipping DHCPv6 setup due to missing vpd.uuid information."]}}); return; } #phase 1, dynamic and static addresses, hopefully ddns-hostname works, may be tricky to do 'send hostname'