From 9d98e4c1706e659b1760a7a50f6121619e7e73e2 Mon Sep 17 00:00:00 2001 From: Jia Zhao Date: Wed, 20 Aug 2014 17:00:34 +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 41308a457..44f51feba 100644 --- a/xCAT-server/lib/xcat/plugins/profilednodes.pm +++ b/xCAT-server/lib/xcat/plugins/profilednodes.pm @@ -2137,6 +2137,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; }