Skip to content

Commit

Permalink
osd/PG.cc: handle removal of pgmeta object
Browse files Browse the repository at this point in the history
In 7f04700, we made the pg removal code
much more efficient. But it started marking the pgmeta object as an unexpected
onode, which in reality is expected to be removed after all the other objects.

This behavior is very easily reproducible in a vstart cluster:

ceph osd pool create test 1 1
rados -p test bench 10 write --no-cleanup
ceph osd pool delete test test  --yes-i-really-really-mean-it

Before this patch:

"do_delete_work additional unexpected onode list (new onodes has appeared
since PG removal started[#2:00000000::::head#]" seen in the OSD logs.

After this patch:

"do_delete_work removing pgmeta object #2:00000000::::head#" is seen.

Related to:https://tracker.ceph.com/issues/50466
Signed-off-by: Neha Ojha <nojha@redhat.com>
(cherry picked from commit 0e917f1)
  • Loading branch information
neha-ojha authored and cfsnyder committed Jun 1, 2021
1 parent c44bc49 commit 0b7f605
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/osd/PG.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3872,9 +3872,15 @@ ghobject_t PG::do_delete_work(ObjectStore::Transaction &t,
&olist,
&next);
if (!olist.empty()) {
dout(0) << __func__ << " additional unexpected onode list"
<<" (new onodes has appeared since PG removal started"
<< olist << dendl;
for (auto& oid : olist) {
if (oid == pgmeta_oid) {
dout(20) << __func__ << " removing pgmeta object " << oid << dendl;
} else {
dout(0) << __func__ << " additional unexpected onode"
<<" new onode has appeared since PG removal started"
<< oid << dendl;
}
}
}
}

Expand Down

0 comments on commit 0b7f605

Please sign in to comment.