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

Refuse to run the Updater if the upgrade cycle hasn't finished #567

Open
joshtrichards opened this issue May 26, 2024 · 1 comment
Open
Labels
0. Needs triage bug feature: upgrade Note: In `server` but called by updater. Also see `feature: installs and updates` in server

Comments

@joshtrichards
Copy link
Member

joshtrichards commented May 26, 2024

In the web UI, when the "Go back to your Nextcloud instance to finish the update" comes up (which is supposed to be used to visit the instance and run the db migrations/app upgrades), it appears to be possible to merely hit reload and start the next update cycle.

This shouldn't be permitted.

Also, it's what turned up #566 in the wild (I think). Because the repair step (for the stray .step file we're leaving around) is added during the db migrations/etc.

This leaves the instance stuck in step 12 until manual intervention is taken.

This is currently possible because the Updater doesn't look at the database to check what version is currently in place, but merely looks at the version.php

Since we can't have the Updater connect to the db, we need a reliable mechanism for it to detect whether the upgrade cycle was fully completed.

@joshtrichards joshtrichards changed the title Refuse the run the Updater if the upgrade cycle hasn't finished Refuse to run the Updater if the upgrade cycle hasn't finished May 26, 2024
@joshtrichards
Copy link
Member Author

I guess is a funny sort of way, the .step file being left around after step 12 is an inadvertent clue that the db upgrades haven't been ran yet, since the repair steps not being ran is a good clue. So in a sense #566 is helping prevent the problem described in this issue.

But only until someone decides to manually remove the .step file themselves...

Then I think it becomes possible to update the code again, before running the prior migrations/repair steps/etc. Fairly certain that's not a good idea.

@joshtrichards joshtrichards added 0. Needs triage feature: upgrade Note: In `server` but called by updater. Also see `feature: installs and updates` in server and removed 1. to develop labels Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage bug feature: upgrade Note: In `server` but called by updater. Also see `feature: installs and updates` in server
Projects
None yet
Development

No branches or pull requests

1 participant