From 8ced43ef987e56216aa6c71075d25192444c072f Mon Sep 17 00:00:00 2001 From: Jia Zhao Date: Wed, 20 Aug 2014 16:55:10 +0800 Subject: [PATCH] fix long name error during import node --- xCAT-server/lib/xcat/plugins/profilednodes.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/profilednodes.pm b/xCAT-server/lib/xcat/plugins/profilednodes.pm index 891bde510..06bcccf2c 100644 --- a/xCAT-server/lib/xcat/plugins/profilednodes.pm +++ b/xCAT-server/lib/xcat/plugins/profilednodes.pm @@ -2136,6 +2136,9 @@ sub validate_node_entries{ foreach my $hostname (@::profiledNodeObjNames){ if (exists $hostnamedict{$hostname}){ push @invalid_records, [$hostname, "Duplicated hostname defined"]; + } elsif (length($hostname) > 63){ + # As the rule of IDN encoding, the length of hostname should less than 64 characters. + push @invalid_records, [$hostname, "The length of hostname is more than 63 characters"]; } else{ $hostnamedict{$hostname} = 0; }