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

This commit is contained in:
Dietmar Maurer 2014-07-29 07:13:42 +02:00
parent b5dfdb10c8
commit 7809a92911

View File

@ -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();