my $valid_states = {
wait_for_quorum => "cluster is not quorate, waiting",
master => "quorate, and we got the ha_manager lock",
- lost_manager_lock => "we lost the ha_manager lock (watchgog active)",
+ lost_manager_lock => "we lost the ha_manager lock (watchdog active)",
slave => "quorate, but we do not own the ha_manager lock",
};
# fixme: do not use extra class
if ($new->{state} eq 'master') {
- mkdir("/etc/pve/ha");
$self->{manager} = PVE::HA::Manager->new($haenv);
} else {
if ($self->{manager}) {
if ($state eq 'wait_for_quorum') {
- if (!$pending_fencing && $haenv->quorate()) {
+ if (!$pending_fencing && $haenv->quorate() &&
+ $haenv->service_config_exists()) {
if ($self->get_protected_ha_manager_lock()) {
$self->set_local_status({ state => 'master' });
} else {
} elsif ($state eq 'slave') {
- if (!$pending_fencing && $haenv->quorate()) {
+ if (!$pending_fencing && $haenv->quorate() &&
+ $haenv->service_config_exists()) {
if ($self->get_protected_ha_manager_lock()) {
$self->set_local_status({ state => 'master' });
}