http://git.aegirproject.org/?p=provision.git;a=blob;f=platform/migrate.p...
and
http://git.aegirproject.org/?p=provision.git;a=blob;f=platform/migrate.p...
both do not get passed any options from drush current context and both cant acces those contexts later. With this, provision.api gets useless during migrate, as things like vhost settings / site settings overrides are not applied. That brakes the site until the next verify potentially.
Iam not sure if we can use drush_get_context safely and pass it completly or we should introduce a own namespace for stuff introduced in the pre_hosting_tasks and only load that context and pass it.
Marking as critical, as it can let you end up with a broken site after migration
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | working-migrate-task-same-domain.txt | 59.35 KB | omega8cc |
| #5 | working-clone-task.txt | 55.55 KB | omega8cc |
| #5 | failed-migrate-task.txt | 41.72 KB | omega8cc |
Comments
Comment #1
eugenmayer commentedtags
Comment #2
anarcat commentedI am not sure I understand what the issue is here. On line #91, there is an $options array being passed, and it's being built from the previous site's context. If there are elements missing in there, they should indeed be added, but I am not aware of any such context elements being lost. Please document more clearly what parts of the context are being dropped.
Comment #3
omega8cc commentedI just tried to fix the other issue #1004526: Automatic aliases are not persisted across rename and clone and while replacing
provision_backend_invoke($new_uri, 'provision-verify');withprovision_backend_invoke('@hostmaster', 'hosting-task', array(d()->uri, 'verify'), array('force' => TRUE));works great inprovision/platform/clone.provision.incandprovision/platform/import.provision.inc, and basically fixes the issue with missing/incorrectly written aliases and I can even re-verify platforms just before running clone between platforms, it simply crashes when used inprovision/platform/migrate.provision.inc, asprovision_backend_invoke($new_uri, 'provision-verify');doesn't work there - exactly for reason explained by EugenMayer - the context is probably lost there, so it fails with error "This task is not valid".Comment #4
omega8cc commentedIn fact, I'm not sure if this is about lost context here, but it is a fact that the same
hosting-taskmethod to invoke site verify doesn't work in migrate (while it still works there to invoke platforms re-verify on the fly).Comment #5
omega8cc commentedI'm attaching complete task logs, where you can examine the working on the fly re-verify for both platforms and sites on clone between platforms while changing the site's name at the same time and failed migrate between platforms while changing also the site's name - note that platforms re-verify on the fly still works during migration, but site verify fails with "This task is not valid".
Comment #6
omega8cc commentedThe same migrate task, but without changing the site name and with on the fly both platforms and the site re-verify works fine.
Comment #7
omega8cc commentedThe patch I'm using in above tests: http://drupal.org/node/1004526#comment-5840654
Comment #8
omega8cc commentedI also tried to move this extra front-end verify to
function drush_provision_drupal_post_provision_migrate(), right below the line:And it doesn't make any difference. It still fails with the same "This task is not valid".
Comment #9
omega8cc commentedThe more I think about it, the more it looks like an egg/chicken syndrome we can't avoid - Happy Easter, by the way!
The problem is that we do some weird things during migrate, like reloading drushrc.php at the end and replacing some things on the fly earlier (but only in the backend!), so some of them simply can't work until the next verify - but verify via frontend! Which may overwrite some things then.
The broken aliases on migrate/rename is a perfect example of this issue. While we can fix them by rewriting the aliases array in the backend, as I did here, the frontend knows nothing about this change, as it is frontend which normally can talk to backend (to manage aliases) and backend doesn't write/modify anything in the frontend database - it writes its stuff only in drushrc.php and vhosts.
Comment #10
eugenmayer commentedSlowly but steady :)
You didnt find all places which are critical yet. You should also look at db migration, which is let say, broken. But there is a longer list...
Comment #11
jon pughCleaning up the queue.