Drupal 10, the latest version of the open-source digital experience platform with even more features, is here.Problem/Motivation
After upgrade debian package 3.186 -> 3.190 when you try to delete a site it fails.
The drush version before upgrade was 8.1.16 and after upgrade was the same. I tested upgrading to drush 8.4.5 but the same happens.
Steps to reproduce
In 3.186 without extra modules activated, create and delete a site to verify everything is working.
Upgrade to 3.190. (note some warnings occur now when verifying platforms)
Create a site.
Disable an delete the site.
You get 3 warning and 1 error:
Warning: File path "/var/aegir/platforms/d776dev/" was not deleted, because it may contain files from other sites. You must manually delete the folder. - warning
Warning: File path "/var/aegir/platforms/d776dev/" was not deleted, because it may contain files from other sites. You must manually delete the folder. - warning
Warning: File path "/var/aegir/platforms/d776dev/" was not deleted, because it may contain files from other sites. You must manually delete the folder. - warning
...
The external command could not be executed due to an application error. - error

NOTE: if now you delete the platform then you can successfully delete your site.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | revert_site_delete_provision-3187556-8.patch | 1.04 KB | lexbritvin |
| #5 | 2020-12-16_19-17.png | 16.53 KB | solanas |
| #3 | 2020-12-11_13-45.png | 73.95 KB | solanas |
| 2020-12-09_21-19.png | 82.85 KB | solanas |











Comments
Comment #2
helmo CreditAttribution: helmo as a volunteer and at Initfour websolutions commentedThis is fixed in the 3.19.1 release which we currently have in our testing repo.
You can try the upgrade using the deb source
deb [signed-by=/usr/share/keyrings/aegir-archive-keyring.gpg] https://debian.aegirproject.org testing main.Comment #3
solanas CreditAttribution: solanas as a volunteer commentedThank you Helmo.
Upgraded from 3.186 -> 3.191 (testing debian) SOLVES the problem and the site is deleted but the task finish with warning.
I attach the screen I get.
Comment #4
helmo CreditAttribution: helmo as a volunteer and at Initfour websolutions commentedComment #5
solanas CreditAttribution: solanas as a volunteer and commentedI reopen this issue because now with 3.192 (debian testing) deleting sites is failing.
If I have Drush 8.4.5 I get:
When deleted with drush command (drush @d8site provision-delete) I get this error:
If i restore to drush 8.1.16 it's deleted with no erros.
Not sure if this need more testing as It seems drush 8.4.5 should be required in order to deploy drupal 9 sites.
Comment #6
solanas CreditAttribution: solanas as a volunteer and commentedTesting this another time. Upgrading to drush 8.4.5, if after the failed delete task I run it by twice the task finish succesfully.
Comment #7
gval CreditAttribution: gval as a volunteer commentedI have the same problem with the delete task. Tested on an "old" cloned site; the task failed after removing the site database.
If I run the delete task again, it completes successfully. I also did another test: if I create a new site on the same platform and delete it, the delete task completes successfully on the first attempt.
Don't know what are the differences between these 2 sites that triggering or not the error. (drush context ? / alias ?...)
My error log here (Drush 8.4.6 - provision 3.186) :
Comment #8
lexbritvin CreditAttribution: lexbritvin commentedI had the same issue as @gval
I debugged the issue and found the root cause.
The issue comes from high bootstrap level and using of
dt()function for logging. It tries to get translation from the deleted database.The changed function that produces the error is:
As you can see, it tries to increase level to maximum by
drush_bootstrap_max(). It fixes the error when a database is missing but produces an error when deleting a working site.So I patched it and reverted to the previous version. See the patch attached.
It may be not the best solution but I value site deletion more than missing database which is an exceptional case that I can fix manually.
The issue still needs work to support both features but checking the existing database must be done without increasing the bootstrap level.
Comment #9
colanComment #10
sseidel CreditAttribution: sseidel as a volunteer commentedWe have the same problem. We found out that for us it happens when the site default language is changed. This is a major bug I think because it breaks drush commands by modifying a site - a user can change the default language of a site and thereby break the underlying management system, that's not good.
I will test the patch and see if it resolves the issue for us.
Comment #11
doka CreditAttribution: doka commentedPatch #8 works for me, on 3.192.
Comment #12
sseidel CreditAttribution: sseidel as a volunteer commentedThe patch also works for us, so it would be great if it could be incorporated into a new release. Because this problem leaves behind a lot of sites that are hard to delete because the database doesn't exist anymore.
Comment #13
colanComment #15
kienan CreditAttribution: kienan commented