"Currently upgrading" even after a rebuild

AI-generated summary

watchmanmonitor reported that after manually rebuilding a Discourse instance via command line (git pull and ./launcher rebuild app), the admin panel incorrectly persisted the “Currently Upgrading” status, preventing further upgrades. This issue occurred on an instance that had previously failed an upgrade due to insufficient disk space. While riking suggested the rebuild should clear the Redis flag and codinghorror recommended restarting the container or rebooting, watchmanmonitor confirmed these steps were ineffective. Yuun suggested using the “Reset Upgrade” button found at /admin/upgrade, noting it had resolved a similar phantom status in the past. eviltrout offered an alternative solution of flushing Redis directly via the container shell but asked for clarification on how the flag became stuck. watchmanmonitor noted the “Reset Upgrade” button was initially difficult to locate as it appeared non-clickable. Ultimately, watchmanmonitor proceeded with Yuun’s suggestion; clicking the reset button triggered a lengthy git reset process but successfully cleared the status. The thread concluded with watchmanmonitor emphasizing that the core bug remains: a full rebuild should automatically clear the “currently upgrading” flag following a failed upgrade, rather than requiring manual intervention.

I’ve just given a discourse I manage the three command solute:

  • cd /var/discourse
  • git pull
  • ./launcher rebuild app

The rebuild appears to go well, I can log in, etc. however- the admin panel still says “upgrading” and will not accept a click to upgrade routine.

What can be done to reset this?

(FWIW This is the same instance that ran out of room during a previous one-click upgrade via the Admin panel.)

We should have the rebuild clear the upgrading flag in Redis.

1 curtida

Yeah just stop and restart the docker container. Or reboot the server.

I’d already rebooted the host before posting, no change.

./launcher restart app didn’t change the “upgrading” status either

I’ve had the same issue once after the upgrade process stalled and I had to rebuild - the “Upgrading…” status didn’t clear until I hit the “Reset Upgrade” button and then everything cleared up (no actual reset process seemed to take place, it just cleared the “phantom upgrade”, so to speak).

Would advise caution / checking with folks more knowledgeable about the system before trying this, though.

3 curtidas

Any comment on this @eviltrout? Anything we can do here?

Had you started an upgrade in the web side before you did it on the command line? I’m just trying to understand how the flag got stuck in that position.

The easiest way to unlock it is to flush redis.

$ ./launcher enter app
$ redis-cli flushall
4 curtidas

This was the discourse which failed an upgrade partway through due to lack of space.

Per @Yuun’s suggestion see that I can click on the initial Currently Upgrading... at /admin/upgrade. It certainly didn’t look clickable.

There I see the Reset Upgrade button, which I assume would work, but haven’t tried until this troubleshooting thread is complete.

Let me know which would be more useful to try first - the reset button or flushall.

I went with yuun’s idea and clicked reset backup.

The git-reset looked like it had a Lot of files to change for being just 52 commits behind, and it had to bundle a lot of stuff… took about 3x longer than expected.

However, it made it through Ok.

I guess all that’s left to do here is have a rebuild clear any “currently upgrading” flag.

Thanks for the tips and advice.

I’m glad it worked - difference in post-reset-button-pushing experience likely down to where the upgrade failed?

As a betting man I’d probably have gone with the discourse dev team’s suggestion over mine, but I suppose everything turned out fine.

heh, clicking buttons in the UI the team built isn’t really gambling.. I just didn’t see that because I didn’t think the “busy upgrading” button was clickable.

The underlying issue is that, after a failed rebuild (no disk space in my case) a full rebuild didn’t clear the flag.

I think once that’s accounted for, we’re good here.