Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ownCloud 10.11 upgrade failed in combi with Objectstore and Music app #1033

Open
T0mWz opened this issue Dec 2, 2022 · 2 comments
Open

ownCloud 10.11 upgrade failed in combi with Objectstore and Music app #1033

T0mWz opened this issue Dec 2, 2022 · 2 comments
Labels

Comments

@T0mWz
Copy link

T0mWz commented Dec 2, 2022

Music App is not able to handle root storage, in case objectstore is used as primary storage;

Used apps;

  • owncloud 10.11
  • music 1.7.0
  • objectstore 0.7.0

Issue occurs when doing an ownCloud occ upgrade command.

{"reqId":"lugWvAAKMPAV8shbKnEB","level":0,"time":"02\/Dec\/2022:11:38:55","remoteAddr":"","user":"--","app":"core","method":"--","url":"--","message":"starting upgrade from 10.11.0.6 to 10.11.0.6"}
{"reqId":"lugWvAAKMPAV8shbKnEB","level":3,"time":"02\/Dec\/2022:11:38:55","remoteAddr":"","user":"--","app":"no app in context","method":"--","url":"--","message":"Exception: {\"Exception\":\"OC\NeedsUpdateException\",\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 /var/www/owncloud/lib/private/legacy/util.php(113): OC_App::loadApp()
#1 /var/www/owncloud/lib/private/legacy/util.php(301): OC_Util::initObjectStoreRootFS()
#2 /var/www/owncloud/lib/private/Files/Filesystem.php(264): OC_Util::setupFS()
#3 /var/www/owncloud/lib/private/Server.php(243): OC\Files\Filesystem::getMountManager()
#4 /var/www/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(122): OC\Server->OC\{closure}(*** sensitive parameters replaced ***)
#5 /var/www/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(108): Pimple\Container->offsetGet()
#6 /var/www/owncloud/lib/private/ServerContainer.php(86): OC\AppFramework\Utility\SimpleContainer->query()
#7 /var/www/owncloud/lib/private/Server.php(1047): OC\ServerContainer->query()
#8 /var/www/owncloud/apps/music/lib/App/Music.php(627): OC\Server->getRootFolder()
#9 /var/www/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(122): OCA\Music\App\Music->OCA\Music\App\{closure}(*** sensitive parameters replaced ***)
#10 /var/www/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(108): Pimple\Container->offsetGet()
#11 /var/www/owncloud/apps/music/appinfo/app.php(46): OC\AppFramework\Utility\SimpleContainer->query()
#12 /var/www/owncloud/lib/private/legacy/app.php(253): require_once('/var/www/ownclo...')
#13 /var/www/owncloud/lib/private/legacy/app.php(192): OC_App::requireAppFile()
#14 /var/www/owncloud/lib/private/Updater.php(354): OC_App::loadApp()
#15 /var/www/owncloud/lib/private/Updater.php(273): OC\Updater->doAppUpgrade()
#16 /var/www/owncloud/lib/private/Updater.php(114): OC\Updater->doUpgrade()
#17 /var/www/owncloud/core/Command/Upgrade.php(269): OC\Updater->upgrade()
#18 /var/www/owncloud/lib/composer/symfony/console/Command/Command.php(255): OC\Core\Command\Upgrade->execute()
#19 /var/www/owncloud/lib/composer/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#20 /var/www/owncloud/lib/composer/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#21 /var/www/owncloud/lib/composer/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#22 /var/www/owncloud/lib/private/Console/Application.php(165): Symfony\Component\Console\Application->run()
#23 /var/www/owncloud/console.php(116): OC\Console\Application->run()
#24 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')
#25 {main}\",\"File\":\"/var/www/owncloud/lib/private/legacy/app.php\",\"Line\":189}"}
{"reqId":"lugWvAAKMPAV8shbKnEB","level":2,"time":"02\/Dec\/2022:11:38:55","remoteAddr":"","user":"--","app":"core","method":"--","url":"--","message":"Could not load app \"music\", see exception above"}
{"reqId":"lugWvAAKMPAV8shbKnEB","level":3,"time":"02\/Dec\/2022:11:38:55","remoteAddr":"","user":"--","app":"core","method":"--","url":"--","message":"Exception: {\"Exception\":\"OC\NeedsUpdateException\",\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 /var/www/owncloud/lib/private/legacy/util.php(113): OC_App::loadApp()
#1 /var/www/owncloud/lib/private/legacy/util.php(301): OC_Util::initObjectStoreRootFS()
#2 /var/www/owncloud/lib/private/Files/Filesystem.php(264): OC_Util::setupFS()
#3 /var/www/owncloud/lib/private/Server.php(243): OC\Files\Filesystem::getMountManager()
#4 /var/www/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(122): OC\Server->OC\{closure}(*** sensitive parameters replaced ***)
#5 /var/www/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(108): Pimple\Container->offsetGet()
#6 /var/www/owncloud/lib/private/ServerContainer.php(86): OC\AppFramework\Utility\SimpleContainer->query()
#7 /var/www/owncloud/lib/private/Server.php(1047): OC\ServerContainer->query()
#8 /var/www/owncloud/apps/music/lib/App/Music.php(627): OC\Server->getRootFolder()
#9 /var/www/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(122): OCA\Music\App\Music->OCA\Music\App\{closure}(*** sensitive parameters replaced ***)
#10 /var/www/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(108): Pimple\Container->offsetGet()
#11 /var/www/owncloud/apps/music/appinfo/app.php(46): OC\AppFramework\Utility\SimpleContainer->query()
#12 /var/www/owncloud/lib/private/legacy/app.php(253): require_once('/var/www/ownclo...')
#13 /var/www/owncloud/lib/private/legacy/app.php(192): OC_App::requireAppFile()
#14 /var/www/owncloud/lib/private/Updater.php(354): OC_App::loadApp()
#15 /var/www/owncloud/lib/private/Updater.php(273): OC\Updater->doAppUpgrade()
#16 /var/www/owncloud/lib/private/Updater.php(114): OC\Updater->doUpgrade()
#17 /var/www/owncloud/core/Command/Upgrade.php(269): OC\Updater->upgrade()
#18 /var/www/owncloud/lib/composer/symfony/console/Command/Command.php(255): OC\Core\Command\Upgrade->execute()
#19 /var/www/owncloud/lib/composer/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#20 /var/www/owncloud/lib/composer/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#21 /var/www/owncloud/lib/composer/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#22 /var/www/owncloud/lib/private/Console/Application.php(165): Symfony\Component\Console\Application->run()
#23 /var/www/owncloud/console.php(116): OC\Console\Application->run()
#24 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')
#25 {main}\",\"File\":\"/var/www/owncloud/lib/private/legacy/app.php\",\"Line\":189}"}
{"reqId":"Y4nVzGaQCXxe1ma3s5ksygAAAAI","level":0,"time":"02\/Dec\/2022:11:39:08","remoteAddr":"10.234.0.247","user":"--","app":"OC\\Authentication\\Token\\DefaultTokenProvider::invalidateToken","method":"GET","url":"\/status.php","message":"invalidating token 340982bd86b841d32f9d4f26717e04877d9de5a5ff99274bbe89d95eec1394628fdf38089f4a118e5129b882f9e6a3bca229dfee83f36cccfcfd651c44db0d15"}

(edit by @paulijar: reformatted the log above for easier reading)

@T0mWz
Copy link
Author

T0mWz commented Dec 2, 2022

@paulijar
Copy link
Collaborator

Thanks for the report. Which application did you want to upgrade with occ upgrade? Was it maybe the objectstore? Because what I can read from the log and by looking at the functions in the exception stack, this is roughly what happens:

  1. The ownCloud Updater loops through all the installed applications and updates the ones requiring an update in the function Updater::doAppUpgrade(). The same function also loads all the "priority" apps, including any apps declaring the type filesystem. The Music app is such an app.
  2. When the Music app is being loaded, it tries to get the rootFolder. This requires setting up the filesystem, and as objectstore has been configured to be used, the function OC_Util::initObjectStoreRootFS($config) gets called.
  3. The aforementioned function tries to load the ObjectStore application but that results in OC\NeedsUpdateException being thrown. I assume this is because the ObjectStore app on the disc is actually newer than the previously installed one, and it would need to be updated first.

So ultimately, I believe the root cause of this is in ownCloud updater's inability to handle the case where a filesystem type app registers filesystem hooks, and an app providing an ObjectStoreRootFS needs an update.

The only thing we could change on the Music app side would be to remove the filesystem type from the app. I'm not certain if this would cause any other issues except that then the admin would be able to disable the Music app from some of the users. This, on the other hand, would cause the problems described in #604.

You could probably work around the problem by disabling Music app, running the occ upgrade and then enabling the Music app again. Then, run occ upgrade again if also the Music app needs to be updated.

@paulijar paulijar added the Bug label Dec 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants