disabling/deleting sites

anarcat - May 16, 2008 - 18:28
Project:Hosting
Version:5.x-0.1-alpha1
Component:Code
Category:feature request
Priority:critical
Assigned:Unassigned
Status:closed
Description

Add basic functionality to disable and delete sites.

This is marked as critical because we want this for the first release.

#1

anarcat - May 23, 2008 - 17:47
Status:active» patch (code needs work)

According to Adrian, this should work but from what I see, it's currently broken: the action gets created but is not hooked in the hosting actions queue.

#2

anarcat - May 24, 2008 - 20:56

Node deletion shouldn't be allowed, it should be an action which marks the status of the site as DELETED.

14:21 < Vertice> so we should form_alter out the node/$x/delete
14:21 < Vertice> and probably override the menu item
14:21 < Vertice> access => false

#3

anarcat - May 30, 2008 - 18:01

So. All of the above has been done by adrian in recent commits *but* disabling a site doesn't actually remove the apache configuration file. Maybe a permission error? At any rate, the site keeps on working here.

Actually, it seems like the config file does get removed, and even if I reload apache, I still get the site.

#4

anarcat - May 30, 2008 - 18:02

Wow, okay, I get it, it's the settings.php that should get removed.

#5

anarcat - May 30, 2008 - 19:03

So site disabling is pretty much complete now. We just need a configuration UI for the URL the site is redirected to.

However, deletion is still broken:

The command could not be executed succesfully (return: <em>E: Invalid command provision delete test.hostmaster.koumbit.net.</em>, data: <em></em>, code: <em>0</em>)

Will try to work on that and then... release!

#6

anarcat - May 30, 2008 - 21:22

So this is almost complete. My most recent tests show that the deletion is also working, but that the recursive_delete function is not working as expected and doesn't delete the sites directory properly.

We're also lacking hooks in hosting to mark the site deleted.

Otherwise this works! I won't have time to release today however.

#7

adrian - June 1, 2008 - 22:28

Made it work here (not sure what i did).

I added log messages for every folder that gets deleted, and i check the return of each rmdir and unlink, and create an error if it fails.

also added the post_delete hook

#8

anarcat - June 6, 2008 - 18:30
Version:» 5.x-0.1-alpha1
Status:patch (code needs work)» fixed

I confirm this is fixed in the CVS version.

#9

Anonymous (not verified) - June 20, 2008 - 18:31
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.