Can I upgrade from a v4.2.x to v4.3.x, even though some patches for v4.2 have been installed since v4.3 came out?

Viewed 12

I have been upgrading to most point releases of v4.2, and soon I expect that patches for v4.2 will stop.

I was hesitant to upgrade to v4.3 when it came out, as I didn't understand the ramifications of the extra encryption settings required, and wanted to make sure that v4.3 was stable.

Now of course, patches are being released for both v4.2 and v4.3, so codebases could be diverging, especially with relation to security patches, so what is the upgrade process, and can I miss some of the v4.3.x releases as there don't seem to be any different requirements or database schema changes?

If I have to install all v4.3.x patches, at the moment there are 11, so there will be potentially multiple upgrades in quick succession.

1 Answers

With help from @paul@oldfriends.live and @thisismissem@hachyderm.io, who answered some of my questions, I bit the bullet and went for an upgrade.

Setup before upgrade:

  • Ubuntu 22.04.5 LTS
  • Ruby 3.2.3
  • PostgreSQL 15.14
  • Redis 8.2.1
  • elasticSearch 7.17.29
  • ImageMagick 6.9.11-60
  • SAS SSDs, 4 cores, 24gb RAM

I asked the question on Mastodon, and Paul confirmed that there didn't seem anything serious to worry about between versions of 4.3.x, but there were slightly different instructions for each point release - some just said to do bundle install, and others said to do that plus "Precompile the assets"

Emelia didn't think there would be a problem in skipping point versions.

I started the upgrade to 4.3.0.
This failed as it complained about the ruby version, even though I was on a supported (and newer) version of ruby than required.
I used asdf to install the latest version (3.3.5), hoping that would help as both the mastodon user and root.
This didn't help.
Emelia said the the better way would be to use rbenv to do the install:

git -C /home/mastodon/.rbenv/plugins/ruby-build pull
rbenv install 3.3.5

I did this with the mastodon user, and that allowed me to run the bundle install command.

Following the encryption instructions worked fine.
Restarting the services however, failed.
sidekiq failed, complaining about ruby versions again.
I then installed ruby 3.3.5 again with rbenv as root, and that allowed sidekiq to start, and I could start the other two standard Mastodon services.

My instance was now at v4.3.0
After testing that most features worked, I then left it for an hour to make sure it was stable.
Over the next hour, I then installed 4.3.1, 4.3.2, 4.3.3, 4.3.4 and 4.3.5 in relatively quick succession, testing the web gui each time, and it seemed to be stable.

I then used this version for the next 12 hours, and all seemed fine.

The next day, i then upgraded to 4.3.6, 4.3.7, 4.3.8, 4.3.9, 4.3.10 and now 4.3.11 today, and all seems stable.

My setup is now:

  • Ruby 3.3.5
  • No other version changes

My instance has now been stable for over 24 hours on 4.3.x versions.

It looks like I could have missed some intermediate versions, but although fixing the issues of upgrading to 4.3.0 took 2 hours (due to the multiple installs of ruby talking 10-15mins each, and that process only seems to use 1 or 2 cores), upgrading to each of the first 5 point releases only took another hour, with a similar time for the next 6 point releases, so I am not too worried about that.

Related