fix long name error during import node

This commit is contained in:
Jia Zhao 2014-08-20 16:55:10 +08:00
parent 99365ff4a8
commit 8ced43ef98

View File

@ -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;
}