Bug #44286
openCache tiering shows unfound objects after OSD reboots
0%
Description
We've got a cluster with a 3/2 size/min_size replicated cache pool in front of an erasure coded pool used for RBD.
Restarting OSDs sometimes results in unfound objects, example:
2/543658058 objects unfound (0.000%)
pg 19.12 has 1 unfound objects
pg 19.2d has 1 unfound objects
Possible data damage: 2 pgs recovery_unfound
pg 19.12 is active+recovery_unfound+undersized+degraded+remapped, acting [299,310], 1 unfound
pg 19.2d is active+recovery_unfound+undersized+degraded+remapped, acting [290,309], 1 unfound
# ceph pg 19.12 list_unfound
{
"num_missing": 1,
"num_unfound": 1,
"objects": [
{
"oid": {
"oid": "hit_set_19.12_archive_2020-02-25 13:43:50.256316Z_2020-02-25 13:43:50.325825Z",
"key": "",
"snapid": -2,
"hash": 18,
"max": 0,
"pool": 19,
"namespace": ".ceph-internal"
},
"need": "3312398'55868341",
"have": "0'0",
"flags": "none",
"locations": []
}
],
"more": false
}
Both PGs affected here share an OSD (the one that's offline).
The cache tiering agent is busy flushing with around 300-500 MB/s while this happens.
The unfound objects stay unfound even after all OSDs are back online. The affected PG never goes below 2 online OSDs.
Restarting the OSDs does not change the state, so it's not an instance of https://tracker.ceph.com/issues/37439
Ceph version 14.2.6 (restarting to upgrade to 14.2.7). Also seen on 14.2.4 a few months ago.
Attached is a pg query on a PG in that state (from an earlier instance of this issue, also 14.2.6)
Files
PB Updated by Preben Berg over 6 years ago
Issue still present on 14.2.8.
PE Updated by Paul Emmerich over 6 years ago
this occasionally comes up on the mailing list as well. it's not reproducible on my test setup, though :(
JL Updated by Jan-Philipp Litza almost 6 years ago
We even hit that bug twice today by rebooting two of our cache servers.
What's interesting is that only hit_set objects ever went missing. What's even more peculiar is the timestamps in their object IDs are from the downtime of the host, but they are only reported unfound after the host rejoined the cluster.
So either the objects were never created in the first place (but Ceph somehow assumes that they must exist), or they are created on another host but then somehow get lost during recovery. But since the cache pool has a size of 2, the latter seems highly implausible.
BTW, this happened on version 14.2.16, and after understanding the situation we simply marked the objects lost without any apparent adverse consequences.
PS Updated by Pawel Stefanski over 5 years ago
Jan-Philipp Litza wrote:
We even hit that bug twice today by rebooting two of our cache servers.
What's interesting is that only hit_set objects ever went missing. What's even more peculiar is the timestamps in their object IDs are from the downtime of the host, but they are only reported unfound after the host rejoined the cluster.
So either the objects were never created in the first place (but Ceph somehow assumes that they must exist), or they are created on another host but then somehow get lost during recovery. But since the cache pool has a size of 2, the latter seems highly implausible.
BTW, this happened on version 14.2.16, and after understanding the situation we simply marked the objects lost without any apparent adverse consequences.
I can confirm at 14.2.22 it still occurs.
JL Updated by Jan-Philipp Litza about 5 years ago
Update: Also happens with 16.2.5 :-(
MC Updated by marek czardybon almost 5 years ago
the problem still exists on 15.2.15.
I've also got replicated size 3 min_size 2.
the problem occurs only when one OSD is restarted.
PS Updated by Pawel Stefanski over 2 years ago
And happened again, the situation:
1. cluster running a long time with cache overlay set as writeback (pool with size=3, min_size=2)
2. recently (a week ago) changed to readproxy during the cache overlay removal procedure
3. slow ops arised with mentioned a osd.155
4. osd.155 was restarted and during shutdown this appeared
2024-07-21T20:31:20.642+0000 7f4e0846e700 1 osd.155 pg_epoch: 5370473 pg[12.8( v 5370466'17573857 lc 5370375'17567918 (5370464'17571176,5370466'17573857] local-lis/les=5338648/5338649 n=4939 ec=50966/50966 lis/c=5338648/5338648 les/c/f=5338649/5338649/0 sis=5370473) [155,172,162]/[162] r=-1 lpr=5370473 pi=[5338648,5370473)/1 luod=0'0 lua=5370453'17569448 crt=5370466'17573857 mlcod 0'0 active+remapped m=1 mbc={}] start_peering_interval up [155,172,162] -> [155,172,162], acting [162,172] -> [162], acting_primary 162 -> 162, up_primary 155 -> 155, role -1 -> -1, features acting 4540138320759226367 upacting 4540138320759226367
2024-07-21T20:31:20.642+0000 7f4e0846e700 1 osd.155 pg_epoch: 5370473 pg[12.8( v 5370466'17573857 lc 5370375'17567918 (5370464'17571176,5370466'17573857] local-lis/les=5338648/5338649 n=4939 ec=50966/50966 lis/c=5338648/5338648 les/c/f=5338649/5338649/0 sis=5370473) [155,172,162]/[162] r=-1 lpr=5370473 pi=[5338648,5370473)/1 crt=5370466'17573857 mlcod 0'0 remapped NOTIFY m=1 mbc={}] state<Start>: transitioning to Stray
2024-07-21T20:31:21.746+0000 7f4e04466700 1 osd.155 pg_epoch: 5370474 pg[12.8( v 5370466'17573857 lc 5370375'17567918 (5370464'17571176,5370466'17573857] local-lis/les=5338648/5338649 n=4939 ec=50966/50966 lis/c=5370455/5338648 les/c/f=5370456/5338649/0 sis=5370474 pruub=7.351997852s) [155,172,162] r=0 lpr=5370474 pi=[5338648,5370474)/1 crt=5370466'17573857 mlcod 0'0 unknown NOTIFY pruub 272.847076416s@ m=1 mbc={}] start_peering_interval up [155,172,162] -> [155,172,162], acting [162] -> [155,172,162], acting_primary 162 -> 155, up_primary 155 -> 155, role -1 -> 0, features acting 4540138320759226367 upacting 4540138320759226367
2024-07-21T20:31:21.746+0000 7f4e04466700 1 osd.155 pg_epoch: 5370474 pg[12.8( v 5370466'17573857 lc 5370375'17567918 (5370464'17571176,5370466'17573857] local-lis/les=5338648/5338649 n=4939 ec=50966/50966 lis/c=5370455/5338648 les/c/f=5370456/5338649/0 sis=5370474 pruub=7.351997852s) [155,172,162] r=0 lpr=5370474 pi=[5338648,5370474)/1 crt=5370466'17573857 mlcod 0'0 unknown pruub 272.847076416s@ m=1 mbc={}] state<Start>: transitioning to Primary
2024-07-21T20:31:22.826+0000 7f4e04466700 0 osd.155 pg_epoch: 5370475 pg[12.8( v 5370466'17573857 lc 0'0 (5370464'17571176,5370466'17573857] local-lis/les=5370474/5370475 n=4939 ec=50966/50966 lis/c=5370474/5338648 les/c/f=5370475/5338649/0 sis=5370474) [155,172,162] r=0 lpr=5370474 pi=[5338648,5370474)/1 crt=5370466'17573857 lcod 5370375'17567918 mlcod 0'0 active+recovering+degraded rops=1 m=1 u=1 mbc={255={(0+0)=1}}] on_failed_pull 12:10000000:.ceph-internal::hit_set_12.8_archive_2024-07-21 20%3a26%3a34.780240Z_2024-07-21 20%3a26%3a34.894503Z:head from shard 172, reps on unfound? 1
2024-07-21T20:32:11.495+0000 7f4e04466700 -1 log_channel(cluster) log [ERR] : 12.8 has 1 objects unfound and apparently lost
then unfounds were found also on other ".ceph-internal::hit_set_12.8_archive_2024-07-21" objects that I had to delete.
AD Updated by Anthony D'Atri over 2 years ago
With both cache tiering and the releases mentioned deprecated I suspect that this will never see action. @Zac Dover does that warrant closing?
PS Updated by Pawel Stefanski over 2 years ago
Just to mention - I'm running ceph version 17.2.7 (b12291d110049b2f35e32e0de30d70e9a4c060d2) quincy (stable)
I do understand that the cache tier is depracated feature, but still a lot of instalations running on quincy. Maybe some warning or heads-up in docs would be nice.
Workaround with deleting the missing/unfound objects is safe imho (as long as the objects are a part of `.ceph-internal::hit_set_PGID_archive_`.
LF Updated by Laura Flores over 2 years ago
- Status changed from New to Need More Info
Note from bug scrub:
@pejotes there is already a note in the quincy docs about cache tiering being deprecated: https://docs.ceph.com/en/quincy/rados/operations/cache-tiering/
Is there something additional you think should be added?
LF Updated by Laura Flores over 2 years ago
Bump up: Need more info about what in the docs is missing.
LF Updated by Laura Flores over 2 years ago
Bump up
PS Updated by Pawel Stefanski over 2 years ago
hi Laura, sorry for a late message, vacation period here :-)
Yes, there is a note about cache tiering being deprecated and many current users may (as we are) head to reef upgrade, so dropping this tier is required. During the procedure we encountered (and others as reported above) situation when objects from a hitset list get lost, this happened twice of us (on two tries ;-) ) and while just dropping them by marking lost is went perfectly fine for us I can totally understand stress level and possible frustration of any operator going that path and having the same issue.
So I recommend to include simple reference to this tracker as a workaround solution for any operator impacted by lost objects from ".ceph-internal::hit_set_" list objects during cache tier removal.
RZ Updated by Radoslaw Zarzynski over 2 years ago
@Zac Dover: would you mind the doc improvement?
ZD Updated by Zac Dover over 2 years ago · Edited
Radoslaw Zarzynski wrote in #note-14:
@Zac Dover: would you mind the doc improvement?
@Radoslaw Zarzynski, I'm going to update the Quincy documentation with the console output and a note that explains that there has been a case in which the unfound objects were marked lost without any adverse consequences. There's unlikely to be a very high cost attached to the task of backporting this update from the Quincy release branch to earlier release branches. Let me know what you think.
Probably the Reef documentation should contain an explanation of this situation, intended to be read by people who are upgrading from Quincy to Reef. I think that this means creating two different documents (one for Reef and one for Quincy), but that should be fine as long as it is handled correctly.
I'll make you a reviewer of the change to the documentation. That way we can be sure that I'm not misrepresenting the technical situation.
ZD Updated by Zac Dover over 2 years ago
- Status changed from Need More Info to Fix Under Review
- Pull request ID set to 59348
RZ Updated by Radoslaw Zarzynski over 2 years ago
@pejotes: Hi Paweł! Would you mind taking a look as well?
PS Updated by Pawel Stefanski over 2 years ago
Looks good - as you perfectly described Zac it's about awareness and help to migrate out of cache layer, we can expect there will be more users doing that right now when upgrading to Reef so a note around that would be perfect as well.