Whatever I do, I can not migrate a site on a remote host since upgrading aegir to 1.7. Everything goes fun with the migration up until the point where it tries to drop the old database. If fails this stating nothing more than 'Unable to drop database'. I have tried cloning the site onto the same platform, and then migrating the clone. Same problem. I have tried cloning the site onto a different platform, and then migrating the clone. Same problem.
If I create a brand new site on the same platform, I can clone and migrate that without issue. The problem seems to be limited to sites create on a remote host from before the upgrade. The aegir database user on the remote host has full permissions from localhost, %, aegir.mydomain.com and 123.123.123.123 (the ip of my aegir server).
I desperately need to get this site migrated, and have been trying this for almost a week now. Every migrate task attempt takes over an hour, and when I try and migrate the live site and it goes wrong there are periods where the live site it left with no css at all, which means I am forced to doing this migration in the middle of the night :(
What would cause it to not be able to drop the database? How can resolve this? Any ideas or suggestions more than welcome, I'm going mad staring at these aegir ajax spinners sitting there knowing each time thats just going to fail again :(
Comments
Comment #1
mrfelton commentedHere is the log output from one of the failed migrate ops.
Comment #2
mrfelton commentedHere is another example. This time after cloning the site to a temporary domain name on the same platform, and then migrating that clone:
Comment #3
steven jones commentedSorry, but I'm unable to reproduce this error. Can I suggest trying to come along to one of the office hours sessions and letting one of the maintainers try to diagnose the issue?
Comment #4
Anonymous (not verified) commentedThe first error seems to be 'Output from failed command : Fatal error: Cannot redeclare entity_update_... (Expand)' but is truncated.
That will probably give a clue as to what happened. It was just a PHP fatal error on the specific site - likely not anything Aegir-specific, or perhaps even an APC cache issue if you use it..
Comment #5
cafuego commentedI'm hitting this on one of my 1.9 installs when migrating any site to a different platform. The web frontend is all localhost, but MySQL runs on separate server. I've tried to debug the issue slightly by printing the function names where things looked to be going wrong.
The relevant output is:
The aegir mysql user definitely has full access privileges on the SQL server, I am able to connect with the credentials in the hosting_db_server table and drop the databases aegir insists it can't drop.
I note that the failing functions above don't in fact do anything, so I'm not entirely surprised the database drop fails. However, the same problem does not occur on an aegir install on the same OS version, with same drush and php version, but a local SQL server.
Comment #6
cloudbull commented+1
Comment #7
anarcat commentedcan you reproduce this in 1.10?
Comment #8
mrfelton commentedWe had this on a site again yesterday after 1.10 upgrade. It happens from time to time, and I have never been able to pinpoint why. The only way I have ever been able to get around this issue is to take the following steps:
1) Manually delete the site node from node/[nid]/delete
2) Verify the new platform to which the migration failed
This sort of completes the migration process, because everything did infact complete up until the point that aegir was unable to drop the database. So the site has actually been migrated, the files exist on the new platform, and the new database exists too. So when we verify the new platform, it detects the site and imports into aegir creating a new site node (although it always ends up with the database host set as 'localhost', which we then need to change to aegir.example.com manually in the hosting_site database table). Also, after doing this, we are left with a redundant copy of the database (the that aegir could not drop). In the past I have manually deleted these redundant databases to save space, although that seems to then cause another issue which is that when aegir tries to recycle the database name, it then ends up with a new database that it is unable to connect to at all because of issues with mysql credentials. It's all a bit of a mess really, and often turns a 10 minute deploy into a half day saga :(
Is there a way to safely delete these redundant databases? We now have at least 20 copies of every database, one for every time this issue or another issue has prevented migration from completing.
Comment #9
chertzogI tried to replicate this on 6.x-2.x and couldnt.
Steps i took:
Everything works for me.
Comment #10
helmo commentedCould this (in part) be related to #1678528: Database deleted on edge cases ??
This would certainly need more digging to reproduce, If you try please do it on 2.x
Comment #11
kpm commentedIf I try to delete a site, or change a sites URL, I get the following errors:
Failed to drop database
Unable to drop database.
Comment #12
fuzzy76 commentedseeing this on delete as well. This is not a cloned/migrated site at all, so either I'm seeing a different bug or this is not related to #1678528
Comment #13
ergonlogicThis is a problem with how Drush bootstraps modules in profiles, I believe. I've seen it, even in the latest 6.x-2.x, with entity.module on a number of occasions. Make sure that Entity is only installed in the profile or the platform (and not the site, if at all possible). I'm not sure we can fix this in Aegir.
Comment #14
helmo commentedThe 6.x-2.x branch will go EOL along with Drupal this week. So I'm closing
this issue. If it remains a confirmed issue in 7.x-3.x, feel free to re-open,
or better yet, create a new issue referencing this one.