With the use of the drush command 'hosting-import', we are capable of 'refreshing' the frontend system with changes that may have been directly applied from the command line using Provision.

Examples of this include verifying/building a platform, installing and migrating sites. hosting-import magically 'discovers' these changes and syncs the frontend in to match.

I have noticed that after running provision-delete on a site, even though we retain an alias for the site in ~/.drush (by design or bug?), running hosting-import doesn't mark the site as deleted in the frontend.

This appears to be because there's nothing in the backend that really identifies the site as having been deleted: it's simply gone, other than the alias.

If we are going to keep the alias around (if not, we should be running drush @foobar provision-save --delete in a post_delete hook in my opinion, but that can be a separate ticket..), then we should be changing the 'site_enabled' status to 'false' or something more specific like 'deleted', that might be able to communicate this change to the frontend.

Setting site_enabled to 'false' and running hosting-import probably isn't ideal, it might be considered 'disabled' (I haven't actually tried this yet though).

Comments

Trying to delete the site from the front end after you have provision-delete'ed the site via the command line gives an error.

Is this an acceptable work around?

UPDATE hosting_site SET status = -2 where nid in (SELECT nid FROM node WHERE title = '$uri');

Or, does deleting the site from the front end make any other changes?

Also... seems as though you need:

DELETE FROM hosting_context WHERE nid in (SELECT nid FROM node WHERE title = '$uri')

For a site:

drush @site provison-delete

Does seem to leave the front-end in a state of disarray. I tried various hosting-tasks but was never able to get the front-end happy until I deleted the site node and made sure the database was cleaned up.

I then created another site and tried:

drush @hostmaster hosting-task @site delete

This worked great. The site was deleted from the front-end and the back-end.

My assumption is that provison-delete should only be used on sites, or platforms, that have NOT been imported into the front-end.

Version:6.x-2.x-dev» 7.x-3.x-dev
Issue summary:View changes

New features need to be implemented in Aegir 3.x, then we can consider back-porting to Aegir 2.x.