When running this kit on AKS after upgrading K8s from 1.23.9 to 1.25.5 and upgrading the SMB CSI driver from 1.9.0 to 1.10.0, flock() with Nextcloud config files behaves differently than it previously did.
If there are multiple replicas of Nextcloud running and multiple concurrent requests come in, several of the requests will return the following error back to the client:
Uncaught Error: Call to a member function getLogger() on null in /var/www/html/index.php:71
This is a red herring. The underlying error that caused the logger to be invoked was:
Exception: Could not acquire a shared lock on the config file /var/www/html/config/apcu.config.php in /var/www/html/lib/private/Config.php:216
Similar behavior is witnessed if Nextcloud Cron attempts to start at the same time as another request is starting.
File locking on config files was added for 12.0.12 of Owncloud back in September 2014, was removed from Nextcloud for 25.0.0beta7 on September 9, 2022, and then later re-added to the 25.0.0beta7 release on September 19, 2022. This AKS resource kit is still running Nextcloud 23, so this does not explain the change in behavior.
When running this kit on AKS after upgrading K8s from
1.23.9to1.25.5and upgrading the SMB CSI driver from1.9.0to1.10.0,flock()with Nextcloud config files behaves differently than it previously did.If there are multiple replicas of Nextcloud running and multiple concurrent requests come in, several of the requests will return the following error back to the client:
This is a red herring. The underlying error that caused the logger to be invoked was:
Similar behavior is witnessed if Nextcloud Cron attempts to start at the same time as another request is starting.
File locking on config files was added for
12.0.12of Owncloud back in September 2014, was removed from Nextcloud for25.0.0beta7on September 9, 2022, and then later re-added to the25.0.0beta7release on September 19, 2022. This AKS resource kit is still running Nextcloud 23, so this does not explain the change in behavior.