Skip to content

Harden logrotate config for case/path variants and no-downtime rotation - #44

Merged
gamblecodezcom merged 2 commits into
mainfrom
codex/main
Feb 21, 2026
Merged

Harden logrotate config for case/path variants and no-downtime rotation#44
gamblecodezcom merged 2 commits into
mainfrom
codex/main

Conversation

@gamblecodezcom

@gamblecodezcom gamblecodezcom commented Feb 21, 2026

Copy link
Copy Markdown
Owner

User description

Motivation

  • Ensure log rotation actually targets the active service output regardless of directory-casing differences on case-sensitive systems.
  • Cover multiple log filename variants and avoid inducing downtime when rotating logs.

Description

  • Updated runewager.logrotate to match runewager*.log and crash.log and to include both /var/www/html/Runewager/... and /var/www/html/runewager/... paths so rotation is robust to casing and filename variants.
  • Removed the postrotate restart and enabled copytruncate in runewager.logrotate so logs are rotated without restarting or trying to restart runewager.service.
  • Added a short README note advising to keep the deployment directory casing exactly Runewager to align with the systemd unit StandardOutput path.

Testing

  • Ran npm run check and npm test and both completed successfully.

Codex Task


CodeAnt-AI Description

Rotate Runewager logs without restarting the service and handle directory/name variants

What Changed

  • Log rotation now matches both Runewager and runewager directory casing and any runewager*.log plus crash.log, so rotation targets the active log files regardless of directory/name variants
  • Rotation uses copytruncate and no longer attempts to restart the runewager service, so logs are rotated without stopping or restarting the service
  • README now includes a note to keep the deployment directory named exactly "Runewager" to match systemd paths

Impact

✅ No downtime during log rotation
✅ Fewer missed rotations due to directory-casing or filename variants
✅ Clearer setup instructions to avoid systemd path mismatches

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@codeant-ai

codeant-ai Bot commented Feb 21, 2026

Copy link
Copy Markdown

CodeAnt AI is reviewing your PR.

@coderabbitai

coderabbitai Bot commented Feb 21, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@gamblecodezcom has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 0 minutes and 43 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

@gamblecodezcom
gamblecodezcom merged commit a88a68d into main Feb 21, 2026
2 checks passed
@gamblecodezcom
gamblecodezcom deleted the codex/main branch February 21, 2026 00:02
@codeant-ai codeant-ai Bot added the size:XS This PR changes 0-9 lines, ignoring generated files label Feb 21, 2026
@codeant-ai

codeant-ai Bot commented Feb 21, 2026

Copy link
Copy Markdown

Nitpicks 🔍

🔒 No security issues identified
⚡ Recommended areas for review

  • Removed postrotate/service signaling
    The original postrotate attempted to restart (try-restart) the service so it would reopen logs. Removing that without providing a signal-based reopen means some services may keep writing to the old (rotated) file unless copytruncate works reliably. Verify the application supports copytruncate semantics or provide a safe postrotate that requests log re-open without downtime.

  • copytruncate risk
    Using copytruncate avoids restarting the service but can lose log lines or create partial entries during rotation because the process continues writing to the original file while it's being copied. This can result in missing or duplicated log lines and is not suitable for all logging implementations.

  • Duplicate path matches
    The single config line lists both Runewager and runewager paths and crash/log patterns in one block. If any of those paths resolve to the same inode (symlink, non-case-sensitive mount), a file could be matched more than once leading to double-rotation or unexpected behavior. Consider deduplicating matches or separating into distinct rotation blocks.

@codeant-ai

codeant-ai Bot commented Feb 21, 2026

Copy link
Copy Markdown

CodeAnt AI finished reviewing your PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex size:XS This PR changes 0-9 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant