Drupal 10, the latest version of the open-source digital experience platform with even more features, is here.We currently allow Aegir to be installed on a remote database server, but the hostmaster-migrate command hardcodes '@server_master' as the db_server. We should support (at least):
- Keeping @hostmaster installed on a remote DB server across upgrades.
- Moving @hostmaster to a remote DB server.
The first step will be fixing the hostmaster-migrate command to maintain the current DB server (even if it's remote). Next, we should support migrating to a remote DB server. Finally, these options should be integrated into our Debian package. Of course, docs should be upgraded to reflect this too.










Comments
Comment #2
ergonlogicNote, I've marked this as 'major' since it can break the Aegir site in ways that would be very difficult to fix.
Also, I'm assigning to me, since I plan to work on this today, as we have a volunteer to test this functionality on a live Aegir deployment (once it's ready, of course.)
Comment #3
karel010 CreditAttribution: karel010 commentedWe probably want the options to be the same as hostmaster-install:
--aegir_db_host Database host to connect to (default: localhost)
--aegir_db_pass Database password to use
--aegir_db_port Database port to use (default: 3306)
--aegir_db_user Database user to connect as (default: root)
What do we rely on for source data (current db settings)? The @hostmaster context seems the obvious choice but the hostmaster-migrate command seems to work with the name of the site. Are there situations where @hostmaster should not be used?
Comment #4
ergonlogicThe initial implementation will probably mirror
provision-migrate, and accept a--new_db_server. Accepting the individual DB credential options allows for potentially creating a new database server node in Aegir, but this would be more complicated and error-prone.Comment #5
ergonlogicI've created a new branch to track these efforts: dev/2729279. The first commit adds the
--new_db_serveroption tohostmaster-migrate, and works to move the site to the new db server. At this point, this setting only exists in the db credentials, as both the alias (context) and the front-end still think the site is on localhost.Comment #6
ergonlogicThis call to
hosting-resume, indrush_provision_post_hostmaster_migrate(), appears to be causing thedb_serverto revert to@server_localhostfor@hostmaster.Commenting it out allows the proper
db_serverto be registered in@hostmaster...Comment #7
ergonlogicI've added a
dev/2729279branch to hosting as well, since thehosting-resumecommand appears to be where the difficulties lie.Comment #8
colanSee also #2849124: Validation for remote hostmaster fails.