Actions
Bug #15303
closedClient holds incorrect complete flag on dir after losing caps
Status:
Resolved
Priority:
Urgent
Assignee:
-
Category:
-
Target version:
-
% Done:
0%
Source:
other
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
We saw this from testing Manila. The symptom is that the Manila driver gets ENOTEMPTY when trying to remove a share. Upon investigation, we saw that the readdirs in CephFSVolumeClient were getting only [".", ".."] for directories that really contained files, so the recursive removal of files wasn't happening.
Initially I thought this would be some quirk associated with the way the cephfsvolumeclient 'delete' phase moves a dir immediately before the 'purge' phase does the recursive deletion, but it turns out this issue is apparent even without moving the dir.
def test_purge_bug(self): for m in self.mounts: m.umount_wait() # Create a dir on mount A self.mount_a.mount() self.mount_a.run_shell(["mkdir", "parent1"]) self.mount_a.run_shell(["mkdir", "parent2"]) self.mount_a.run_shell(["mkdir", "parent1/mydir"]) # Put some files in it from mount B self.mount_b.mount() self.mount_b.run_shell(["touch", "parent1/mydir/afile"]) <---- if we ls from mount A here, we see afile self.mount_b.umount_wait() <---- if we ls from mount B here, we do not see afile # List the dir's contents on mount A <----- this assertion fails self.assertListEqual(self.mount_a.ls("parent1/mydir"), ["afile"])
Actions