From b0afee325269480fe1810d6e0d4742cfb9871dda Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 24 Feb 2010 21:22:40 +0000 Subject: [PATCH] -Fix vm.host attribute fixup on vcenter operations git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5292 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/esx.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index c566da697..ce8d99366 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -967,8 +967,8 @@ sub generic_vm_operation { #The general form of firing per-vm requests to ESX hy my $hyp; my $vmviews; my %vcviews; #views populated once per vcenter server for improved performance - if ($viavcenterbyhyp->{$hyp}) { - foreach $hyp (keys %hyphash) { + foreach $hyp (keys %hyphash) { + if ($viavcenterbyhyp->{$hyp}) { if ($vcviews{$hyphash{$hyp}->{vcenter}->{name}}) { next; } $vcviews{$hyphash{$hyp}->{vcenter}->{name}} = $hyphash{$hyp}->{conn}->find_entity_views(view_type => 'VirtualMachine',properties=>$properties); foreach (@{$vcviews{$hyphash{$hyp}->{vcenter}->{name}}}) { @@ -982,7 +982,7 @@ sub generic_vm_operation { #The general form of firing per-vm requests to ESX hy if ( $tablecfg{vm}->{$node}->[0]->{host} eq "$host" ) { next; } my $newnhost = inet_aton($host); my $oldnhost = inet_aton($tablecfg{vm}->{$node}->[0]->{host}); - if ($newnhost = $oldnhost) { next; } #it resolved fine + if ($newnhost eq $oldnhost) { next; } #it resolved fine my $shost = $host; $shost =~ s/\..*//; if ( $tablecfg{vm}->{$node}->[0]->{host} eq "$shost" ) { next; }