disable can still fail disabling damaged sites

anarcat - July 24, 2009 - 00:54
Project:Provision
Version:6.x-0.4-alpha1
Component:Code
Category:bug report
Priority:critical
Assigned:anarcat
Status:closed
Description

We need to be able to deal better with damaged sites. Here, there was a permissions screwup on drushrc.php, and then verify actually destroyed the information in settings.php and couldn't recreate the drushrc.php properly. So the situation was that the authentication information was lost, both in drushrc and settings.php. Site unrecoverable. I should be able to disable then delete it from the system.

First blocker is this in platform/disable.provision.inc, drush_provision_drupal_provision_disable_validate() does a site bootstrap which fails and pops up an error. First bad idea.

Second blocker is the backup validation which does exactly the same thing.

I propose to remove the validation from disable (since it's done in backup and is not required by validate per se) and make the bootstrap fail in backup only if force is off.

Patch attached.

AttachmentSize
strong_disable.patch4.82 KB

#1

anarcat - July 24, 2009 - 00:55

Getting rusty with patches, reroll without extra changes.

AttachmentSize
strong_disable.patch 1.56 KB

#2

anarcat - July 27, 2009 - 17:12
Status:needs review» fixed

Committed to CVS.

#3

System Message - August 10, 2009 - 17:20
Status:fixed» closed

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

#4

anarcat - September 25, 2009 - 17:51
Version:6.x-0.3-rc2» 6.x-0.4-alpha1
Status:closed» needs work

This is still relevant. If a site disappeared from the backend, it will not be possible to disable/delete it from the frontend. The problem is in the backup bootstrap:\

Including /var/hostmaster/.drush/provision/db_server/backup.provision.inc
Could not find a Drupal settings.php file at ./sites/default/settings.php.
Undefined variable: count
An error occurred at function : drush_provision_drupal_provision_backup_validate
An error occurred at function : drush_provision_drupal_pre_provision_disable

This is probably related to:

function drush_provision_drupal_provision_backup_validate($url = NULL, $backup_file = NULL) {
   drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_SITE);
...

#5

anarcat - September 25, 2009 - 18:14
Status:needs work» needs review

So I have a rather crude hack for this, not sure it's really nice to do this, would like to get feedback from adrian before committing:

http://git.koumbit.net/?p=drupal/modules/provision/.git;a=commitdiff;h=3...

#6

adrian - October 26, 2009 - 17:40
Assigned to:Anonymous» anarcat
Status:needs review» reviewed & tested by the community

this looks sane , feel free to commit.

#7

anarcat - October 26, 2009 - 20:59
Status:reviewed & tested by the community» fixed

Pushed to CVS.

#8

System Message - November 9, 2009 - 21:00
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.