Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When testing Aegir, we often end up with broken sites that cannot access their own database or their own files. In fact, this could happen in production if a third party would disturb the conditions Aegir assumes (vandalism, manual edition, data corruption, crash, etc).
We should be able to disable and delete those sites even if they are broken. Right now, if the site cannot be accessed because of GRANT issues, for example, the backup will fail and rollback the disable, which will block the delete.
Comment | File | Size | Author |
---|---|---|---|
#2 | provision_fix_disable_delete.patch | 2.29 KB | anarcat |
#1 | provision_fix_disable_delete.patch | 4.4 KB | anarcat |
Comments
Comment #1
anarcat CreditAttribution: anarcat commentedAssuming this is only related to the backup system, here's a patch that adds a --force flag.
Comment #2
anarcat CreditAttribution: anarcat commentedHorrible patch, here's a reroll.
Comment #3
anarcat CreditAttribution: anarcat commentedI committed a modified patch.
Comment #4
acWorks if database is missing, fails to disable if settings.php is chmod 0
Comment #5
acComment #6
acTask starts processing
Running: php /var/aegir/drush/drush.php --root='/var/aegir/drupal-6.11' 'provision' 'disable' 'breakme.pagebuild.net' --backend
Drush bootstrap phase : _drush_bootstrap_drush()
Drush bootstrap phase : _drush_bootstrap_drupal_root()
Loading drushrc "/var/aegir/drupal-6.11/drushrc.php" into "drupal" scope.
Initialized Drupal 6.11 root directory at /var/aegir/drupal-6.11
Found command: provision disable
Initializing drush commandfile: provision_mysql
Initializing drush commandfile: provision_drupal
Initializing drush commandfile: provision_apache
Including /home/aegir/.drush/provision/platform/disable.provision.inc
Including /home/aegir/.drush/provision/web_server/disable.provision.inc
Drush bootstrap phase : _drush_bootstrap_drupal_site()
Initialized Drupal site breakme.pagebuild.net at sites/breakme.pagebuild.net
Loading drushrc "/var/aegir/drupal-6.11/sites/breakme.pagebuild.net/drushrc.php" into "site" scope.
Including /home/aegir/.drush/provision/db_server/backup.provision.inc
Including /home/aegir/.drush/provision/platform/backup.provision.inc
Generating mysql dump for breakme.pagebuild.net.
mysqldump -hdb.pagebuild.net -usite_149 -ppkLkS7Yurv -rsites/breakme.pagebuild.net/database.sql site_149
Adding sites directory to /var/aegir/backups/breakme.pagebuild.net-2009-05-12.tar
cd /var/aegir/drupal-6.11/sites/breakme.pagebuild.net; tar -rf /var/aegir/backups/breakme.pagebuild.net-2009-05-12.tar *
Could not back up sites directory for drupal
An error occurred at function : drush_provision_drupal_provision_backup
Deleted mysql dump from sites directory
Changes for drush_provision_mysql_pre_provision_backup module have been rolled back.
An error occurred at function : drush_provision_drupal_pre_provision_disable
Command dispatch complete
Removing task from hosting queue
An error occurred at function : drush_hosting_hosting_task
Changes for drush_hosting_hosting_task module have been rolled back.
Command dispatch complete
Comment #7
anarcat CreditAttribution: anarcat commentedI confirm the bug is still there. It's as if the 'force' option was not propagated through the drush_invoke call from drush_provision_drupal_pre_provision_disable to drush_provision_drupal_provision_backup().
Update: it was a typo, fixed...
Comment #8
acThis issue still seems to be in HEAD for an external DB server when the database is messed up
Comment #9
anarcat CreditAttribution: anarcat commentedWell, how messed up? Here I completely dropped the database of a site but could still disable it.
Comment #10
acTo recreate this you need to use an install profile and make a call to an undefined function in it (We came across this issue using aegir to provision sites to test install profiles we were writing - if your profile works then this will not affect you). Use the faulty install profile to provision a site. The site is created in aegir however it can not be disabled or deleted.
Comment #11
anarcat CreditAttribution: anarcat commentedComment #12
anarcat CreditAttribution: anarcat commentedComment #13
anarcat CreditAttribution: anarcat commentedI fixed some stuff in disable recently in #529348: disable can still fail disabling damaged sites could you test this again?
Comment #14
acsee above issue