Skip to contentSkip to conversation

Quering since when a PG is inactive

DISCUSSION Wido den Hollander 2 participants 3 messages Dec 9, 2015

lore
Share & tools
lore
#0 lore raw

Hi,

I'm working on a patch in PGMonitor.cc that sets the state to HEALTH_ERR if >= X PGs are stuck non-active.

This works for me now, but I would like to add a timer that a PG has to be inactive for more than Y seconds.

The PGMap contains "last_active" and "last_clean", but these timestamps are never updated. So I can't query for last_active =< (now() - 300) for example.

On a idle test cluster I have a PG for example:

"last_active": "2015-12-09 02:32:31.540712",

It's currently 08:53:56 here, so I can't check against last_active.

What would a good way be to see for how long a PG has been inactive?

Signature · 6 lines
Wido den Hollander
42on B.V.
Ceph trainer and consultant

Phone: +31 (0)20 700 9902
Skype: contact42on
#1 lore raw

Hi Wido!

Quoted 12 lines · Wido den Hollander

Hi,

I'm working on a patch in PGMonitor.cc that sets the state to HEALTH_ERR if >= X PGs are stuck non-active.

This works for me now, but I would like to add a timer that a PG has to be inactive for more than Y seconds.

The PGMap contains "last_active" and "last_clean", but these timestamps are never updated. So I can't query for last_active =< (now() - 300) for example.

Quoted 7 lines

On a idle test cluster I have a PG for example:

"last_active": "2015-12-09 02:32:31.540712",

It's currently 08:53:56 here, so I can't check against last_active.

What would a good way be to see for how long a PG has been inactive?

It sounds like maybe the current code is subtley broken:

	https://github.com/ceph/ceph/blob/master/src/osd/PG.cc#L2566

The last_active/clean etc should be fresh within
osd_pg_stat_report_interval_max seconds...

sage

#2 lore raw
Quoted 21 lines · Sage Weil

Hi Wido!

Quoted 18 lines · Wido den Hollander

Hi,

I'm working on a patch in PGMonitor.cc that sets the state to HEALTH_ERR if >= X PGs are stuck non-active.

This works for me now, but I would like to add a timer that a PG has to be inactive for more than Y seconds.

The PGMap contains "last_active" and "last_clean", but these timestamps are never updated. So I can't query for last_active =< (now() - 300) for example.

On a idle test cluster I have a PG for example:

"last_active": "2015-12-09 02:32:31.540712",

It's currently 08:53:56 here, so I can't check against last_active.

Quoted 9 lines
Quoted 1 line

What would a good way be to see for how long a PG has been inactive?

It sounds like maybe the current code is subtley broken:

	https://github.com/ceph/ceph/blob/master/src/osd/PG.cc#L2566

The last_active/clean etc should be fresh within
osd_pg_stat_report_interval_max seconds...

Indeed, that seems broken. I created a issue for it:
http://tracker.ceph.com/issues/14028

I'm not sure where to start (yet).

Quoted 6 lines

sage
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 6 lines
Wido den Hollander
42on B.V.
Ceph trainer and consultant

Phone: +31 (0)20 700 9902
Skype: contact42on