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.

CommentFileSizeAuthor
#1 strong_disable.patch1.56 KBanarcat
strong_disable.patch4.82 KBanarcat
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

anarcat’s picture

FileSize
1.56 KB

Getting rusty with patches, reroll without extra changes.

anarcat’s picture

Status: Needs review » Fixed

Committed to CVS.

Status: Fixed » Closed (fixed)

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

anarcat’s picture

Version: 6.x-0.3-rc2 » 6.x-0.4-alpha1
Status: Closed (fixed) » 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);
...
anarcat’s picture

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...

adrian’s picture

Assigned: Unassigned » anarcat
Status: Needs review » Reviewed & tested by the community

this looks sane , feel free to commit.

anarcat’s picture

Status: Reviewed & tested by the community » Fixed

Pushed to CVS.

Status: Fixed » Closed (fixed)

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

  • Commit d635915 on debian, dev-dns, dev-envobject, dev-koumbit, dev-log_directory, dev-migrate_aliases, dev-multiserver-install, dev-newhooks, dev-nginx, dev-platform_management, dev-ports, dev-purgebackup, dev-restore, dev-services, dev-simplerinstaller, dev-site_rename, dev-ssl, dev_716166_apache_conf, dev_dns, dev_server_verify, prod-koumbit, ssl, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-subdir-multiserver, 6.x-2.x-backports, dev-helmo-3.x authored by anarcat:
    #529348 - do not failed disabling broken sites
    
    
  • Commit 961deee on debian, dev-dns, dev-envobject, dev-koumbit, dev-log_directory, dev-migrate_aliases, dev-multiserver-install, dev-newhooks, dev-nginx, dev-platform_management, dev-ports, dev-purgebackup, dev-restore, dev-services, dev-simplerinstaller, dev-site_rename, dev-ssl, dev_716166_apache_conf, dev_dns, dev_server_verify, prod-koumbit, ssl, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-subdir-multiserver, 6.x-2.x-backports, dev-helmo-3.x authored by anarcat:
    #529348 - make disable work even when the site doesn't exist