mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-06 17:10:35 +00:00
ha migrate: return non-critical error if migrate failed by VM is still running
This commit is contained in:
parent
b5dfdb10c8
commit
7809a92911
@ -359,7 +359,17 @@ if ($cmd eq 'start') {
|
||||
upid_wait($upid);
|
||||
|
||||
# something went wrong if old config file is still there
|
||||
exit((-f $oldconfig) ? OCF_ERR_GENERIC : OCF_SUCCESS);
|
||||
if (-f $oldconfig) {
|
||||
# check if VM is really dead. If still running, return non-critical error
|
||||
# We use OCF error code 150 (same as vm.sh agent)
|
||||
check_running($status);
|
||||
|
||||
exit(150) if $status->{running};
|
||||
|
||||
exit(OCF_ERR_GENERIC);
|
||||
}
|
||||
|
||||
exit(OCF_SUCCESS);
|
||||
|
||||
} elsif($cmd eq 'stop') {
|
||||
my $status = validate_all();
|
||||
|
Loading…
Reference in New Issue
Block a user