Determine Multisite Support in Automatic Updates MVP

Created on 12 August 2021, over 3 years ago
Updated 3 July 2024, 6 months ago

Problem/Motivation

As part of an automatic updates system we will need to decide if we need special considerations for multi-site installations.
Of course all the sites in a multi-site installation will be updating the same core code base.

At the very least if we allow all sites in a multi-site installation to perform automatic updates there will need to be a some locking system that prevent multiple sites from attempting an update at the same time whether through cron or through a form. Our current lock systems don't handle locking across multiple sites.

Another problem will be database updates. For a multi-site with just a few sites this may be easy to handle by just visiting update.php for each site after the core update is performed on 1 site. We should determine if having the update in the UI presents any new problems or if this just the same problem we have now with multi-site and database updates. One thing that is different is that currently because core updates now have to be performed outside of Drupal itself the person doing the update is likely aware that site is within a multi-site installation, whereas if this just a module an admin can turn on and run they might be aware of the affect it would have on other sites.

Proposed resolution

Here some ideas for solutions

For support:

  1. Don't support multi-sites in the MVP
  2. Support multi-site but warn the admin when performing the update that this will affect other sites
  3. Only support multi-sites if a flag is set in sites.php, this setting could specific which site(s?) can perform updates

For the locking problem we could implement \Drupal\Core\Lock\LockBackendInterface and create a Lock that writes a lock file somewhere in core itself since our system will require a writable file system anyways. This could keep multiple sites from performing an update at the same time.

We will likely not support database updates in the MVP but it would be good to have a plan for once we do, at least good documentation what needs to be done on all sites in multi-site manually.

Remaining tasks

Determine the plan

🌱 Plan
Status

Active

Version

11.0 πŸ”₯

Component
UpdateΒ  β†’

Last updated 6 days ago

  • Maintained by
  • πŸ‡ΊπŸ‡ΈUnited States @tedbow
  • πŸ‡ΊπŸ‡ΈUnited States @dww
Created by

πŸ‡ΊπŸ‡ΈUnited States tedbow Ithaca, NY, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¬πŸ‡§United Kingdom catch

    I think we should deprecate multisite support in core in general.

    Containerized hosting allows you to run multiple sites with one code base, but on isolated instances - this allows for deploying and running database updates for different sites at different times.

    Multisite, unless you add a lot of scaffolding around it, requires updating the code base and running database updates on all sites at exactly the same time.

Production build 0.71.5 2024