Project

General

Profile

Bug #45521

mds: layout parser does not handle [-.] in pool names

Added by Patrick Donnelly 2 months ago. Updated 29 days ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
-
Target version:
% Done:

0%

Source:
Development
Tags:
Backport:
octopus,nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
MDS
Labels (FS):
Pull request ID:
Crash signature:

Description

$ bin/ceph osd pool create cephfa-foo
$ bin/ceph fs add_data_pool a cephfa-foo
$ setfattr -n ceph.dir.layout -v 'stripe_unit=524288 stripe_count=8 object_size=4194304 pool=cephfa-foo' foo
setfattr: foo: Invalid argument

MDS log shows:

7f2260f54700 20 mds.0.server parse_layout_vxattr name layout value 'pool=cephfa-foo'
2020-05-13T17:59:51.205+0530 7f2260f54700 10 mds.0.server  parsed {pool=cephfa} left '-foo'
7f2260f54700  7 mds.0.server reply_client_request -22 ((22) Invalid argument) client_request(client.4156:6 setxattr #0x10000000000 ceph.dir.layout 2020-05-13T17:59:51.204109+0530 caller_uid=0, caller_gid=0{0,}) v4

Related issues

Copied to fs - Backport #45678: octopus: mds: layout parser does not handle [-.] in pool names Resolved
Copied to fs - Backport #45679: nautilus: mds: layout parser does not handle [-.] in pool names Resolved

History

#1 Updated by Jeff Layton 2 months ago

The kernel client only copies off the layout when given Fw or or Fr caps.

We could change the MDS to gratuitously set the layout field for any inode in the traces, and then just have the client always copy them. The expectation would be that you can't actually do anything with the layout without Fr or Fw, and we can just ensure that it's updated otherwise. We might need to do something to both client and MDS for that.

Another possibility:

The client currently does a getattr on most ceph vxattrs. The cap mask is usually 0, unless it's ceph.rstats* in which case it sets CEPH_CAP_FILE_WREXTEND. Is there a cap mask we could request that would give us the layout?

#2 Updated by Ramana Raja 2 months ago

  • Description updated (diff)

#3 Updated by Ramana Raja 2 months ago

  • Status changed from New to In Progress

#4 Updated by Zheng Yan 2 months ago

Jeff Layton wrote:

The kernel client only copies off the layout when given Fw or or Fr caps.

is this behavior related to this issue?

We could change the MDS to gratuitously set the layout field for any inode in the traces, and then just have the client always copy them. The expectation would be that you can't actually do anything with the layout without Fr or Fw, and we can just ensure that it's updated otherwise. We might need to do something to both client and MDS for that.

Another possibility:

The client currently does a getattr on most ceph vxattrs. The cap mask is usually 0, unless it's ceph.rstats* in which case it sets CEPH_CAP_FILE_WREXTEND. Is there a cap mask we could request that would give us the layout?

#5 Updated by Ramana Raja 2 months ago

  • Pull request ID set to 35063

#6 Updated by Jeff Layton about 2 months ago

Zheng Yan wrote:

is this behavior related to this issue?

Not at all -- I put this in the wrong tracker. Please disregard!

#7 Updated by Patrick Donnelly about 2 months ago

  • Status changed from In Progress to Pending Backport

#8 Updated by Nathan Cutler about 2 months ago

  • Copied to Backport #45678: octopus: mds: layout parser does not handle [-.] in pool names added

#9 Updated by Nathan Cutler about 2 months ago

  • Copied to Backport #45679: nautilus: mds: layout parser does not handle [-.] in pool names added

#10 Updated by Nathan Cutler 29 days ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Also available in: Atom PDF