[pve-devel] [PATCH ha-manager] always queue service stop if node shuts down
Thomas Lamprecht
t.lamprecht at proxmox.com
Fri May 26 16:55:35 CEST 2017
On 05/26/2017 04:49 PM, Fabian Grünbichler wrote:
> small comment inside
>
> On Fri, May 26, 2017 at 03:45:38PM +0200, Thomas Lamprecht wrote:
>> [snip]
>>
>> + if ($shutdown && !$reboot) {
>> + $haenv->log('info', "shutdown LRM, stop all services");
>> + $self->{mode} = 'shutdown';
>> } else {
>> $haenv->log('info', "restart LRM, freeze all services");
> could we maybe split this if / else up more, and make the log message
> explicit?
>
> e.g.
>
> if shutdown
> if reboot
> log node rebooting, freeze all services
> else
> log node shutting down, stop all services
> else
> log restart LRM, freeze all services
>
>
> seeing a "restart LRM" in the middle of shutting down a node is kind of
> weird, especially since we are in fact stopping the LRM service at that
> point, not restarting it:
>
> May 26 13:28:17 node1 systemd[1]: Starting PVE Local HA Ressource Manager Daemon...
> May 26 13:28:18 node1 systemd[1]: PID file /var/run/pve-ha-lrm.pid not readable (yet?) after start.
> May 26 13:28:18 node1 systemd[1]: Started PVE Local HA Ressource Manager Daemon.
> May 26 13:28:18 node1 pve-ha-lrm[3609]: starting server
> May 26 13:28:18 node1 pve-ha-lrm[3609]: status change startup => wait_for_agent_lock
> May 26 13:30:20 node1 systemd[1]: Stopping PVE Local HA Ressource Manager Daemon...
> May 26 13:30:21 node1 pve-ha-lrm[3609]: received signal TERM
> May 26 13:30:21 node1 pve-ha-lrm[3609]: restart LRM, freeze all services
> May 26 13:30:22 node1 pve-ha-lrm[3609]: server stopped
> May 26 13:30:23 node1 systemd[1]: Stopped PVE Local HA Ressource Manager Daemon.
Yes you're right, it's confusing. I'll adapt that in a v2.
More information about the pve-devel
mailing list