Skip to content

Is logrotate on wings works correctly? #5435

@katsil

Description

@katsil

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:

  1. logrotate creates a new wings.log and rotates the current one to something like wings.log-{timestamp}.
  2. 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.
  3. 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:

  1. Is there any officially supported way to rotate wings.log without stopping the daemon?
  2. Does Wings handle any signals (SIGHUP, SIGTERM, SIGUSR1, etc.) in a way that would reopen log files or perform a graceful reload?
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions