Skip to content

Commit

Permalink
wip: fixed remove on dead node
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiejol committed Feb 7, 2024
1 parent 7e7afe7 commit 268bf4c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/Ravada/Domain.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2407,13 +2407,15 @@ sub _remove_domain_cascade($self,$user, $cascade = 1) {
next if $instance->{id_vm} == $self->_vm->id;
my $vm;
eval { $vm = Ravada::VM->open($instance->{id_vm}) };
die $@ if $@ && $@ !~ /I can't find VM/i;
next if !$vm || !$vm->is_active;
die $@ if $@ && $@ !~ /I can't find VM ||libvirt error code: 38,/i;
my $domain;
$@ = '';
eval { $domain = $vm->search_domain($domain_name) } if $vm;
warn $@ if $@;
$domain->remove($user, $cascade) if $domain;
eval {
$domain->remove($user, $cascade) if $domain;
};
warn $@ if $@;
$sth_delete->execute($instance->{id});
}
}
Expand Down

0 comments on commit 268bf4c

Please sign in to comment.