Skip to content

mon: enable monitor logging by default#67005

Open
indirasawant wants to merge 1 commit intoceph:mainfrom
indirasawant:wip-isawant-mon-logging
Open

mon: enable monitor logging by default#67005
indirasawant wants to merge 1 commit intoceph:mainfrom
indirasawant:wip-isawant-mon-logging

Conversation

@indirasawant
Copy link
Copy Markdown
Contributor

@indirasawant indirasawant commented Jan 20, 2026

Monitor logs are not written to files by default, which makes debugging and support difficult, especially on collocated nodes where all logs go to journald. Enable file logging by default to ensure monitor logs are always available.

Fixes: https://tracker.ceph.com/issues/74473

Signed-off-by: Indira Sawant indira.sawant@ibm.com

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@indirasawant indirasawant requested a review from a team as a code owner January 20, 2026 21:01
@indirasawant indirasawant force-pushed the wip-isawant-mon-logging branch from 5167177 to fecec75 Compare January 20, 2026 21:07
)

def should_log_mon_cluster_to_file(ctx: CephadmContext) -> bool:
if ctx.mon_cluster_log_to_file is not None:
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.

I am not able to understand why we need this function, ctx.mon_cluster_log_to_file will always be true, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point. Since the default is always True, I will remove the helper and now use ctx.mon_cluster_log_to_file directly.

@indirasawant indirasawant force-pushed the wip-isawant-mon-logging branch 2 times, most recently from 76c7309 to c7633be Compare February 26, 2026 18:11
@ShwetaBhosale1
Copy link
Copy Markdown
Contributor

jenkins test make check

@ShwetaBhosale1
Copy link
Copy Markdown
Contributor

jenkins test make check arm64

@ShwetaBhosale1
Copy link
Copy Markdown
Contributor

jenkins test windows

'ceph',
'--setgroup',
'ceph',
'--default-log-to-file=false',
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.

wouldn't removing this make every ceph daemon log to file?

Monitor logs are not written to files by default, which makes debugging
and support difficult, especially on collocated nodes where all logs go
to journald. Enable file logging by default to ensure monitor logs are
always available.

Fixes: https://tracker.ceph.com/issues/74473

Signed-off-by: Indira Sawant <indira.sawant@ibm.com>
@indirasawant indirasawant force-pushed the wip-isawant-mon-logging branch from c7633be to eda4174 Compare March 20, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants