]>
git.proxmox.com Git - pve-ha-manager.git/blob - src/PVE/Service/pve_ha_lrm.pm
1 package PVE
::Service
::pve_ha_lrm
;
9 use PVE
::HA
::Env
::PVE2
;
12 use base
qw(PVE::Daemon);
14 my $cmdline = [$0, @ARGV];
16 my %daemon_options = (stop_wait_time
=> 60*60);
18 my $daemon = __PACKAGE__-
>new('pve-ha-lrm', $cmdline, %daemon_options);
23 $self->{haenv
} = PVE
::HA
::Env-
>new('PVE::HA::Env::PVE2', $self->{nodename
});
25 $self->{lrm
} = PVE
::HA
::LRM-
>new($self->{haenv
});
28 last if !$self->{lrm
}->do_one_iteration();
35 $self->{lrm
}->shutdown_request();
38 $daemon->register_start_command();
39 $daemon->register_stop_command();
40 $daemon->register_status_command();
43 start
=> [ __PACKAGE__
, 'start', []],
44 stop
=> [ __PACKAGE__
, 'stop', []],
45 status
=> [ __PACKAGE__
, 'status', [], undef, sub { print shift . "\n";} ],