Project

General

Profile

Bug #48313

client: ceph.dir.entries does not acquire necessary caps

Added by Jeff Layton 2 months ago. Updated about 1 month ago.

Status:
Pending Backport
Priority:
Normal
Assignee:
Category:
-
Target version:
% Done:

0%

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

Description

Cloned from linux kernel client tracker #48104. The userland client needs the same change to take Fs caps for dirstats. Original problem description follows:

The ceph-mgr asynchronously deletes a directory via libcephfs in the volumes plugin here:

2020-11-03T08:40:09.596+0000 7fbbd9bc4700  8 client.10692 rmdir(#0x10000000219/31bfb21d-b512-47a2-8dc0-c5de008f995e) = 0
2020-11-03T08:40:09.596+0000 7fbbd9bc4700  0 [volumes DEBUG volumes.fs.async_job] unregistering async job cephfs.b'31bfb21d-b512-47a2-8dc0-c5de008f995e' from thread <JobThread(puregejob.3, started daemon 140444788606720)>

From: /ceph/teuthology-archive/pdonnell-2020-11-03_04:01:15-fs:volumes-wip-pdonnell-testing-20201102.231317-distro-basic-smithi/5585695/remote/smithi140/log/ceph-mgr.y.log.gz

"0x10000000219" is /volumes/_deleting. The test then checks if the directory is empty:

2020-11-03T08:39:36.381 INFO:teuthology.orchestra.run.smithi140:> (cd /home/ubuntu/cephtest/mnt.0 && exec sudo getfattr --only-values -n ceph.dir.entries /home/ubuntu/cephtest/mnt.0/./volumes/_deleting)
2020-11-03T08:39:36.424 INFO:teuthology.orchestra.run.smithi140.stderr:getfattr: Removing leading '/' from absolute path names
2020-11-03T08:39:36.425 INFO:teuthology.orchestra.run.smithi140.stdout:2
2020-11-03T08:39:37.232 INFO:teuthology.orchestra.run.smithi140:> sudo logrotate /etc/logrotate.d/ceph-test.conf
2020-11-03T08:39:37.235 INFO:teuthology.orchestra.run.smithi171:> sudo logrotate /etc/logrotate.d/ceph-test.conf
2020-11-03T08:39:37.426 INFO:teuthology.orchestra.run:Running command with timeout 900
2020-11-03T08:39:37.427 INFO:teuthology.orchestra.run.smithi140:> (cd /home/ubuntu/cephtest/mnt.0 && exec sudo getfattr --only-values -n ceph.dir.entries /home/ubuntu/cephtest/mnt.0/./volumes/_deleting)
2020-11-03T08:39:37.464 INFO:teuthology.orchestra.run.smithi140.stderr:getfattr: Removing leading '/' from absolute path names
2020-11-03T08:39:37.465 INFO:teuthology.orchestra.run.smithi140.stdout:1
...
2020-11-03T08:40:06.432 INFO:teuthology.orchestra.run:Running command with timeout 900
2020-11-03T08:40:06.433 INFO:teuthology.orchestra.run.smithi140:> (cd /home/ubuntu/cephtest/mnt.0 && exec sudo getfattr --only-values -n ceph.dir.entries /home/ubuntu/cephtest/mnt.0/./volumes/_deleting)
2020-11-03T08:40:06.465 INFO:teuthology.orchestra.run.smithi140.stderr:getfattr: Removing leading '/' from absolute path names
2020-11-03T08:40:06.466 INFO:teuthology.orchestra.run.smithi140.stdout:1

From: /ceph/teuthology-archive/pdonnell-2020-11-03_04:01:15-fs:volumes-wip-pdonnell-testing-20201102.231317-distro-basic-smithi/5585695/teuthology.log

It does not seem that the xattr lookup acquires the necessary caps to be cache coherent. I will convert the test to use readdir but the xattr code needs fixed.


Related issues

Copied from Linux kernel client - Bug #48104: fs/ceph: ceph.dir.entries does not acquire necessary caps Fix Under Review
Copied to CephFS - Backport #48643: nautilus: client: ceph.dir.entries does not acquire necessary caps In Progress
Copied to CephFS - Backport #48644: octopus: client: ceph.dir.entries does not acquire necessary caps In Progress

History

#1 Updated by Jeff Layton 2 months ago

  • Copied from Bug #48104: fs/ceph: ceph.dir.entries does not acquire necessary caps added

#2 Updated by Patrick Donnelly about 2 months ago

  • Subject changed from fs/ceph: ceph.dir.entries does not acquire necessary caps to client: ceph.dir.entries does not acquire necessary caps
  • Target version set to v16.0.0
  • Backport set to octopus,nautilus
  • Component(FS) Client added

@Jeff, you marked this as "Fix under review" but where is the PR?

#3 Updated by Jeff Layton about 2 months ago

  • Status changed from Fix Under Review to In Progress

My mistake -- fix isn't quite ready yet. We might want to roll in a fix that gets the same caps when we look for the the dir link count, but the userland client code is structured a bit differently from the kernel and it's not a straightforward change.

#4 Updated by Patrick Donnelly about 2 months ago

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 38355

#5 Updated by Patrick Donnelly about 1 month ago

  • Status changed from Fix Under Review to Pending Backport

#6 Updated by Backport Bot about 1 month ago

  • Copied to Backport #48643: nautilus: client: ceph.dir.entries does not acquire necessary caps added

#7 Updated by Backport Bot about 1 month ago

  • Copied to Backport #48644: octopus: client: ceph.dir.entries does not acquire necessary caps added

Also available in: Atom PDF