Discourse v3.0.6 to v3.1.1 upgrade error - undefined method `register_bookmarkable' for Bookmark:Class

I’m pretty sure that Bitnami doesn’t work with the discourse team.

If they can’t help and you have a budget you can contact me. I can probably build you an image that will work.

1 Like

Thanks @pfaffman

Question - the error I am seeing seems to imply it is from the Chat plugin which is an officially supported plugin - does that make a difference here with regards to the Discourse team looking at the error?

I am going to try and disable it and then perform the upgrade and see how that goes.

I think with the Bitnami installs there can sometimes be incompatibility issues with their version and the updated plugins.

If you can move to a standard install you may have an easier time of it (as well as being able to get support from more people on here as well).

1 Like

The chat plugin is included. If you are also installing the chat plugin (I think it was separate for a while?) then that could be the problem.

1 Like

That’s right. It was initially a separate plugin but has since been bundled in with core, so no need to install it separately any more.

Thanks @JammyDodger

Is there a way to disable core plugins at startup so I can test if the Chat plugin is the issue?

The Bitnami chart allows me to pass a list of plugins and it will run the command RAILS_ENV=production bundle exec rake plugin:install repo={{ $plugin }} for each plugin I supply BUT I think that will be on top of the core plugins.

I will look at the standard installation again - we deploy all our 3rd party apps using Helm charts in our kubernetes cluster but maybe it makes sense to make an exception for Discourse if kubernetes and helm support are a long way off.

Just a quick update, it seems that performing an upgrade from a pre-3.0.0 version allows the upgrade to work i.e 2.8.11 → 3.0.6 → 3.1.1

I am not sure if this is a pure accident or not but trying to upgrade from 3.0.6 straight to 3.1.1 does not work.

Interestingly the Chat plugin does not even show in my Discourse deployment after this upgrade path. It is thought it is still treated as an external plugin rather than being part of the core product.

Anyone know if the Chat plugin is correct with this upgrade path or is something very wrong that it is not present!

Have you enabled it?

Admin → Settings:

image

It’s still a plugin but shipped with core, so enabling it works slightly differently.

I will double check my install but I don’t even see the flag.

I don’t see the plugin code on the server either with this upgrade whereas if I start with v3.0.6 I’m sure I do but will double check it all.

If you are cloning the official repo, it’s included, here’s the current contents of stable branch: https://github.com/discourse/discourse/tree/stable/plugins/chat

@merefield - So I just checked, if I upgrade from version 2.8.11 to 3.0.6 the Chat plugin is not available.

As mentioned above, I am using the Bitnami Helm chart to deploy Discourse which I know is not supported but what is interesting is if I start with version 3.0.6 the Chat plugin is present.

Did you remove the chat plugin from your app.yml prior to updating? You should.

I didn’t do anything with the Chat plugin but that is not to say that the scrips Bitnami use to build their version of the Discourse image is not impacting it.

This is the Bitnami Discourse repo - https://github.com/bitnami/containers/tree/main/bitnami/discourse and this is how they build the Docker image - https://github.com/bitnami/containers/blob/main/bitnami/discourse/3/debian-11/Dockerfile

My suggestion? Just dump a backup and move to the standard install.

@stevejr I am stuck in the same pickle. Were you ultimately able to complete your upgrade? I am unable to try the upgrade process starting from 2.8 as you suggested.

Unfortunately not. I haven’t performed any upgrades and the response from Bitnami was to do a backup followed by. completely fresh install and then restore.

I need to fully test this out as I don’t want to impact our production setup!

I have been trying variations on that approach of a fresh install followed by restoring from backup, but it fails due to what appear to be bugs in the database migration. These attempts are made on an independent dev deployment that is easy to reset. The restore log shows this for example:

...
[2024-02-21 12:43:12] ALTER TABLE
[2024-02-21 12:43:12] Migrating the database...
[2024-02-21 12:43:16] EXCEPTION: /opt/bitnami/discourse/lib/discourse.rb:138:in `exec': Failed to migrate database.
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::DuplicateTable: ERROR:  relation "sidebar_sections" already exists
/opt/bitnami/discourse/vendor/bundle/ruby/3.2.0/gems/rack-mini-profiler-3.1.0/lib/patches/db/pg.rb:110:in `exec'
/opt/bitnami/discourse/vendor/bundle/ruby/3.2.0/gems/rack-mini-profiler-3.1.0/lib/patches/db/pg.rb:110:in `async_exec'
...

Have you tried a new install with no restore but connecting to your existing backend database?

I guess that means potentially losing any settings made in the UI not persisted to the database? Am not sure what else is backed up and restored though.

Maybe you should consider moving away from bitnami to an actual standard install. Your problems are not caused by “bugs in the database migration”, they are bitnami specific.

2 Likes

Is there a standard install for Kubernetes yet?