You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
watchfs: PROPFIND still returns old filename after file renamed on filesystem #1810
#1809
run test OC_WRAPPER_URL=http://opencloud-server:5200 TEST_SERVER_URL=https://opencloud-server:9200 make test-acceptance-api BEHAT_FEATURE=tests/acceptance/features/collaborativePosix/collaborativePosixFS.feature:81
Steps to reproduce
user creates file new.txt
admin renames file to renamed.txt on filesystem
user request propfind
Expected behavior
file is renamed, user can open file
Actual behavior
user sees old file new.txt on web (in propfind response body). user cannot open file because file is not exist
see comment #1806 (comment)
Setup
Please describe how you started the server and provide a list of relevant environment variables or configuration files.
changed the title [-]PROPFIND still returns old filename after file renamed on filesystem[/-][+]watchfs: PROPFIND still returns old filename after file renamed on filesystem[/+]on Nov 18, 2025
Scenario: check propfind after rename file # /woodpecker/src/github.com/opencloud-eu/opencloud/tests/acceptance/features/collaborativePosix/collaborativePosixFS.feature:81
Given user "Alice" has uploaded file with content "content" to "test.txt" # FeatureContext::userHasUploadedAFileWithContentTo()
When the administrator renames the file "test.txt" to "new-name.txt" for user "Alice" on the POSIX filesystem # CliContext::theAdministratorRenamesFile()
Then the command should be successful # CliContext::theCommandShouldBeSuccessful()
When user "Alice" sends PROPFIND request to space "Personal" using the WebDAV API # SpacesContext::userSendsPropfindRequestToSpaceUsingTheWebdavApi()
Then the HTTP status code should be "207" # FeatureContext::thenTheHTTPStatusCodeShouldBe()
And as user "Alice" the PROPFIND response should contain a resource "new-name.txt" with these key and value pairs: # SpacesContext::asUsertheXMLResponseShouldContainMountpointWithTheseKeyAndValuePair()
| key | value |
| oc:fileid | %file_id_pattern% |
| oc:name | new-name.txt |
| oc:permissions | RDNVWZP |
| oc:privatelink | %base_url%/f/[0-9a-z-$%]+ |
| oc:size | 7 |
maybe we need wait 2-3 sec before request PROPFIND?
Yes and no. The test that failed in the last run (collaborativePosix/collaborativePosixFS.feature:159) is similar in some regards, so there is definitely a problem with renaming.
Scenario: check propfind after rename file # /woodpecker/src/github.com/[..]
maybe we need wait 2-3 sec before request PROPFIND?
Yes, adding some sleeps helps. But without that we end up with a corrupted node. It stays broken and the file cannot be downloaded anymore (even after a restart). That should actually never happen.
opencloud-eu/reva#808 (still open) helps with one part of this. It makes the scan at startup re-assimilate an item when its name or parent on disk differs from its metadata. So a file renamed on disk gets its new name after a restart, provided the id cache still has the old path.
It doesn't cover every case. If the id cache already points at the new path but the name xattr still has the old one, the scan leaves the old name. I tested both cases. It also doesn't fix the race between the watcher and a PROPFIND that comes right after the rename.
Correction to my last comment: opencloud-eu/reva#808 now covers the other case too. With ed2114edd, a scan also fixes a file whose name xattr is still the old one when the id cache already points at the new path. The race between the watcher and a PROPFIND right after the rename is still not fixed.
Activity
rhafer commentedon Nov 10, 2025
I guess this is at least somewhat related to #1763. So I'll assign this to myself for now as I am working on the other issue already.
[-]PROPFIND still returns old filename after file renamed on filesystem[/-][+]watchfs: PROPFIND still returns old filename after file renamed on filesystem[/+]rhafer commentedon Nov 26, 2025
I can still reproduce this one. Even with that latest reva changes. 😢
using this "simple" command:
The propfind output still contains the old name. The file on disk is named
test.mdbut the name property in the xattrs istest.txtv-scharf commentedon Nov 26, 2025
https://ci.opencloud.eu/repos/3/pipeline/755/82
I see that test is green.
maybe we need wait 2-3 sec before request PROPFIND?
rhafer commentedon Nov 27, 2025
Yes and no. The test that failed in the last run (collaborativePosix/collaborativePosixFS.feature:159) is similar in some regards, so there is definitely a problem with renaming.
Yes, adding some
sleeps helps. But without that we end up with a corrupted node. It stays broken and the file cannot be downloaded anymore (even after a restart). That should actually never happen.rhafer commentedon Nov 27, 2025
Moving this to Prio3 as we agreed that this is not release-critical.
NickWalters commentedon Oct 14, 2026
opencloud-eu/reva#808 (still open) helps with one part of this. It makes the scan at startup re-assimilate an item when its name or parent on disk differs from its metadata. So a file renamed on disk gets its new name after a restart, provided the id cache still has the old path.
It doesn't cover every case. If the id cache already points at the new path but the
namexattr still has the old one, the scan leaves the old name. I tested both cases. It also doesn't fix the race between the watcher and a PROPFIND that comes right after the rename.fix(posix): pick up a rename that the id cache already knows about
NickWalters commentedon Oct 14, 2026
Correction to my last comment: opencloud-eu/reva#808 now covers the other case too. With ed2114edd, a scan also fixes a file whose
namexattr is still the old one when the id cache already points at the new path. The race between the watcher and a PROPFIND right after the rename is still not fixed.