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
Comment #1
jmcclelland CreditAttribution: jmcclelland commentedTrying 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?
Or, does deleting the site from the front end make any other changes?
Comment #2
jmcclelland CreditAttribution: jmcclelland commentedAlso... seems as though you need:
DELETE FROM hosting_context WHERE nid in (SELECT nid FROM node WHERE title = '$uri')
Comment #3
lieb CreditAttribution: lieb commentedFor 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.
Comment #4
ergonlogicNew features need to be implemented in Aegir 3.x, then we can consider back-porting to Aegir 2.x.
Comment #5
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedI am having a problem with the UI right now. As user 1 with admin access I get access denied.
doing this from the command line is great.
I would like to have a way to reflect it in the front end also