]>
git.proxmox.com Git - pve-ha-manager.git/blob - src/PVE/Service/pve_ha_lrm.pm
1 package PVE
::Service
::pve_ha_lrm
;
10 use PVE
::HA
::Env
::PVE2
;
13 use base
qw(PVE::Daemon);
15 my $cmdline = [$0, @ARGV];
17 my %daemon_options = (stop_wait_time
=> 180);
19 my $daemon = __PACKAGE__-
>new('pve-ha-lrm', $cmdline, %daemon_options);
24 $self->{haenv
} = PVE
::HA
::Env-
>new('PVE::HA::Env::PVE2', $self->{nodename
});
26 $self->{lrm
} = PVE
::HA
::LRM-
>new($self->{haenv
});
29 $self->{haenv
}->loop_start_hook();
31 my $repeat = $self->{lrm
}->do_one_iteration();
33 $self->{haenv
}->loop_end_hook();
42 $self->{lrm
}->shutdown_request();
45 $daemon->register_start_command();
46 $daemon->register_stop_command();
47 $daemon->register_status_command();
50 start
=> [ __PACKAGE__
, 'start', []],
51 stop
=> [ __PACKAGE__
, 'stop', []],
52 status
=> [ __PACKAGE__
, 'status', [], undef, sub { print shift . "\n";} ],
61 pve-ha-lrm - PVE Local HA Ressource Manager Daemon
69 This is the Local HA Ressource Manager.
71 =include pve_copyright