Skip to content

mgr/cephadm: Use a persistent volume to store Loki DB#60815

Merged
adk3798 merged 1 commit intoceph:mainfrom
rhcs-dashboard:fix-69029-main
Oct 17, 2025
Merged

mgr/cephadm: Use a persistent volume to store Loki DB#60815
adk3798 merged 1 commit intoceph:mainfrom
rhcs-dashboard:fix-69029-main

Conversation

@aaSharma14
Copy link
Copy Markdown
Contributor

Current Behavior: The Loki configuration directs all data to /tmp/loki, which is not mounted as a persistent volume. This results in data being stored in a temporary location that gets cleared upon container restart.

Expected Behavior: Loki data should be stored in /loki, which is backed by the persistent volume mapped to /var/lib/ceph//loki./data, ensuring data persistence across container restarts.

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

Signed-off-by: Aashish Sharma aasharma@redhat.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
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@aaSharma14
Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

Copy link
Copy Markdown
Contributor

@phlogistonjohn phlogistonjohn left a comment

Choose a reason for hiding this comment

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

This should probably be scoped as mgr/cephadm not mgr/dashboard as dashboard is not touched by this change.

Second question: this volume mapping will tie this instance of loki to the particular host is it running on. Is this ok, if so I'd like to see that explained in comments (and commit message). Only resources that are meant to be tied to a single host or only semi-persistent (caches) ought to be volume mapped into the containers.

Copy link
Copy Markdown
Contributor

@phlogistonjohn phlogistonjohn left a comment

Choose a reason for hiding this comment

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

Setting 'Request changes' in order to ensure we discuss the above comment before this is considered mergable.

@adk3798
Copy link
Copy Markdown
Contributor

adk3798 commented Jan 13, 2025

https://pulpito.ceph.com/adking-2025-01-10_07:24:29-orch:cephadm-wip-adk-testing-2025-01-09-1901-distro-default-smithi/

Failures:

Overall, can't cause the two PRs that caused the direct failures mentioned or nfs module PRs. Other changes should be okay.

@github-actions
Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions bot added the stale label Mar 14, 2025
@adk3798 adk3798 added stale and removed stale labels Mar 25, 2025
@aaSharma14 aaSharma14 changed the title mgr/dashboard: Use a persistent volume to store Loki DB mgr/cephadm: Use a persistent volume to store Loki DB Mar 28, 2025
@aaSharma14
Copy link
Copy Markdown
Contributor Author

aaSharma14 commented Mar 28, 2025

@phlogistonjohn ,

  1. Yes, this volume mapping does tie the Loki instance to a particular host since it stores data in a host-mounted volume. This is intentional because Loki's logs need to persist across container restarts and avoid loss due to /tmp/loki being ephemeral.
  2. Ceph related services already leverage persistent storage under /var/lib/ceph, so placing Loki data here maintains consistency.
  3. While this ties Loki to a specific node, it's a necessary trade-off to avoid losing logs. If required, we can explore using an external object store backend in the future for a more distributed setup.
  4. Also, we can probably add a warning in the documentation that the /var/lib/ceph//loki./data can grow very quickly and should be recommend it being configured in a separate FS than /

@aaSharma14
Copy link
Copy Markdown
Contributor Author

jenkins test dashboard cephadm

@github-actions github-actions bot removed the stale label Mar 28, 2025
@github-actions
Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

Current Behavior: The Loki configuration directs all data to /tmp/loki, which is not mounted as a persistent volume. This results in data being stored in a temporary location that gets cleared upon container restart.
Expected Behavior: Loki data should be stored in /loki, which is backed by the persistent volume mapped to /var/lib/ceph/<fsid>/loki.<id>/data, ensuring data persistence across container restarts.

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

Signed-off-by: Aashish Sharma <aasharma@redhat.com>
@github-actions
Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions bot added the stale label Jul 26, 2025
@aaSharma14 aaSharma14 removed the stale label Aug 6, 2025
@adk3798
Copy link
Copy Markdown
Contributor

adk3798 commented Sep 18, 2025

Copy link
Copy Markdown
Contributor

@adk3798 adk3798 left a comment

Choose a reason for hiding this comment

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

don't know much about this, but the PR looks like it's doing what's described

Copy link
Copy Markdown
Contributor

@phlogistonjohn phlogistonjohn left a comment

Choose a reason for hiding this comment

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

.

@adk3798 adk3798 merged commit 537adaa into ceph:main Oct 17, 2025
13 checks passed
@adk3798 adk3798 deleted the fix-69029-main branch October 17, 2025 16:08
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.

3 participants