Skip to content

osd: Log acting set when a PG is marked as laggy. - #66974

Merged
SrinivasaBharath merged 2 commits into
ceph:mainfrom
pponnuvel:report-osds-on-laggy-pg
Aug 11, 2026
Merged

SrinivasaBharath merged 2 commits into
ceph:mainfrom
pponnuvel:report-osds-on-laggy-pg

Conversation

@pponnuvel

@pponnuvel pponnuvel commented Jan 19, 2026 •

Copy link
Copy Markdown
Contributor

Laggy PGs should be relatively less common and thus the additional logging shouldn't cause any negative impact on performance.

When PGs do get into laggy state, the cluster is likely affected, so this is going to be useful and likely offset any potential downside due to additional logging.

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

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.

@pponnuvel
pponnuvel requested a review from a team as a code owner January 19, 2026 15:43
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

14 similar comments
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@github-actions github-actions Bot added the core label Jan 19, 2026
@pponnuvel

Copy link
Copy Markdown
Contributor Author

jenkins test make check

Comment thread src/osd/PrimaryLogPG.cc Outdated
@@ -875,6 +875,18 @@ bool PrimaryLogPG::check_laggy(OpRequestRef& op)

// go to laggy state
state_set(PG_STATE_LAGGY);
{
auto acting = get_acting();
std::ostringstream ss;

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 guess (haven't tried to compile the idea below) there is no need for std::ostringstream as dout helpers might be able to host even a loop within:

      dout(0) << __func__ << " PG " << get_pgid() << " marked LAGGY; acting [";
      for (size_t i = 0; i < acting.size(); ++i) {
        if (i)
          *_dout << ",";
        *_dout << acting[i];
      }
      *_dout << "]";
      *_dout << dendl;

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.

Thanks @rzarzynski for taking a look. Yes, dout does work as you suggested. However, I've modified the code so that the same is logged into the cluster log too as that's probably a better place to have this info.

@rzarzynski

Copy link
Copy Markdown
Contributor

Overall nice idea, thank you!

@rzarzynski
rzarzynski requested a review from Matan-B January 26, 2026 19:43
@pponnuvel
pponnuvel force-pushed the report-osds-on-laggy-pg branch 2 times, most recently from 1d3e57b to c0336c9 Compare January 28, 2026 14:30
Comment thread src/osd/PrimaryLogPG.cc Outdated
Comment on lines +882 to +886
for (size_t i = 0; i < acting.size(); ++i) {
if (i)
ss << ",";
ss << acting[i];
}

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.

We should be able to print << get_acting()

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.

That's neat - I've modified as such. Thanks @Matan-B!

@pponnuvel
pponnuvel force-pushed the report-osds-on-laggy-pg branch 2 times, most recently from 6709a53 to d2177b1 Compare February 27, 2026 10:19
@pponnuvel
pponnuvel force-pushed the report-osds-on-laggy-pg branch 2 times, most recently from e8a9371 to 90720d5 Compare February 27, 2026 10:28
@pponnuvel pponnuvel closed this Feb 27, 2026
@sseshasa

Copy link
Copy Markdown
Contributor

Hi @pponnuvel, there was a related failure in a test due to the newly introduced cluster warning. Please see
https://tracker.ceph.com/projects/rados/wiki/MAIN#httpstrackercephcomissues75310 for more details under related failure section. For your reference please see failed job ID. This warning may need to be added to the ignore list, but I will leave the analysis portion to you.

@pponnuvel
pponnuvel force-pushed the report-osds-on-laggy-pg branch from 0ff0fb3 to 04bce29 Compare March 13, 2026 18:01
When pggrow_host thrasher kills a host and all its OSDs, those
OSDs stop sending lease ACKs. Then, once the lease interval (16s)
expires, PGs go into laggy state. This is expected for this
test scenario and thus adding it to the ignore list.

Signed-off-by: Ponnuvel Palaniyappan <[email protected]>
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run.

@github-actions github-actions Bot added the tests label Mar 14, 2026
@pponnuvel

Copy link
Copy Markdown
Contributor Author

Hi @pponnuvel, there was a related failure in a test due to the newly introduced cluster warning. Please see https://tracker.ceph.com/projects/rados/wiki/MAIN#httpstrackercephcomissues75310 for more details under related failure section. For your reference please see failed job ID. This warning may need to be added to the ignore list, but I will leave the analysis portion to you.

Thanks @sseshasa for the info.

I've also fixed a bug that this revealed - the previous change was using a temporary resulting in UB. Fixed that in code.

Yes, this is an expected behaviour as the PG thrasher kills all OSDs, resulting in lease expiry and thus PGs can get into LAGGY state. I've added this to the ignore list now. Thanks again!

@sseshasa

Copy link
Copy Markdown
Contributor

Hi @Matan-B Looks like this needs a re-look before marking it 'needs-qa' as there were some related failure in the QA run. PTAL when you can. Thanks.

@SrinivasaBharath

Copy link
Copy Markdown
Contributor

@pponnuvel - If this PR requires re-testing, please add the needs-qa label accordingly.

@pponnuvel

Copy link
Copy Markdown
Contributor Author

@pponnuvel - If this PR requires re-testing, please add the needs-qa label accordingly.

Hi @SrinivasaBharath yes, it does need re-testing. But I don't have the permission to add labels, so please add if you can. Thanks.

@pponnuvel

Copy link
Copy Markdown
Contributor Author

@Matan-B ping

@pponnuvel

Copy link
Copy Markdown
Contributor Author

Hi @SrinivasaBharath , can you please pickup this PR for the next round of testing (Matan's approved again). Thanks.

(I don't have permission to add the 'needs-qa' label btw)

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

2 similar comments
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@taodd taodd added the needs-qa label Jun 24, 2026

@taodd taodd 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.

LGTM

@pponnuvel

Copy link
Copy Markdown
Contributor Author

@sseshasa @SrinivasaBharath Would you mind taking a look at this and see if this is good to merge? Thanks.

@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath1-testing-20260810.014116-main.

@NitzanMordhai

Copy link
Copy Markdown
Contributor

@SrinivasaBharath
SrinivasaBharath merged commit 7d9140d into ceph:main Aug 11, 2026
6 checks passed
@github-actions

Copy link
Copy Markdown

This is an automated message by src/script/redmine-upkeep.py.

I have resolved the following tracker ticket due to the merge of this PR:

No backports are pending for the ticket. If this is incorrect, please update the tracker
ticket and reset to Pending Backport state.

Update Log: https://github.com/ceph/ceph/actions/runs/31511576738

Comment thread src/osd/PrimaryLogPG.cc
auto msg = fmt::format("PG {} marked LAGGY; acting [{}]",
get_pgid(), fmt::join(acting_osds, ","));
dout(0) << __func__ << " " << msg << dendl;
osd->clog->warn() << msg;

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.

Was logging both the OSD log (at level 0, so unconditionally) and to the cluster log intended? I don't think many other more durable/severe conditions (e.g. PG_DEGRADED or PG_DAMAGED) do that.

Regardless, this is disrupting multiple suites now. Here is an example of a krbd run:

https://pulpito.ceph.com/dis-2026-08-14_01:01:02-krbd-main-testing-default-trial/

The vast majority of jobs that failed due to marked LAGGY in the cluster log there don't ever kill OSDs or do any kind of thrashing -- it's just regular I/O workloads (some more intensive, some less).

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