[QA] files_external causes exceptions when disabled after use
Open
Nobody has claimed this yet.
QA:team
- Dominant language
- PHP
- Stars
- 8.8k
- Forks
- 2.1k
- Avg merge
- 20h 7m
- Merged PRs (30d)
- 41
Description
Seen in 10.10.0RC1
occ app:enable files_external- configure an external storage named "/SFTP"
occ app:disable files_external(this step was missing in my earlier report, sorry)- visit the admin web interface, visit the files view.
- A message is shown Storage for "/" is temporarily not available. Okayish.
- The path in that message is wrong. It should be "/SFTP". BAD
- Three exceptions are logged, when a user wants to access the /SFTP folder. BAD
{"reqId":"YnPltQ5C4Sbqgs0PTB36swAAAAY","level":0,"time":"2022-05-05T14:56:53+00:00","remoteAddr":"2.247.255.187","user":"admin","app":"webdav","method":"PROPFIND","url":"\/remote.php\/dav\/files\/admin\/SFTP","message":"Exception: HTTP\/1.1 503 Storage is temporarily not available: {\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\ServiceUnavailable\",\"Message\":\"Storage is temporarily not available\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Tree.php(70): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\ObjectTree->getNodeForPath()\\n#1 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/FilesPlugin.php(183): OCA\\\\DAV\\\\Tree->getNodeForPath()\\n#2 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/WildcardEmitterTrait.php(89): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\FilesPlugin->checkPropFind()\\n#3 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(472): Sabre\\\\DAV\\\\Server->emit()\\n#4 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(253): Sabre\\\\DAV\\\\Server->invokeMethod()\\n#5 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Server.php(349): Sabre\\\\DAV\\\\Server->start()\\n#6 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(31): OCA\\\\DAV\\\\Server->exec()\\n#7 \\\/var\\\/www\\\/owncloud\\\/remote.php(165): require_once('\\\/var\\\/www\\\/ownclo...')\\n#8 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/ObjectTree.php\",\"Line\":181}"}
{"reqId":"YnPltQ5C4Sbqgs0PTB36swAAAAY","level":0,"time":"2022-05-05T14:56:53+00:00","remoteAddr":"2.247.255.187","user":"admin","app":"webdav","method":"PROPFIND","url":"\/remote.php\/dav\/files\/admin\/SFTP","message":"Caused by: {\"Exception\":\"OCP\\\\Files\\\\StorageNotAvailableException\",\"Message\":\"\",\"Code\":1,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(532): OC\\\\Files\\\\Storage\\\\FailedStorage->getAvailability()\\n#1 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(532): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->getAvailability()\\n#2 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Availability.php(63): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->getAvailability()\\n#3 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Availability.php(74): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Availability->isAvailable()\\n#4 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Availability.php(392): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Availability->checkAvailability()\\n#5 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(385): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Availability->hasUpdated()\\n#6 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(385): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->hasUpdated()\\n#7 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(385): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->hasUpdated()\\n#8 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Cache\\\/Watcher.php(130): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->hasUpdated()\\n#9 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/View.php(1413): OC\\\\Files\\\\Cache\\\\Watcher->needsUpdate()\\n#10 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/View.php(1453): OC\\\\Files\\\\View->getCacheEntry()\\n#11 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/ObjectTree.php(179): OC\\\\Files\\\\View->getFileInfo()\\n#12 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Tree.php(70): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\ObjectTree->getNodeForPath()\\n#13 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/FilesPlugin.php(183): OCA\\\\DAV\\\\Tree->getNodeForPath()\\n#14 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/WildcardEmitterTrait.php(89): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\FilesPlugin->checkPropFind()\\n#15 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(472): Sabre\\\\DAV\\\\Server->emit()\\n#16 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(253): Sabre\\\\DAV\\\\Server->invokeMethod()\\n#17 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Server.php(349): Sabre\\\\DAV\\\\Server->start()\\n#18 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(31): OCA\\\\DAV\\\\Server->exec()\\n#19 \\\/var\\\/www\\\/owncloud\\\/remote.php(165): require_once('\\\/var\\\/www\\\/ownclo...')\\n#20 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/FailedStorage.php\",\"Line\":206}"}
{"reqId":"YnPltQ5C4Sbqgs0PTB36swAAAAY","level":0,"time":"2022-05-05T14:56:53+00:00","remoteAddr":"2.247.255.187","user":"admin","app":"webdav","method":"PROPFIND","url":"\/remote.php\/dav\/files\/admin\/SFTP","message":"Caused by: {\"Exception\":\"OCP\\\\Files\\\\StorageNotAvailableException\",\"Message\":\"\",\"Code\":1,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/External\\\/ConfigAdapter.php(110): OC\\\\Files\\\\External\\\\InvalidStorage->__construct()\\n#1 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/External\\\/ConfigAdapter.php(138): OC\\\\Files\\\\External\\\\ConfigAdapter->constructStorage()\\n#2 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Config\\\/MountProviderCollection.php(82): OC\\\\Files\\\\External\\\\ConfigAdapter->getMountsForUser()\\n#3 [internal function]: OC\\\\Files\\\\Config\\\\MountProviderCollection->OC\\\\Files\\\\Config\\\\{closure}(*** sensitive parameters replaced ***)\\n#4 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Config\\\/MountProviderCollection.php(83): array_map()\\n#5 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Filesystem.php(447): OC\\\\Files\\\\Config\\\\MountProviderCollection->getMountsForUser()\\n#6 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Filesystem.php(374): OC\\\\Files\\\\Filesystem::initMountPoints()\\n#7 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/util.php(311): OC\\\\Files\\\\Filesystem::init()\\n#8 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Filesystem.php(264): OC_Util::setupFS()\\n#9 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/View.php(1449): OC\\\\Files\\\\Filesystem::getMountManager()\\n#10 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_versions\\\/lib\\\/MetaStorage.php(80): OC\\\\Files\\\\View->getFileInfo()\\n#11 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_versions\\\/lib\\\/AppInfo\\\/Application.php(71): OCA\\\\Files_Versions\\\\MetaStorage->__construct()\\n#12 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/pimple\\\/pimple\\\/src\\\/Pimple\\\/Container.php(122): OCA\\\\Files_Versions\\\\AppInfo\\\\Application->OCA\\\\Files_Versions\\\\AppInfo\\\\{closure}(*** sensitive parameters replaced ***)\\n#13 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(108): Pimple\\\\Container->offsetGet()\\n#14 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_versions\\\/lib\\\/AppInfo\\\/Application.php(76): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query()\\n#15 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_versions\\\/appinfo\\\/app.php(28): OCA\\\\Files_Versions\\\\AppInfo\\\\Application->__construct()\\n#16 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/app.php(253): require_once('\\\/var\\\/www\\\/ownclo...')\\n#17 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/app.php(192): OC_App::requireAppFile()\\n#18 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/app.php(125): OC_App::loadApp()\\n#19 \\\/var\\\/www\\\/owncloud\\\/remote.php(150): OC_App::loadApps()\\n#20 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/External\\\/InvalidStorage.php\",\"Line\":31}"}
{"reqId":"YnPltWzTLc9D2u9hinRifQAAAAs","level":0,"time":"2022-05-05T14:56:53+00:00","remoteAddr":"2.247.255.187","user":"admin","app":"OC\\User\\Session::validateToken","method":"PROPFIND","url":"\/remote.php\/dav\/files\/admin\/","message":"token f6d479b71693002be81199e1bbdfc4c0e846bab50d2883c3331b4049a5d18c472d416ed311e61e96c77415f25d3e760a1f3e41280cd4dfd6f769e9437cd5da2f with token id 1 found, validating"}
{"reqId":"YnPltWzTLc9D2u9hinRifgAAAAs","level":0,"time":"2022-05-05T14:56:53+00:00","remoteAddr":"2.247.255.187","user":"admin","app":"OC\\User\\Session::validateToken","method":"GET","url":"\/index.php\/apps
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the disabled files_external flow, then read lib/private/Files/External/ConfigAdapter.php and InvalidStorage.php alongside FailedStorage.php. Trace the WebDAV request through apps/dav/lib/Connector/Sabre/ObjectTree.php and verify that the unavailable storage is reported as /SFTP without producing the logged exceptions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100