Skip to content

create rotate file on the fly for access.log - #9324

Draft
DaanHoogland wants to merge 5 commits into
apache:mainfrom
shapeblue:ghi3443-rotateAccessLog
Draft

create rotate file on the fly for access.log#9324
DaanHoogland wants to merge 5 commits into
apache:mainfrom
shapeblue:ghi3443-rotateAccessLog

Conversation

@DaanHoogland

Copy link
Copy Markdown
Contributor

Description

This PR...

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

Comment thread client/src/main/java/org/apache/cloudstack/ServerDaemon.java Outdated
Comment thread client/src/main/java/org/apache/cloudstack/ServerDaemon.java Outdated
@codecov

codecov Bot commented Jul 1, 2024

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 19.73%. Comparing base (5e5ae0c) to head (d07f62b).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #9324   +/-   ##
=========================================
  Coverage     19.72%   19.73%           
- Complexity    19941    19945    +4     
=========================================
  Files          6371     6371           
  Lines        575738   575738           
  Branches      70471    70471           
=========================================
+ Hits         113582   113606   +24     
+ Misses       449810   449784   -26     
- Partials      12346    12348    +2     
Flag Coverage Δ
uitests 3.41% <ø> (ø)
unittests 21.01% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@DaanHoogland
DaanHoogland force-pushed the ghi3443-rotateAccessLog branch from c300793 to f0b45e5 Compare October 15, 2025 11:37
@DaanHoogland
DaanHoogland force-pushed the ghi3443-rotateAccessLog branch from f0b45e5 to 78a578f Compare December 8, 2025 15:12
@DaanHoogland DaanHoogland reopened this Dec 23, 2025
@DaanHoogland
DaanHoogland force-pushed the ghi3443-rotateAccessLog branch from 78a578f to ff27a44 Compare December 23, 2025 19:58
@weizhouapache weizhouapache added this to the 4.24.0 milestone Jun 29, 2026
@nvazquez

Copy link
Copy Markdown
Contributor

Hi @DaanHoogland is this PR still in progress?

@DaanHoogland

Copy link
Copy Markdown
Contributor Author

@nvazquez , it just needs some validation, but should be ready. Outcome of validation might mean adjustment for different platforms, hence it is still in draft.

@DaanHoogland
DaanHoogland requested review from NuxRo and ingox and a lite review from Copilot August 13, 2026 07:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR attempts to ensure the server’s access.log is rotated by generating a logrotate configuration file during embedded server startup (when the Jetty request log is created).

Changes:

  • Adds runtime creation of a logrotate config targeting the configured access log file.
  • Introduces filesystem write logic under /etc/logrotate.d from ServerDaemon#createRequestLog().

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread client/src/main/java/org/apache/cloudstack/ServerDaemon.java Outdated
Comment thread client/src/main/java/org/apache/cloudstack/ServerDaemon.java Outdated
Comment thread client/src/main/java/org/apache/cloudstack/ServerDaemon.java Outdated
@NuxRo

NuxRo commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

@DaanHoogland why aren't we handling logrotate config files in the packaging? That's how it's done typically.

@ingox

ingox commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

@blueorangutan package

1 similar comment
@ingox

ingox commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

@blueorangutan package

@DaanHoogland

Copy link
Copy Markdown
Contributor Author

@DaanHoogland why aren't we handling logrotate config files in the packaging? That's how it's done typically.

asking the question is volunteering!

@DaanHoogland
DaanHoogland force-pushed the ghi3443-rotateAccessLog branch from ff27a44 to 3e090a5 Compare August 23, 2026 09:31
@apache apache deleted a comment from blueorangutan Aug 23, 2026
@apache apache deleted a comment from blueorangutan Aug 23, 2026
@apache apache deleted a comment from blueorangutan Aug 23, 2026
@apache apache deleted a comment from blueorangutan Aug 23, 2026
@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18960

@apache apache deleted a comment from blueorangutan Aug 23, 2026
@DaanHoogland

Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@DaanHoogland

Copy link
Copy Markdown
Contributor Author

@ingox , this was an abandoned PR. I have revived it now. It still needs some functional assessment. As @NuxRo asked, it could be done in packaging as well, an erroneous pattern much applied ;) I am willing to carry this implementation through, if it can get some approval. If not, and the functional ask is still valid, a different tactics must be applied.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants