related to my original bug report of 976300. Patch from there has been applied and solves a different issue.

When migrating a site from MASTER to a remote server, "sites/SITE.com.au/" is deleted on MASTER.

MASTER platform is NOT "hostmaster", but a new platform (eg: pressflow-6.19.92).

Note: website hostname refers to "domain name"

Steps to replicate issue:

1) MASTER->REMOTE
* create new site.
* verify site.
* migrate site to a remote web server (MASTER->REMOTE). SAME website hostname.
* check MASTER:/var/aegir/platforms/**/sites/SITE.com.au/ to be 100% gone and deleted.
* REMOTE:/var/aegir/platforms/**/sites/SITE.com.au/ is OK.

2) MASTER->REMOTE
* sites/SITE.com.au/ is 100% OK on MASTER.
* migrate site to a remote web server (MASTER->REMOTE). DIFFERENT website hostname. (site.com.au -> site2.com.au)
* MASTER:/var/aegir/platforms/**/sites/SITE.com.au/ is DELETED. OK.
* MASTER:/var/aegir/platforms/**/sites/SITE2.com.au/ is OK.
* REMOTE:/var/aegir/platforms/**/sites/SITE2.com.au/ is OK.

3) Another test: REMOTE->MASTER
* site is 100% OK on MASTER and REMOTE server, and site is located on remote web server.
* verify site.
* migrate site from REMOTE to MASTER web server. SAME website hostname.
* REMOTE:/var/aegir/platforms/**/sites/SITE.com.au/ is DELETED.
* MASTER:/var/aegir/platforms/**/sites/SITE.com.au/ is DELETED.

4) REMOTE->MASTER
* site is 100% OK on MASTER and REMOTE server, and site is located on remote web server.
* migrate site from REMOTE to MASTER web server. DIFFERENT website hostname (site2.com.au on REMOTE, site.com.au on MASTER)
* REMOTE:/var/aegir/platforms/**/sites/SITE2.com.au/ is DELETED.
* MASTER:/var/aegir/platforms/**/sites/SITE.com.au/ is good.
* 100% works. no problem.

5) MASTER->MASTER:
* same webserver (MASTER). SAME website hostname.
* migrate between different platforms.
* 100% OK. no problem.

6) REMOTE->REMOTE:
* same webserver (REMOTE). SAME website hostname.
* migrate between different platforms.
* 100% OK. no problem.

7) REMOTE->REMOTE:
* same webserver (REMOTE). DIFFERENT hostname. (site.com.au -> site2.com.au)
* migrate between different platforms.
* 100% OK. no problem.

8) MASTER->MASTER
* same webserver (MASTER). DIFFERENT hostname (site.com.au -> site2.com.au)
* not tested.
* presume it works.

These are all the platforms installed:
Platform Release Server Verified Sites
DEV-pressflow-6.19.92 drupal 6.19 dev02 4 days ago 0
DEV-pressflow-6.20.97 drupal 6.20 dev02 19 hours ago 0
hostmaster drupal 6.20 mgmt01 2 weeks ago 1
mgmt-pressflow-6.19.92 drupal 6.19 mgmt01 1 week ago 0
mgmt-pressflow-6.20.97 drupal 6.20 mgmt01 54 min ago 1 (MASTER)
web-pressflow-6.19.92 drupal 6.19 web01 1 week ago 2
web-pressflow-6.20.97 drupal 6.20 web01 19 hours ago 1 (REMOTE)

Comments

dsobon’s picture

after a discussion with mig5. it could be related to non-unique publish path of the platforms.

here's the list of platforms and the publish path:

mgmt:
* platform name: mgmt-pressflow-6.20.97 (MASTER)
* Publish path: /var/aegir/platforms/pressflow-6.20.97

web:
* platform name: web-pressflow-6.20.97 (REMOTE)
* Publish path: /var/aegir/platforms/pressflow-6.20.97

directory listing:

mgmt:
aegir@mgmt01:~/platforms$ ls -la
total 16
drwxr-xr-x 4 aegir aegir 4096 Jan 24 16:40 .
drwxr-xr-x 15 aegir aegir 4096 Jan 25 11:40 ..
drwxr-xr-x 9 aegir aegir 4096 Jan 7 18:26 pressflow-6.19.92
drwxr-xr-x 9 aegir aegir 4096 Jan 24 16:46 pressflow-6.20.97

web:
aegir@web01:~/platforms$ ls -al
total 0
drwxr-xr-x 4 aegir aegir 3896 Jan 24 16:49 .
drwxr-xr-x 7 aegir aegir 3896 Jan 21 18:09 ..
drwxr-xr-x 9 aegir aegir 3896 Jan 20 16:25 pressflow-6.19.92
drwxr-xr-x 9 aegir aegir 3896 Jan 25 11:19 pressflow-6.20.97

Anonymous’s picture

Yep

So our problem is, you can't define a new platform, tell it is going to be on a remote server, and that the path is that which a *local* platform already exists.

Because then it's going to take the local platform, which is used for something else already (serving sites on @server_master maybe), and sync that remotely.

And yes, likely to blow away the site in there after a migrate, because it didn't recognise the platform as being a 'remote' one in which it should keep the site on master per the spoke model so it can continually sync to from thereon.

So we have a query in our hook_validate in the platform form that is checking the platform path, but specific to the web_server nid.

As a rule, the remote platform path cannot be the same as the platform path of a local platform that is not intended to be remote.

Anonymous’s picture

@TODO for myself:

1) remove that web_server nid part of the query
2) make the error message more explicit to describe that all platforms really need to be unique across all servers
3) document 2) on the community site

Anonymous’s picture

Status: Active » Fixed

Committed to git. Platform names and paths must be unique, even across remote servers, because of the spoke model.

Also documentation on Adding Platforms has been updated to include a note about this.

Anonymous’s picture

Title: migrate from master to remote server, the website is 100% deleted from master. » Enforce that platform names and paths must be unique, even across remote servers, because of the spoke model

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.