-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
Current Behavior
We’re using Wings with the built-in logrotate configuration that’s shipped in the codebase (the logrotate snippet around this line in config.go: config/config.go#L696).
However, it looks like this configuration doesn’t actually work as intended.
What we’re seeing:
- logrotate creates a new
wings.logand rotates the current one to something like wings.log-{timestamp}. - After rotation, Wings appears to keep writing to the old log file (it looks like it’s holding the file descriptor open), so the new wings.log stays empty.
- After some time and a few rotations, Wings stops writing logs entirely until the service is restarted.
The shipped logrotate config runs:
/usr/bin/systemctl kill -s HUP wings.service >/dev/null 2>&1 || true
But from what we can see in the source, Wings doesn’t implement any signal handling (no SIGHUP/graceful reload, and apparently no graceful shutdown logic either). So it’s not clear what this HUP is supposed to achieve, and it doesn’t seem to trigger a log file reopen.
Before we start hacking around this (e.g. sending SIGKILL on a schedule, which we’d really prefer not to do, or disabling log rotation entirely), I wanted to clarify a few things:
- Is there any officially supported way to rotate wings.log without stopping the daemon?
- Does Wings handle any signals (SIGHUP, SIGTERM, SIGUSR1, etc.) in a way that would reopen log files or perform a graceful reload?
- Is the bundled logrotate configuration still considered valid/supported, or is it effectively stale/incorrect at this point?
Thanks in advance for any guidance — and for confirming whether we’re missing something obvious here.
Expected Behavior
log rotate
Steps to Reproduce
See comments above
Panel Version
Latest
Wings Version
Latest
Games and/or Eggs Affected
No response
Docker Image
No response
Error Logs
Is there an existing issue for this?
- I have searched the existing issues before opening this issue.
- I have provided all relevant details, including the specific game and Docker images I am using if this issue is related to running a server.
- I have checked in the Discord server and believe this is a bug with the software, and not a configuration issue with my specific system.