Batch migrate sites between platforms.

adrian - September 24, 2009 - 23:36
Project:Hosting
Version:6.x-0.4-alpha1
Component:User interface
Category:task
Priority:critical
Assigned:Unassigned
Status:closed
Description

This is the next step after #583844: Refactor the package comparison user interface

one of our 0.2 goals that we ended up not meeting was to be able to migrate all of the sites on a platform to another platform.

With the refactor of the migrate form, we can now meet this goal.

The functionality is a new tab on the platform node, that takes you to a multi-step form.
the steps for this form are :

1. Select a target platform
2. a batch api page doing validation on each of the sites
3. a confirmation screen showing which sites can be migrated

I already have the basics of this working.

#1

adrian - September 25, 2009 - 01:45
Status:active» needs work

Here's a very ugly first version of this patch.

it works, but needs major love.

i think the validation is off, and the user interface is not very clear.

AttachmentSize
hosting_batch_migrate.diff 5.59 KB

#2

adrian - September 25, 2009 - 03:11

Here is a slightly cleaned up user interface.

AttachmentSize
1 - choose platform 21.2 KB
2 - batch process sites 18.14 KB
3 - report of sites to migrate 32.06 KB
4 - migrate tasks in queue 12.32 KB
hosting_batch_migrate2.diff 6.82 KB

#3

adrian - September 25, 2009 - 03:14
Status:needs work» needs review

needs some more eyes on it before i commit

#4

mig5 - September 25, 2009 - 03:45

It would be awesome to have the list of passed sites in step 2 to be checkboxes as opposed to just bulk migrating all of them.. perhaps by default checking all of them along with a 'check all' box

But this is awesome. I should've tested on a sturdier VM that didn't bork at so many tasks and entered some sort of race condition :)

#5

mig5 - September 25, 2009 - 03:51

A site that borked on install and is in Queued status is still included in the passed sites to be migrated. See screenshot, it is 11.home.mig5.net

I thought this might not be specific to *bulk* migrate, but the site node view has checks that prevent the Migrate task from being available if the site isn't in an enabled state, so it only occurs here.

AttachmentSize
11fail.png 85.66 KB

#6

univate - September 25, 2009 - 04:18

I took this for a spin and it worked well, good job.

Although I also wonder if there is a way to make this a generic bulk operations feature like the views_bulk_operations modules. That way were every you have a list of sites you could have a list of checkboxes next to them and a select box up the top to allow you to perform various tasks like migrate, disable, delete, backup on each of the selected sites?

Would mean that you could easily migrate or perform any of the tasks on just part of a platform or even sites from multiple platforms.

#7

mig5 - September 25, 2009 - 04:52

Updated patch attached.

General clean up, added a bunch of documentation, added a site status check so only enabled sites can be migrated, removed debugging data, added a friendly drupal_set_message on submission after step 2.

AttachmentSize
587308_hosting_batch_migrate_rev3.patch 7.85 KB

#8

mig5 - September 25, 2009 - 12:32

If no sites meet the dependencies for a batch migration, the form still submits but throws a foreach exception.

Attached patch throws a form_set_error instead explaining unmet dependencies (I had troubles preventing the form submission entirely if !$form_state['storage']['passed'] ) which is a cleaner stopgap

AttachmentSize
587308_hosting_batch_migrate_rev4.patch 8.03 KB

#9

adrian - September 25, 2009 - 13:22

I'm not sure i want to turn this into checkboxapaloosa, because this form will need to scale to managing thousands of sites.

for this iteration the screen is displaying the site nodes, but in the future it will only display a summary of the task, with a mechanism to page through the sites that are being upgraded through ajax.

regarding paging, it's going to be VERY tricky to do in the context of the form, because every page of sites will need to remain within the form context. it can't ever navigate away from it, or it loses the data set.

#10

univate - September 25, 2009 - 20:05

I had a go at converting the sites listing into a form which can perform bulk operations - #588204: Convert site listings table into a bulk operations form which i mentioned above in #6, it only works for the tasks that don't require extra input from the users (verifiy, backup etc...).

It doesn't work for migrate tasks in its present form and is really a complete separate issue to this one as it solves a complete different set of needs, so I created a separate issue for it.

#11

adrian - September 28, 2009 - 14:18

I've cleaned this up a bit.

I also found some validation errors in the new code.

right now i'm grappling with the question of whether to consider a missing package a warning when it has not been enabled on the site being upgraded.

AttachmentSize
Picture 52.png 33.83 KB
Picture 53.png 21.58 KB

#12

adrian - September 28, 2009 - 15:32
Status:needs review» fixed

committed.

any issues with this functionality should have new tickets created for it.

thanks for the testing.

#13

System Message - October 12, 2009 - 15:40
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.