-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Enable maintenance mode while updating package #10602
Comments
The packages do not know much about updating. |
In the config file, just set the "maintenance mode" flag (see config.sample.php). Then upgrade, and when complete, remove the maintenance mode flag in the config.php file. Is that what you mean? |
Yes, but I'm not sure whether it is right to have this be done by the package (preinstall/postinstall hooks). |
Probably better done by the updater code itself. |
I don't really understand hoe the updater works its magic. My assumption was, that once some php files are overwritten during package install, we are in an unsafe state. |
Let's not confuse the "updater". This here is the lifecycle of an update based on the OBS package:
The problem I mentioned can happen if between step 3) and 4) someone is accessing ownCloud, then they will get unpredictable results because the code is half-there. The other updater is from the update center, this one also downloads, replaces. But that's for a separate discussion. |
Basically to be safe the admin needs to do the following:
|
The important step for me is to set maintenance mode in preinstall, so that nothing bad happens if Admin forgets to do step 1 (or runs unattended updates): set maintenance flag to true manually. The better (but more intrusive) solution is to change the packager install scripts to extract to a temporary place. The running installation should not be touched, except for a notification, that the admin may want to initiate an "Update now". |
@PVince81 The owncloud 8 server packages now set maintenance mode before they start the upgrade. |
I see in the spec that you also stop Apache2 now ? So, disabling maintenance mode is indeed the way to go. So, that's done. |
There is not much we can do about cron jobs. Killing them is bad. |
Not sure. I remember there were talks about creating a cron lock file ? Was this done ? @icewind1991 @DeepDiver1975 ? |
Steps to reproduce
Expected result
Maintenance mode should be enabled before the package is extracted
Or if possible, all access to ownCloud should be blocked somehow.
Actual result
It seems that ownCloud is still accessible, but HTTP calls fail with Internal Server Error due to missing classes, possibly because the code is half-updated.
Note: this is probably more a corner case related to packaging.
Normally I manually set maintenance mode to true before updating the package.
@jnweiger what do you think ?
Not sure how it's done for other packaged web applications.
The text was updated successfully, but these errors were encountered: