Bug #65766
openqa: perm denied for runing find on cephtest dir
0%
Description
After the test suite finishes running, during teardown/unwinding running find /home/ubuntu/cephtest unexpectedly prints Permission denied.
2024-05-01T12:20:19.816 DEBUG:teuthology.run_tasks:Unwinding manager internal.archive_upload
2024-05-01T12:20:19.828 INFO:teuthology.task.internal:Not uploading archives.
2024-05-01T12:20:19.828 DEBUG:teuthology.run_tasks:Unwinding manager internal.base
2024-05-01T12:20:19.849 INFO:teuthology.task.internal:Tidying up after the test...
2024-05-01T12:20:19.850 DEBUG:teuthology.orchestra.run.smithi088:> find /home/ubuntu/cephtest -ls ; rmdir -- /home/ubuntu/cephtest
2024-05-01T12:20:19.856 DEBUG:teuthology.orchestra.run.smithi195:> find /home/ubuntu/cephtest -ls ; rmdir -- /home/ubuntu/cephtest
2024-05-01T12:20:19.905 INFO:teuthology.orchestra.run.smithi088.stdout: 393580 4 drwxr-xr-x 3 ubuntu ubuntu 4096 May 1 12:20 /home/ubuntu/cephtest
2024-05-01T12:20:19.905 INFO:teuthology.orchestra.run.smithi088.stdout: 527347 4 d--------- 2 ubuntu ubuntu 4096 May 1 12:15 /home/ubuntu/cephtest/mnt.0
2024-05-01T12:20:19.905 INFO:teuthology.orchestra.run.smithi088.stderr:find: ‘/home/ubuntu/cephtest/mnt.0’: Permission denied
2024-05-01T12:20:19.908 DEBUG:teuthology.orchestra.run:got remote process result: 1
2024-05-01T12:20:19.908 INFO:teuthology.orchestra.run.smithi088.stderr:rmdir: failed to remove '/home/ubuntu/cephtest': Directory not empty
2024-05-01T12:20:19.909 ERROR:teuthology.run_tasks:Manager failed: internal.base
Traceback (most recent call last):
File "/home/teuthworker/src/git.ceph.com_teuthology_9481b1d62f50e7d0a4f3dd83adf6945b08d5ff17/teuthology/run_tasks.py", line 154, in run_tasks
suppress = manager.__exit__(*exc_info)
File "/usr/lib/python3.8/contextlib.py", line 120, in __exit__
next(self.gen)
File "/home/teuthworker/src/git.ceph.com_teuthology_9481b1d62f50e7d0a4f3dd83adf6945b08d5ff17/teuthology/task/internal/__init__.py", line 53, in base
run.wait(
File "/home/teuthworker/src/git.ceph.com_teuthology_9481b1d62f50e7d0a4f3dd83adf6945b08d5ff17/teuthology/orchestra/run.py", line 479, in wait
proc.wait()
File "/home/teuthworker/src/git.ceph.com_teuthology_9481b1d62f50e7d0a4f3dd83adf6945b08d5ff17/teuthology/orchestra/run.py", line 161, in wait
self._raise_for_status()
File "/home/teuthworker/src/git.ceph.com_teuthology_9481b1d62f50e7d0a4f3dd83adf6945b08d5ff17/teuthology/orchestra/run.py", line 181, in _raise_for_status
raise CommandFailedError(
teuthology.exceptions.CommandFailedError: Command failed on smithi088 with status 1: 'find /home/ubuntu/cephtest -ls ; rmdir -- /home/ubuntu/cephtest'
2024-05-01T12:20:19.910 DEBUG:teuthology.run_tasks:Unwinding manager kernel
2024-05-01T12:20:19.922 DEBUG:teuthology.run_tasks:Unwinding manager console_log
2024-05-01T12:20:19.950 DEBUG:teuthology.run_tasks:Exception was not quenched, exiting: CommandFailedError: Command failed on smithi088 with status 1: 'find /home/ubuntu/cephtest -ls ; rmdir -- /home/ubuntu/cephtest'
2024-05-01T12:20:19.950 INFO:teuthology.nuke:Checking targets against current locks
RD Updated by Rishabh Dave over 2 years ago
- Description updated (diff)
RD Updated by Rishabh Dave over 2 years ago
- Component(FS) qa-suite added
- Labels (FS) qa, qa-failure added
VS Updated by Venky Shankar over 2 years ago
The error starts right after generic/099 finishes.
2024-05-01T05:59:02.523 DEBUG:teuthology.orchestra.run.smithi164:> (cd /home/ubuntu/cephtest/mnt.0 && exec sudo stat /tmp/tmp.dzlgQDISvdxfstests-dev/results) 2024-05-01T05:59:02.576 INFO:teuthology.orchestra.run.smithi164.stderr:bash: line 1: cd: /home/ubuntu/cephtest/mnt.0: Permission denied 2024-05-01T05:59:02.577 DEBUG:teuthology.orchestra.run:got remote process result: 1
I bet it's generic/099 that's changing perm for root, but, question is why have we started seeing this now?
KH Updated by Kotresh Hiremath Ravishankar over 2 years ago
- Assignee set to Rishabh Dave
VS Updated by Venky Shankar over 2 years ago
- Category set to Testing
- Priority changed from Normal to High
- Target version set to v20.0.0
- Backport set to quincy,reef,squid
This is consistency reproducible: https://pulpito.ceph.com/vshankar-2024-05-06_12:08:33-fs-wip-vshankar-testing-20240506.064357-testing-default-smithi/7693925/
Rishabh, please RCA asap.
VS Updated by Venky Shankar over 2 years ago
- Priority changed from High to Urgent
/a/vshankar-2024-06-18_04:14:30-fs-wip-vshankar-testing-20240617.094253-debug-testing-default-smithi/7761412
2024-06-22T06:15:42.669 DEBUG:teuthology.orchestra.run.smithi005:> find /home/ubuntu/cephtest -ls ; rmdir -- /home/ubuntu/cephtest 2024-06-22T06:15:42.671 DEBUG:teuthology.orchestra.run.smithi106:> find /home/ubuntu/cephtest -ls ; rmdir -- /home/ubuntu/cephtest 2024-06-22T06:15:42.677 INFO:teuthology.orchestra.run.smithi005.stdout: 658124 4 drwxr-xr-x 3 ubuntu ubuntu 4096 Jun 22 06:15 /home/ubuntu/cephtest 2024-06-22T06:15:42.677 INFO:teuthology.orchestra.run.smithi005.stdout: 681606 4 d--------- 2 ubuntu ubuntu 4096 Jun 22 06:12 /home/ubuntu/cephtest/mnt.0 2024-06-22T06:15:42.677 INFO:teuthology.orchestra.run.smithi005.stderr:find: '/home/ubuntu/cephtest/mnt.0': Permission denied 2024-06-22T06:15:42.679 INFO:teuthology.orchestra.run.smithi005.stderr:rmdir: failed to remove '/home/ubuntu/cephtest': Directory not empty 2024-06-22T06:15:42.684 DEBUG:teuthology.orchestra.run:got remote process result: 1
@Rishabh Dave Please have a look ASAP.
RD Updated by Rishabh Dave over 2 years ago
Venky Shankar wrote in #note-6:
/a/vshankar-2024-06-18_04:14:30-fs-wip-vshankar-testing-20240617.094253-debug-testing-default-smithi/7761412
[...]
@Rishabh Dave Please have a look ASAP.
Sure on it right now.
RD Updated by Rishabh Dave over 2 years ago
The crash while running unwinding code that lies in teuthology repo.
2024-06-25T13:15:37.196 DEBUG:teuthology.orchestra.run.smithi067:> find /home/ubuntu/cephtest -ls ; rmdir -- /home/ubuntu/cephtest 2024-06-25T13:15:37.202 DEBUG:teuthology.orchestra.run.smithi086:> find /home/ubuntu/cephtest -ls ; rmdir -- /home/ubuntu/cephtest 2024-06-25T13:15:37.252 INFO:teuthology.orchestra.run.smithi067.stdout: 393724 4 drwxr-xr-x 3 ubuntu ubuntu 4096 Jun 25 13:15 /home/ubuntu/cephtest 2024-06-25T13:15:37.252 INFO:teuthology.orchestra.run.smithi067.stdout: 393274 4 d--------- 2 ubuntu ubuntu 4096 Jun 25 13:10 /home/ubuntu/cephtest/mnt.0 2024-06-25T13:15:37.252 INFO:teuthology.orchestra.run.smithi067.stderr:find: ‘/home/ubuntu/cephtest/mnt.0’: Permission denied 2024-06-25T13:15:37.255 DEBUG:teuthology.orchestra.run:got remote process result: 1 2024-06-25T13:15:37.255 INFO:teuthology.orchestra.run.smithi067.stderr:rmdir: failed to remove '/home/ubuntu/cephtest': Directory not empty
But it fails code to delete mountpoint fails silently (it should not fail silently because it makes catching it unnecessarily difficult)
The mountpoint fails because permission on the mountpoint changes while the tests were running -
2024-06-26T11:50:32.555 INFO:tasks.cephfs.mount:Cleaning up mount [email protected] 2024-06-26T11:50:32.555 INFO:teuthology.orchestra.run:Running command with timeout 300 2024-06-26T11:50:32.555 DEBUG:teuthology.orchestra.run.smithi052:> (cd /home/ubuntu/cephtest && exec rmdir -- /home/ubuntu/cephtest/mnt.0)
This change inaccessibility can be seen when an attempt is made to save the results directory -
2024-06-25T11:45:27.286 DEBUG:teuthology.orchestra.run.smithi043:> (cd /home/ubuntu/cephtest/mnt.0 && exec sudo stat /tmp/tmp.EXqjF8vIYoxfstests-dev/results) 2024-06-25T11:45:27.337 INFO:teuthology.orchestra.run.smithi043.stderr:bash: line 1: cd: /home/ubuntu/cephtest/mnt.0: Permission denied 2024-06-25T11:45:27.338 DEBUG:teuthology.orchestra.run:got remote process result: 1
On adding some more log entries to this test it is confirmed that permission bits and owner has been changed during testing. Link to the run where extra log entries were added for the sake of debugging - http://qa-proxy.ceph.com/teuthology/rishabh-2024-06-26_11:15:08-fs:functional-rishabh-mgr-vol-clone-stats-testing-default-smithi/7773258/teuthology.log.
Permission just before the test is run -
2024-06-26T11:53:13.107 INFO:teuthology.orchestra.run.smithi052.stdout:-rw-r--r-- 1 root root 13176 Jun 26 11:49 valgrind.supp
And permissions just after test is run -
2024-06-26T11:53:14.236 INFO:teuthology.orchestra.run.smithi052.stdout:d--------- 2 ubuntu ubuntu 4096 Jun 26 11:51 mnt.0
And this change happens exactly while the test is running, this is apprent following more detailed snippet for above log entries -
2024-06-26T11:53:13.038 DEBUG:teuthology.orchestra.run.smithi052:> (cd /home/ubuntu/cephtest/mnt.0 && exec sudo ls -lR /home/ubuntu/cephtest) 2024-06-26T11:53:13.106 INFO:teuthology.orchestra.run.smithi052.stdout:/home/ubuntu/cephtest: 2024-06-26T11:53:13.106 INFO:teuthology.orchestra.run.smithi052.stdout:total 25 2024-06-26T11:53:13.106 INFO:teuthology.orchestra.run.smithi052.stdout:drwxr-xr-x 4 ubuntu ubuntu 4096 Jun 26 11:38 archive 2024-06-26T11:53:13.107 INFO:teuthology.orchestra.run.smithi052.stdout:drwxr-xr-x 2 ubuntu ubuntu 4096 Jun 26 11:49 ceph.data 2024-06-26T11:53:13.107 INFO:teuthology.orchestra.run.smithi052.stdout:drwxrwxrwt 4 root root 0 Jun 26 11:51 mnt.0 2024-06-26T11:53:13.107 INFO:teuthology.orchestra.run.smithi052.stdout:-rw-r--r-- 1 root root 13176 Jun 26 11:49 valgrind.supp ... 2024-06-26T11:53:13.110 DEBUG:teuthology.orchestra.run.smithi052:running tests for ACLs from xfstests-dev> (cd /tmp/tmp.LUaFrdHMaexfstests-dev && exec sudo env DIFF_LENGTH=0 ./check generic/099) 2024-06-26T11:53:13.465 INFO:teuthology.orchestra.run.smithi052.stdout:FSTYP -- ceph-fuse 2024-06-26T11:53:13.475 INFO:teuthology.orchestra.run.smithi052.stdout:PLATFORM -- Linux/x86_64 smithi052 6.9.0-gff88c41504f3 #1 SMP PREEMPT_DYNAMIC Wed Jun 19 16:44:17 UTC 2024 2024-06-26T11:53:13.475 INFO:teuthology.orchestra.run.smithi052.stdout: 2024-06-26T11:53:14.171 INFO:teuthology.orchestra.run.smithi052.stdout:generic/099 1s 2024-06-26T11:53:14.185 INFO:teuthology.orchestra.run.smithi052.stdout:Ran: generic/099 2024-06-26T11:53:14.186 INFO:teuthology.orchestra.run.smithi052.stdout:Passed all 1 tests ... 2024-06-26T11:53:14.212 DEBUG:teuthology.orchestra.run.smithi052:> (cd /home/ubuntu/cephtest && exec sudo ls -lR) 2024-06-26T11:53:14.235 INFO:teuthology.orchestra.run.smithi052.stdout:.: 2024-06-26T11:53:14.235 INFO:teuthology.orchestra.run.smithi052.stdout:total 28 2024-06-26T11:53:14.235 INFO:teuthology.orchestra.run.smithi052.stdout:drwxr-xr-x 4 ubuntu ubuntu 4096 Jun 26 11:38 archive 2024-06-26T11:53:14.235 INFO:teuthology.orchestra.run.smithi052.stdout:drwxr-xr-x 2 ubuntu ubuntu 4096 Jun 26 11:49 ceph.data 2024-06-26T11:53:14.236 INFO:teuthology.orchestra.run.smithi052.stdout:d--------- 2 ubuntu ubuntu 4096 Jun 26 11:51 mnt.0 2024-06-26T11:53:14.236 INFO:teuthology.orchestra.run.smithi052.stdout:-rw-r--r-- 1 root root 13176 Jun 26 11:49 valgrind.supp 2024-06-26T11:53:14.236 INFO:teuthology.orchestra.run.smithi052.stdout:
For this, I checked xfstests-dev repo's tests/generic/099 used git blame for this) and there are no find any recent changes. Therefore this is very strange that we didn't see this issue earlier.
The path ahead, IMO, is to run this test locally and, if it can be reproduced, to check and ensure that the issues doesn't originate from elsewhere in xfstests-dev repo.
VS Updated by Venky Shankar over 2 years ago
The 000 perms is coming from
def _create_mntpt(self):
self.client_remote.run(args=f'mkdir -p -v {self.hostfs_mntpt}',
timeout=60)
# Use 0000 mode to prevent undesired modifications to the mountpoint on
# the local file system.
self.client_remote.run(args=f'chmod 0000 {self.hostfs_mntpt}',
timeout=60)
from qa/tasks/cephfs/mount.py and the removal fails once the fuse mounted is unmounted (so the 000 perms are seen). Question is, why does it happen only in this (test_acls.py) run.
VS Updated by Venky Shankar over 2 years ago
This is the bug. cd in to a directory with 000 perms:
2024-06-26T11:53:14.241 DEBUG:teuthology.orchestra.run.smithi052:> (cd /home/ubuntu/cephtest/mnt.0 && exec sudo ls -lR /home/ubuntu/cephtest/mnt.0) 2024-06-26T11:53:14.293 INFO:teuthology.orchestra.run.smithi052.stderr:bash: line 1: cd: /home/ubuntu/cephtest/mnt.0: Permission denied 2024-06-26T11:53:14.294 DEBUG:teuthology.orchestra.run:got remote process result: 1 2024-06-26T11:53:14.295 INFO:tasks.cephfs.test_acls:proc2.returncode = 1
It should be cd /home/ubuntu/cephtest && sudo ls -lR /home/ubuntu/cephtest/mnt.0.
VS Updated by Venky Shankar over 2 years ago · Edited
Venky Shankar wrote in #note-10:
This is the bug. cd in to a directory with
000perms:[...]
It should be
cd /home/ubuntu/cephtest && sudo ls -lR /home/ubuntu/cephtest/mnt.0.
rishabh-d-dave mentioned in standup today that the "cd ..." is executed with check_status=False, so the test is not erroring out at this point, but the cd .. itself is buggy since its trying to change dir to 000 chmod'ed dir. That needs a cleanup IMO.
Now, looking further, the test bailout happens here
2024-06-26T11:54:09.207 INFO:teuthology.orchestra.run.smithi052.stderr:find: '/home/ubuntu/cephtest/mnt.0': Permission denied 2024-06-26T11:54:09.208 INFO:teuthology.orchestra.run.smithi052.stderr:rmdir: failed to remove '/home/ubuntu/cephtest': Directory not empty 2024-06-26T11:54:09.224 DEBUG:teuthology.orchestra.run:got remote process result: 1
Since its trying to find and then rmdir, but the find fails since its trying to recursively enter mnt.0 which is 000 perm with without a sudo prefix. Shouldn't this happen with other runs too @Rishabh Dave ?
RD Updated by Rishabh Dave over 2 years ago
Venky Shankar wrote in #note-11:
Venky Shankar wrote in #note-10:
This is the bug. cd in to a directory with
000perms:[...]
It should be
cd /home/ubuntu/cephtest && sudo ls -lR /home/ubuntu/cephtest/mnt.0.rishabh-d-dave mentioned in standup today that the "cd ..." is executed with
check_status=False, so the test is not erroring out at this point, but thecd ..itself is buggy since its trying to change dir to000chmod'ed dir. That needs a cleanup IMO.Now, looking further, the test bailout happens here
[...]
Since its trying to
findand thenrmdir, but thefindfails since its trying to recursively entermnt.0which is000permwithwithout asudoprefix. Shouldn't this happen with other runs too @Rishabh Dave ?
It should but it doesn't which is why we were initially thinking something unusual was done by generic/099 (which wasn't right).
VS Updated by Venky Shankar over 2 years ago
Rishabh Dave wrote in #note-12:
Venky Shankar wrote in #note-11:
Venky Shankar wrote in #note-10:
This is the bug. cd in to a directory with
000perms:[...]
It should be
cd /home/ubuntu/cephtest && sudo ls -lR /home/ubuntu/cephtest/mnt.0.rishabh-d-dave mentioned in standup today that the "cd ..." is executed with
check_status=False, so the test is not erroring out at this point, but thecd ..itself is buggy since its trying to change dir to000chmod'ed dir. That needs a cleanup IMO.Now, looking further, the test bailout happens here
[...]
Since its trying to
findand thenrmdir, but thefindfails since its trying to recursively entermnt.0which is000permwithwithout asudoprefix. Shouldn't this happen with other runs too @Rishabh Dave ?It should but it doesn't which is why we were initially thinking something unusual was done by
generic/099(which wasn't right).
@Rishabh Dave Any update on this?
VS Updated by Venky Shankar about 2 years ago
Seen again: /a/vshankar-2024-10-17_06:38:16-fs-wip-vshankar-testing-20241016.135728-debug-testing-default-smithi/7953167
@Rishabh Dave Could you please revisit this?
VS Updated by Venky Shankar about 2 years ago
- Related to Bug #68640: quincy: fsstress.sh workunit timeout with ceph-fuse added
VS Updated by Venky Shankar almost 2 years ago
- Priority changed from Urgent to Immediate
- Source set to Q/A
/a/vshankar-2024-12-19_10:00:45-fs-wip-vshankar-testing-20241219.063429-debug-testing-default-smithi/8044510
@Rishabh Dave - PTAL. This has started recurring. Please get an RCA.
KS Updated by Konstantin Shalygin almost 2 years ago
- Backport changed from quincy,reef,squid to reef,squid
VS Updated by Venky Shankar almost 2 years ago
- Related to Bug #70223: qa: mnt.0 cleanup fails ( Command failed on smithi003 with status 1: 'find /home/ubuntu/cephtest -ls ; rmdir -- /home/ubuntu/cephtest' ) added
VS Updated by Venky Shankar almost 2 years ago
Bumping this up for @Rishabh Dave
VS Updated by Venky Shankar over 1 year ago
/a/vshankar-2025-03-12_09:22:14-fs-wip-vshankar-testing-20250306.043526-debug-testing-default-smithi/8183585
@Rishabh Dave PTAL!
VS Updated by Venky Shankar over 1 year ago
- Related to Bug #70453: qa: test_acls premature umount at test completion causes `Command failed on smithi076 with status 1: 'find /home/ubuntu/cephtest -ls ; rmdir -- /home/ubuntu/cephtest'` added
VS Updated by Venky Shankar over 1 year ago
Bumping again!
RD Updated by Rishabh Dave over 1 year ago
@Venky Shankar I am engaged with working on plenty PRs right now. It'll take time to catch up on this one.
PD Updated by Patrick Donnelly over 1 year ago
- Target version deleted (
v20.0.0)
KH Updated by Kumar Hemanth over 1 year ago · Edited
----
2025-06-30T12:58:38.449 INFO:teuthology.orchestra.run.smithi088.stderr:rmdir: failed to remove '/home/ubuntu/cephtest': Directory not empty
2025-06-30T12:58:38.453 DEBUG:teuthology.orchestra.run:got remote process result: 1
2025-06-30T12:58:38.454 ERROR:teuthology.run_tasks:Manager failed: internal.base
Traceback (most recent call last):
File "/home/teuthworker/src/git.ceph.com_teuthology_b7b31fec51306b57da383f75076fbb1ff2e58dec/teuthology/run_tasks.py", line 160, in run_tasks
suppress = manager.__exit__(*exc_info)
File "/usr/lib/python3.10/contextlib.py", line 142, in exit
next(self.gen)
File "/home/teuthworker/src/git.ceph.com_teuthology_b7b31fec51306b57da383f75076fbb1ff2e58dec/teuthology/task/internal/__init__.py", line 53, in base
run.wait(
File "/home/teuthworker/src/git.ceph.com_teuthology_b7b31fec51306b57da383f75076fbb1ff2e58dec/teuthology/orchestra/run.py", line 485, in wait
proc.wait()
File "/home/teuthworker/src/git.ceph.com_teuthology_b7b31fec51306b57da383f75076fbb1ff2e58dec/teuthology/orchestra/run.py", line 161, in wait
self._raise_for_status()
File "/home/teuthworker/src/git.ceph.com_teuthology_b7b31fec51306b57da383f75076fbb1ff2e58dec/teuthology/orchestra/run.py", line 181, in _raise_for_status
raise CommandFailedError(
teuthology.exceptions.CommandFailedError: Command failed on smithi088 with status 1: 'find /home/ubuntu/cephtest ls ; rmdir - /home/ubuntu/cephtest'
KS Updated by Konstantin Shalygin 8 months ago
- Backport changed from reef,squid to squid