From f506499ae197dbacb53e4a8edc13f817de362a9e Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 22 Jun 2011 19:07:40 +0000 Subject: [PATCH] Strip out expensive cached XML data rettrieval if doing lsvm git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9900 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/kvm.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/kvm.pm b/xCAT-server/lib/xcat/plugins/kvm.pm index 9a13f736c..ddfcde70e 100644 --- a/xCAT-server/lib/xcat/plugins/kvm.pm +++ b/xCAT-server/lib/xcat/plugins/kvm.pm @@ -96,7 +96,6 @@ my $doreq; my %hyphash; my $node; my $vmtab; -my $kvmdatatab; sub get_path_for_pool { @@ -2468,13 +2467,15 @@ sub process_request { if ($::XCATSITEVALS{usexhrm}) { $use_xhrm=1; } $vmtab = xCAT::Table->new("vm"); $confdata={}; - unless ($command eq 'lsvm') { xCAT::VMCommon::grab_table_data($noderange,$confdata,$callback); } - $kvmdatatab = xCAT::Table->new("kvm_nodedata",-create=>0); #grab any pertinent pre-existing xml + unless ($command eq 'lsvm') { + xCAT::VMCommon::grab_table_data($noderange,$confdata,$callback); + my $kvmdatatab = xCAT::Table->new("kvm_nodedata",-create=>0); #grab any pertinent pre-existing xml if ($kvmdatatab) { $confdata->{kvmnodedata} = $kvmdatatab->getNodesAttribs($noderange,[qw/xml/]); } else { $confdata->{kvmnodedata} = {}; } + } if ($command eq 'mkvm' or ($command eq 'clonevm' and (grep { "$_" eq '-b' } @exargs)) or ($command eq 'rpower' and (grep { "$_" eq "on" or $_ eq "boot" or $_ eq "reset" } @exargs))) { xCAT::VMCommon::requestMacAddresses($confdata,$noderange); my @dhcpnodes;