Commit c0a008a8 authored by Dietmar Maurer's avatar Dietmar Maurer

ha migrate: return non-critical error if migrate failed by VM is still running

parent e157399a
...@@ -359,7 +359,17 @@ if ($cmd eq 'start') { ...@@ -359,7 +359,17 @@ if ($cmd eq 'start') {
upid_wait($upid); upid_wait($upid);
# something went wrong if old config file is still there # 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') { } elsif($cmd eq 'stop') {
my $status = validate_all(); my $status = validate_all();
......
Markdown is supported
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