From 2ab63fc125f0e18e27376b06f41f55de58cbca00 Mon Sep 17 00:00:00 2001 From: immarvin Date: Tue, 27 Oct 2015 02:38:33 -0400 Subject: [PATCH] throw an error message if the specified --cpupin cpuset include invalid node exclude declaration --- xCAT-server/lib/xcat/plugins/kvm.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/kvm.pm b/xCAT-server/lib/xcat/plugins/kvm.pm index c683d54fd..7f04ce16c 100755 --- a/xCAT-server/lib/xcat/plugins/kvm.pm +++ b/xCAT-server/lib/xcat/plugins/kvm.pm @@ -2038,7 +2038,13 @@ sub chvm { my ($left,$right)=($1,$2); @pcpumaparr[$left .. $right]=(1) x ($right-$left+1); }elsif($rangeslice =~ /^\^(\d*)$/){ - $pcpumaparr[$1]=0; + if($pcpumaparr[$1]==0){ + xCAT::SvrUtils::sendmsg([1,"\'$rangeslice\' is ignored, please make sure the specified cpu set is correct"],$callback,$node); + return; + }else{ + $pcpumaparr[$1]=0; + } + }elsif($rangeslice =~ /^(\d*)$/){ $pcpumaparr[$1]=1; }