hockeypuck snap doesn't logrotate correctly

Bug #1920249 reported by Nick Moffitt
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hockeypuck
New
Undecided
Unassigned

Bug Description

/etc/logrotate.d/hockeypuck-snap includes the following:

postrotate
              /usr/sbin/service snap.hockeypuck.hockeypuck reload
endscript

This isn't supported by the snap service, so hockeypuck continues to write to the hockeypuck.log.1, hockeypuck.log stays zero-bytes, and since that's beneath the threshold logrotate never looks at it again.

Given a restart is a fairly heavy-handed operation, could this reload target be added to support switching log files?

Revision history for this message
Paul Collins (pjdc) wrote :

When I explored doing this properly via snaps I ran into a bunch of problems and ended up deploying a workaround: https://wiki.canonical.com/InformationInfrastructure/IS/HockeypuckKeyserver#Logging

This override seems to have been clobbered around February 25 by another SRE's override file. I guess they didn't check to see if one existed already. I'll add it back.

Revision history for this message
Paul Collins (pjdc) wrote :
Revision history for this message
Paul Collins (pjdc) wrote :

Oh, also, to be clear, that logrotate file is something we installed quasi-manually with a Mojo script (my bad for not adding a comment) not something the snap supplied.

Certainly proper reload supports would be useful, though.

Revision history for this message
Paul Collins (pjdc) wrote :

To sum up the notes from above if you can't read them (whether because the link is private or because it's such an incoherent ramble) I eventually discovered that the snap-confined reload command could not send SIGUSR1 to hockeypuck (possibly even would not work unconfined with Ubuntu's default security settings) and so reload probably has to be implemented by having hockeypuck receive the command via an admin socket in /var/snap/hockeypuck/common or such.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.