Commit ca33df5e authored by Francesc Guasch's avatar Francesc Guasch
Browse files

refactor(nodes): do not balance when only 1 node

parent 9485baba
...@@ -1373,7 +1373,7 @@ sub balance_vm($self, $base=undef) { ...@@ -1373,7 +1373,7 @@ sub balance_vm($self, $base=undef) {
@vms = $self->list_nodes(); @vms = $self->list_nodes();
} }
# warn Dumper([ map { $_->name } @vms]); # warn Dumper([ map { $_->name } @vms]);
return $self if !@vms; return $self if scalar(@vms)<2;
for my $vm (_random_list( @vms )) { for my $vm (_random_list( @vms )) {
next if !$vm->enabled(); next if !$vm->enabled();
my $active = 0; my $active = 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment