Aegir Platform Git submodule can allow duplicate platform paths

Created on 9 November 2024, 7 days ago

Problem/Motivation

One can easily create 2 platforms that point at exactly the same path on disk.

This results in weirdness like migrating a site from one platform to another and causing the site to be deleted in the process.

Steps to reproduce

Create a platform, enter a simple publish_path, filling in the field_git_repository_url field and the field_git_docroot field.
Create another platform, use the same publish_path , filling in the field_git_repository_url field and the field_git_docroot field.

Aegir checks to see if the publish path is in use, but Aegir Platform Git has sneakily changed the publish path on the first platform to append the field_git_docroot field value, so Aegir won't find the duplicate platform.

Proposed resolution

We can add some additional validation of our own, since we're messing with the values already, but maybe this should go into Hosting module too, we should potentially hard-enforce at node pre save time that you can't create a node with a duplicate publish_path and throw an exception if you try to do it.

Remaining tasks

Write some code.

User interface changes

None.

API changes

Maybe some in hosting module!

Data model changes

None.

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇬🇧United Kingdom steven jones

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024