Repository navigation
Conversation
update-module returned while the entrypoint still ran occ upgrade. The next update restarted nextcloud-app and killed it. version.php was already new, so the upgrade never ran again and config.php stayed behind. Wait on the entrypoint lock before restarting. After the restart, check occ status and fail the task if Nextcloud is not ready, then apply mail and LDAP settings again.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When an instance is updated through several Nextcloud major versions in a row, it can end up stuck in maintenance mode with config.php two versions behind version.php. update-module returns while the container still runs occ upgrade in the background. The next update-module restarts the container first and kills that upgrade. The new version.php is already in place, so Nextcloud never runs the upgrade again, and the next major update is refused. NethServer/dev#8159
The update now waits for a running upgrade to end before it restarts anything. After the restart it checks that Nextcloud is really ready, with no maintenance mode and no pending database upgrade. If not, the update task fails with a clear message, so the next update is not started on a broken instance.
update-module.d/05wait_init: wait on the entrypoint lock before any other update step.update-module.d/20restart: after the restart, checkocc status -eand fail the task if Nextcloud is not ready. Then apply the mail and LDAP settings again, because they could not apply while the upgrade held maintenance mode.How to test
occ statusshows no maintenance and no pending upgrade, with config.php and version.php on the same version.