Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osd/PG: fix cleanup of pgmeta-like objects on PG deletion; disallow empty object names #27929

Merged
merged 3 commits into from May 7, 2019

Conversation

liewegas
Copy link
Member

@liewegas liewegas commented May 2, 2019

@@ -1858,6 +1858,11 @@ void PrimaryLogPG::do_op(OpRequestRef& op)
osd->reply_op_error(op, -ENAMETOOLONG);
return;
}
if (m->get_hobj().oid.name.empty()) {
dout(4) << "do_op empty oid name is not allowed" << dendl;
Copy link
Member

Choose a reason for hiding this comment

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

should we include a cluster log here so that we catch it if rgw/rbd/cephfs does this during testing?

Copy link
Member

@jdurgin jdurgin left a comment

Choose a reason for hiding this comment

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

looks good, would like to be able to catch if a rados users does this during testing

If an object has an empty 'name' field, it "looks" like a pgmeta object,
and the PG cleanup code was skipping it.  However, we were letting these
objects get created.

Fix by only skipping *our* pgmeta object.  If there are other pgmeta-like
objects in the PG collection, clean them up.

Fixes: https://tracker.ceph.com/issues/38724
Signed-off-by: Sage Weil <sage@redhat.com>
These may conflict with pgmeta objects.  And are going to cause other
problems later (e.g., https://tracker.ceph.com/issues/38724).

Signed-off-by: Sage Weil <sage@redhat.com>
This is always a bug (OSD doesn't try to remove a collection unless it
thinks it is empty), and not seeing it at default debug levels makes it
hard to track down.

Signed-off-by: Sage Weil <sage@redhat.com>
@liewegas liewegas merged commit e387cbc into ceph:master May 7, 2019
liewegas added a commit that referenced this pull request May 7, 2019
* refs/pull/27929/head:
	os/bluestore: be verbose about objects that existing on rmcoll
	osd/PrimaryLogPG: disallow ops on objects with an empty name
	osd/PG: fix cleanup of pgmeta-like objects on PG deletion

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants