[pve-devel] pve api offline during log rotation

Stefan Priebe - Profihost AG s.priebe at profihost.ag
Wed Sep 20 13:26:32 CEST 2017


Hi,


Am 20.09.2017 um 10:36 schrieb Thomas Lamprecht:
> On 09/20/2017 06:40 AM, Stefan Priebe - Profihost AG wrote:
>> Nobody?
>>
> 
> We register the restart command from pveproxy with the $use_hup parameter,
> this then send a SIGHUP when calling pveproxy restart - which gets
> mapped to
> systemctl reload-or-restart pveproxy.service, which sends the HUP signal to
> the main process, which in turn does an exec on itself. So  a restart is a
> reload in this case.
> 
> As we already use use our Daemons class' "leave_children_open_on_reload"
> functionality to keep the workers running during a restart open connection
> should stay. But as the worker always get  a SIGTERM even with this option
> this is not always the case, I will investigate this behavior but this
> is not
> responsible for longer restart times.
> 
> Is suspect that you suffered from a bug we fixed about a week ago [1] where
> worker signal handlers got overwritten and thus daemons could always be
> stopped grafully. restarting may have been affected to by it.
> 
> The fix is currently already in the no-subscription repo.
> 
> If you still experience this behavior could you please do a
> `pveproxy restart` and post the logs from during the restart,
> something like:
> # journalctl -u pveproxy.service --since -10min


thanks for the reply. Does this also apply to PVE 4? Sorry i missed that
info.

Greets,
Stefan

> 
> 
> [1]
> https://git.proxmox.com/?p=pve-common.git;a=commit;h=eead1ccaa509e8559e466ca5926c6625f27bff35
> 
> 
>> Stefan
>>
>> Excuse my typo sent from my mobile phone.
>>
>>> Am 12.09.2017 um 09:27 schrieb Stefan Priebe - Profihost AG
>>> <s.priebe at profihost.ag>:
>>>
>>> Hello,
>>>
>>> pveproxy has already a reload command - which seems to reopen the logs
>>> correctly. Is there any reason why restart is used in the postrotate
>>> part of logrotate?
>>>
>>> Greets,
>>> Stefan
>>>
>>>> Am 12.09.2017 um 09:13 schrieb Stefan Priebe - Profihost AG:
>>>> Hello,
>>>>
>>>> we're heavily using the pve api - doing a lot of calls every few
>>>> minutes.
>>>>
>>>> Currently the log rotation does a pveproxy restart which makes the API
>>>> unavailable for a few seconds. This is pretty bad.
>>>>
>>>> I see the following solution:
>>>> - add a special signal like SIGUSR1 to pveproxy and spiceproxy to just
>>>> reopen the logs
>>>>
>>>> Greets,
>>>> Stefan
>>>>
>> _______________________________________________
>> pve-devel mailing list
>> pve-devel at pve.proxmox.com
>> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>>
> 
> 



More information about the pve-devel mailing list