)]}'
{"specs/newton/approved/post-copy.rst":[{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"89a9b5b0ff1d77667a90e4b3ffb8dee9637b1f93","unresolved":false,"context_lines":[{"line_number":64,"context_line":"order to implement this change, the live migration code in method"},{"line_number":65,"context_line":"`_migrate_live` of `nova/api/openstack/compute/migrate_server.py` will be"},{"line_number":66,"context_line":"modified to acept the new flag."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"Additionally, a new API method to switch an ongoing pre-copy live migration to"},{"line_number":69,"context_line":"post-copy mode will be created. This will make asynchronous RPC call to"},{"line_number":70,"context_line":"compute node (the source host) to switch the migration mode to post-copy"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_6d48a6b3","line":67,"updated":"2016-04-21 10:00:39.000000000","message":"not keen on the addition of a libvirt specific flag, see https://review.openstack.org/#/c/306561 for an alternative","commit_id":"74871ea06cae19b38f8ac20825b4a7198902f368"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"89a9b5b0ff1d77667a90e4b3ffb8dee9637b1f93","unresolved":false,"context_lines":[{"line_number":70,"context_line":"compute node (the source host) to switch the migration mode to post-copy"},{"line_number":71,"context_line":"through libvirt. In order to implement this change, the live migration code in"},{"line_number":72,"context_line":"nova/api/openstack/compute/server_migrations.py will be extended to include"},{"line_number":73,"context_line":"the new API."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"This will be implemented in a similar way to the current"},{"line_number":76,"context_line":"`_force_complete method`, where a `live_migrate_switch_to_postcopy` method"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_ad68fef5","line":73,"updated":"2016-04-21 10:00:39.000000000","message":"Again exposing this libvirt/qemu specific feature in the API is not the right way to go.  Also see https://review.openstack.org/#/c/306561 David Gilbert indicated that it was best to let qemu control when it switches to Post-Copy","commit_id":"74871ea06cae19b38f8ac20825b4a7198902f368"},{"author":{"_account_id":21272,"name":"Luis Tomas","email":"luis5tb@gmail.com","username":"luis5tb"},"change_message_id":"56787a7a2faa079baa7de89f13ea0691b8391f22","unresolved":false,"context_lines":[{"line_number":70,"context_line":"compute node (the source host) to switch the migration mode to post-copy"},{"line_number":71,"context_line":"through libvirt. In order to implement this change, the live migration code in"},{"line_number":72,"context_line":"nova/api/openstack/compute/server_migrations.py will be extended to include"},{"line_number":73,"context_line":"the new API."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"This will be implemented in a similar way to the current"},{"line_number":76,"context_line":"`_force_complete method`, where a `live_migrate_switch_to_postcopy` method"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_f9b2b404","line":73,"in_reply_to":"1a122d0e_ad68fef5","updated":"2016-04-21 11:04:38.000000000","message":"As far as I know, qemu does not have any automatic switch to post-copy (it has it for auto-convergence, but not for postcopy switch), just an API to perform the switch. I\u0027m planning of performing the switch automatically based on the number of memory iterations (which we get from qemu)","commit_id":"74871ea06cae19b38f8ac20825b4a7198902f368"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"a889d64bde497908495afcfa45e5b999784320c3","unresolved":false,"context_lines":[{"line_number":72,"context_line":"nova/api/openstack/compute/server_migrations.py will be extended to include"},{"line_number":73,"context_line":"the new API."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"This will be implemented in a similar way to the current"},{"line_number":76,"context_line":"`_force_complete method`, where a `live_migrate_switch_to_postcopy` method"},{"line_number":77,"context_line":"will be called. This needs to firstly check if there is an ongoing migration"},{"line_number":78,"context_line":"and that it has not being already switched to post-copy mode. Note the"},{"line_number":79,"context_line":"policy.json file will be updated to define the"},{"line_number":80,"context_line":"`live_migrate_switch_to_postcopy` as accessible to cloud admin users only."},{"line_number":81,"context_line":"Then, if the API server determines that the operation can proceed it will send"},{"line_number":82,"context_line":"an async message to the compute manager, which in turn will invoke a method on"},{"line_number":83,"context_line":"the driver to switch the ongoing migration to post-copy mode."}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_94ad829d","line":80,"range":{"start_line":75,"start_character":0,"end_line":80,"end_character":74},"updated":"2016-04-20 12:34:42.000000000","message":"check this change please, when start implementing this: https://review.openstack.org/#/c/287997/","commit_id":"74871ea06cae19b38f8ac20825b4a7198902f368"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"da715a34d1763a876219089e7bffa6b4c09364e9","unresolved":false,"context_lines":[{"line_number":94,"context_line":"Note these changes also entail that, if a VM live migration has already been"},{"line_number":95,"context_line":"switched to post-copy mode, any cancelation should be declined as non of the"},{"line_number":96,"context_line":"hosts have a complete version of the VM."},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"Finally, Novaclient will need to be modified to enable the use of the"},{"line_number":99,"context_line":"post-copy flag for live migrations, as well as to include the new API method"},{"line_number":100,"context_line":"for switching to post-copy mode."}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a061dce_9533ef61","line":97,"updated":"2016-04-06 13:44:02.000000000","message":"That is a good point to raise, I am not happy that an operation like cancel live-migration sometimes can work and other times it can\u0027t, as it depends on the migration mode (pre or post-copy) but I can\u0027t see a real solution apart from returning a meaningful error/explanation back to the user when he tries to abort a running live-migration","commit_id":"74871ea06cae19b38f8ac20825b4a7198902f368"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"a889d64bde497908495afcfa45e5b999784320c3","unresolved":false,"context_lines":[{"line_number":94,"context_line":"Note these changes also entail that, if a VM live migration has already been"},{"line_number":95,"context_line":"switched to post-copy mode, any cancelation should be declined as non of the"},{"line_number":96,"context_line":"hosts have a complete version of the VM."},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"Finally, Novaclient will need to be modified to enable the use of the"},{"line_number":99,"context_line":"post-copy flag for live migrations, as well as to include the new API method"},{"line_number":100,"context_line":"for switching to post-copy mode."}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_54180ad3","line":97,"in_reply_to":"1a122d0e_152b6295","updated":"2016-04-20 12:34:42.000000000","message":"I think we could store live-migration details in migration table, but I\u0027m still bit confused about auto switch to post-copy mode, as there are little details about implementation.","commit_id":"74871ea06cae19b38f8ac20825b4a7198902f368"},{"author":{"_account_id":21272,"name":"Luis Tomas","email":"luis5tb@gmail.com","username":"luis5tb"},"change_message_id":"b94e69321a384bd619176b41314e4db1c6b58aa1","unresolved":false,"context_lines":[{"line_number":94,"context_line":"Note these changes also entail that, if a VM live migration has already been"},{"line_number":95,"context_line":"switched to post-copy mode, any cancelation should be declined as non of the"},{"line_number":96,"context_line":"hosts have a complete version of the VM."},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"Finally, Novaclient will need to be modified to enable the use of the"},{"line_number":99,"context_line":"post-copy flag for live migrations, as well as to include the new API method"},{"line_number":100,"context_line":"for switching to post-copy mode."}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_152b6295","line":97,"in_reply_to":"9a061dce_9533ef61","updated":"2016-04-20 06:02:03.000000000","message":"Yes, but I guess one of the main reason to cancel migrations was they were not able to finish. So, if post-copy is use this will not happen and the migration will complete. Anyway, maybe we can still allow cancelation is the switch to postcopy has not been triggered.","commit_id":"74871ea06cae19b38f8ac20825b4a7198902f368"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"1c9f5df431e66b7398eacd2eaefcf6b24a45d7fe","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"Finally, Novaclient will need to be modified to enable the use of the"},{"line_number":99,"context_line":"post-copy flag for live migrations, as well as to include the new API method"},{"line_number":100,"context_line":"for switching to post-copy mode."},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a061dce_2845b716","line":100,"range":{"start_line":100,"start_character":31,"end_line":100,"end_character":32},"updated":"2016-04-05 10:22:30.000000000","message":"We absolutely don\u0027t want to expose any of this stuff in the public API for nova.\n\nFirst the post-copy migration concept is a QEMU specific feature. Second correctly using post-copy requires that the user monitor various aspects of the migration operation data transfer progress and take into account other migration features (like compression, max downtime, and much more). The admin triggering migration no visibility into this data and so is not in any position to make a well informed decision about when to switch to post-copy.\n\nIf we are going to support use of post-copy it should be enable automatically by nova when appropriate and Nova should monitor progress of migration ops and decide what is the best time to switch to post-copy mode.","commit_id":"74871ea06cae19b38f8ac20825b4a7198902f368"},{"author":{"_account_id":21272,"name":"Luis Tomas","email":"luis5tb@gmail.com","username":"luis5tb"},"change_message_id":"b94e69321a384bd619176b41314e4db1c6b58aa1","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"Finally, Novaclient will need to be modified to enable the use of the"},{"line_number":99,"context_line":"post-copy flag for live migrations, as well as to include the new API method"},{"line_number":100,"context_line":"for switching to post-copy mode."},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_b86b83f0","line":100,"range":{"start_line":100,"start_character":31,"end_line":100,"end_character":32},"in_reply_to":"9a061dce_2845b716","updated":"2016-04-20 06:02:03.000000000","message":"What would you all think about having a \u0027live_migration_postcopy\u0027 config option at nova.conf to allow the admin to enable/disable the use of postcopy at server level? And then, if live_migration_postcopy is enabled, perform the trigger to postcopy based on the number of memory iterations, where this number could be a config option too? This way, for instance for host evacuation the number could be changed to a really low number (or even 0, for a quick switch to postcopy)","commit_id":"74871ea06cae19b38f8ac20825b4a7198902f368"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"ed082bd34254897c2249e7b6ffd9d02cf16dca5f","unresolved":false,"context_lines":[{"line_number":100,"context_line":"for switching to post-copy mode."},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"Alternatives"},{"line_number":104,"context_line":"------------"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"One alternative is using cold migration to migrate VMs that write memory at"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_910dc7ea","line":103,"range":{"start_line":103,"start_character":0,"end_line":103,"end_character":12},"updated":"2016-04-19 15:21:27.000000000","message":"another alternative would be to expose this feature without actually exposing qemu\u0027s post-copy mode, smth like https://review.openstack.org/#/c/306561","commit_id":"74871ea06cae19b38f8ac20825b4a7198902f368"},{"author":{"_account_id":21272,"name":"Luis Tomas","email":"luis5tb@gmail.com","username":"luis5tb"},"change_message_id":"b94e69321a384bd619176b41314e4db1c6b58aa1","unresolved":false,"context_lines":[{"line_number":100,"context_line":"for switching to post-copy mode."},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"Alternatives"},{"line_number":104,"context_line":"------------"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"One alternative is using cold migration to migrate VMs that write memory at"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_95ebf277","line":103,"range":{"start_line":103,"start_character":0,"end_line":103,"end_character":12},"in_reply_to":"1a122d0e_910dc7ea","updated":"2016-04-20 06:02:03.000000000","message":"Yes, one solution to avoid the API flag but still have a post-copy enabled mode at VM level, not only at host level, could be to allow the user to include some simple information at the instance extra_specs, something like \"migration:ensure\", \"migration:no-downtime\", \"migration:fault-tolerance\". However, migrations are supposed to be transparent to normal users and only managed by admins, therefore forcing users to include information about how to migrate their applications sounds a bit weird to me too -- as they may not even be aware about what do they entail/mean","commit_id":"74871ea06cae19b38f8ac20825b4a7198902f368"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"a889d64bde497908495afcfa45e5b999784320c3","unresolved":false,"context_lines":[{"line_number":100,"context_line":"for switching to post-copy mode."},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"Alternatives"},{"line_number":104,"context_line":"------------"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"One alternative is using cold migration to migrate VMs that write memory at"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_b4251e5d","line":103,"range":{"start_line":103,"start_character":0,"end_line":103,"end_character":12},"in_reply_to":"1a122d0e_95ebf277","updated":"2016-04-20 12:34:42.000000000","message":"Yes, but it is still one of alternative, and I think it\u0027s worth to include it here.","commit_id":"74871ea06cae19b38f8ac20825b4a7198902f368"},{"author":{"_account_id":21272,"name":"Luis Tomas","email":"luis5tb@gmail.com","username":"luis5tb"},"change_message_id":"cf705dda39ec7de22ec20cb36dbd3c147b78c830","unresolved":false,"context_lines":[{"line_number":100,"context_line":"for switching to post-copy mode."},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"Alternatives"},{"line_number":104,"context_line":"------------"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"One alternative is using cold migration to migrate VMs that write memory at"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_61e0bc29","line":103,"range":{"start_line":103,"start_character":0,"end_line":103,"end_character":12},"in_reply_to":"1a122d0e_b4251e5d","updated":"2016-04-21 06:29:54.000000000","message":"Yes, agree!","commit_id":"74871ea06cae19b38f8ac20825b4a7198902f368"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"ed082bd34254897c2249e7b6ffd9d02cf16dca5f","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"To be added:"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"* Switch the ongoing live-migration to post-copy mode:"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"  `POST /servers/{id}/migrations/{id}/action`"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"  Body::"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    {"},{"line_number":162,"context_line":"      \"switch_postcopy\": null"},{"line_number":163,"context_line":"    }"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    Normal http response code: `202 Accepted`"},{"line_number":166,"context_line":"    No response body is needed"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    Expected error http response code: `400 Bad Request`"},{"line_number":169,"context_line":"    - the instance state is invalid for forcing live migration to complete,"},{"line_number":170,"context_line":"    i.e., the task state is not \u0027migrating\u0027 or the migration is not post-copy"},{"line_number":171,"context_line":"    enabled."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    Expected error http response code: `403 Forbidden`"},{"line_number":174,"context_line":"    - Policy violation if the caller is not granted access to"},{"line_number":175,"context_line":"    \u0027os_compute_api:servers:migrations:switch_postcopy\u0027 in policy.json"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    Expected error http response code: `404 Not Found`"},{"line_number":178,"context_line":"    - the instance does not exist"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"  Because this is async call there might be an error that will not be exposed"},{"line_number":181,"context_line":"  through API. Such error will be logged by compute service."},{"line_number":182,"context_line":""},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"Security impact"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_f1e23b2e","line":181,"range":{"start_line":155,"start_character":0,"end_line":181,"end_character":60},"updated":"2016-04-19 15:21:27.000000000","message":"Is it possible to switch already started migration to post_copy? I think in this case existing migration should be aborted first and new one started.","commit_id":"74871ea06cae19b38f8ac20825b4a7198902f368"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"a889d64bde497908495afcfa45e5b999784320c3","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"To be added:"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"* Switch the ongoing live-migration to post-copy mode:"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"  `POST /servers/{id}/migrations/{id}/action`"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"  Body::"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    {"},{"line_number":162,"context_line":"      \"switch_postcopy\": null"},{"line_number":163,"context_line":"    }"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    Normal http response code: `202 Accepted`"},{"line_number":166,"context_line":"    No response body is needed"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    Expected error http response code: `400 Bad Request`"},{"line_number":169,"context_line":"    - the instance state is invalid for forcing live migration to complete,"},{"line_number":170,"context_line":"    i.e., the task state is not \u0027migrating\u0027 or the migration is not post-copy"},{"line_number":171,"context_line":"    enabled."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    Expected error http response code: `403 Forbidden`"},{"line_number":174,"context_line":"    - Policy violation if the caller is not granted access to"},{"line_number":175,"context_line":"    \u0027os_compute_api:servers:migrations:switch_postcopy\u0027 in policy.json"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    Expected error http response code: `404 Not Found`"},{"line_number":178,"context_line":"    - the instance does not exist"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"  Because this is async call there might be an error that will not be exposed"},{"line_number":181,"context_line":"  through API. Such error will be logged by compute service."},{"line_number":182,"context_line":""},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"Security impact"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_14b97215","line":181,"range":{"start_line":155,"start_character":0,"end_line":181,"end_character":60},"in_reply_to":"1a122d0e_1157f726","updated":"2016-04-20 12:34:42.000000000","message":"Could you please describe it than in more details? What if I pass to libvirt VIR_MIGRATE_POSTCOPY - will it start post_copy or not? If not what will trigger switch to post_copy in that case? How events from libvirt should be handled?","commit_id":"74871ea06cae19b38f8ac20825b4a7198902f368"},{"author":{"_account_id":21272,"name":"Luis Tomas","email":"luis5tb@gmail.com","username":"luis5tb"},"change_message_id":"cf705dda39ec7de22ec20cb36dbd3c147b78c830","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"To be added:"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"* Switch the ongoing live-migration to post-copy mode:"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"  `POST /servers/{id}/migrations/{id}/action`"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"  Body::"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    {"},{"line_number":162,"context_line":"      \"switch_postcopy\": null"},{"line_number":163,"context_line":"    }"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    Normal http response code: `202 Accepted`"},{"line_number":166,"context_line":"    No response body is needed"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    Expected error http response code: `400 Bad Request`"},{"line_number":169,"context_line":"    - the instance state is invalid for forcing live migration to complete,"},{"line_number":170,"context_line":"    i.e., the task state is not \u0027migrating\u0027 or the migration is not post-copy"},{"line_number":171,"context_line":"    enabled."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    Expected error http response code: `403 Forbidden`"},{"line_number":174,"context_line":"    - Policy violation if the caller is not granted access to"},{"line_number":175,"context_line":"    \u0027os_compute_api:servers:migrations:switch_postcopy\u0027 in policy.json"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    Expected error http response code: `404 Not Found`"},{"line_number":178,"context_line":"    - the instance does not exist"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"  Because this is async call there might be an error that will not be exposed"},{"line_number":181,"context_line":"  through API. Such error will be logged by compute service."},{"line_number":182,"context_line":""},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"Security impact"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_2181a4fb","line":181,"range":{"start_line":155,"start_character":0,"end_line":181,"end_character":60},"in_reply_to":"1a122d0e_14b97215","updated":"2016-04-21 06:29:54.000000000","message":"When you start the migration, you need to include the VIR_MIGRATE_POSTCOPY. This will start migration as in normal (pre-copy) mode, however, it will make the migration ready to be switchable to post-copy mode at any given time. Then, to switch to postcopy we just need to call \"migrateStartPostCopy()\" (python binding), similarly to how the \"migrateSetMaxDowntime\" works.\n\nAs the low level details are handled at libvirt level, not much will change from OpenStack viewpoint. Besides the automatic switching, we need to ensure the switch to post-copy is only triggered once, and propagating the right exceptions (for instance, when an ongoing migration wants to be cancelled, as libvirt itself throws an error when trying to abort a migration is this has already been switched to postcopy)","commit_id":"74871ea06cae19b38f8ac20825b4a7198902f368"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"2b15c1531d2b32d74b44abcfd71673d9e4369243","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"To be added:"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"* Switch the ongoing live-migration to post-copy mode:"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"  `POST /servers/{id}/migrations/{id}/action`"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"  Body::"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    {"},{"line_number":162,"context_line":"      \"switch_postcopy\": null"},{"line_number":163,"context_line":"    }"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    Normal http response code: `202 Accepted`"},{"line_number":166,"context_line":"    No response body is needed"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    Expected error http response code: `400 Bad Request`"},{"line_number":169,"context_line":"    - the instance state is invalid for forcing live migration to complete,"},{"line_number":170,"context_line":"    i.e., the task state is not \u0027migrating\u0027 or the migration is not post-copy"},{"line_number":171,"context_line":"    enabled."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    Expected error http response code: `403 Forbidden`"},{"line_number":174,"context_line":"    - Policy violation if the caller is not granted access to"},{"line_number":175,"context_line":"    \u0027os_compute_api:servers:migrations:switch_postcopy\u0027 in policy.json"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    Expected error http response code: `404 Not Found`"},{"line_number":178,"context_line":"    - the instance does not exist"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"  Because this is async call there might be an error that will not be exposed"},{"line_number":181,"context_line":"  through API. Such error will be logged by compute service."},{"line_number":182,"context_line":""},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"Security impact"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_4070110b","line":181,"range":{"start_line":155,"start_character":0,"end_line":181,"end_character":60},"in_reply_to":"1a122d0e_2181a4fb","updated":"2016-04-21 10:11:45.000000000","message":"Luis, could you please add this to spec. Also it\u0027s still unclear on what conditions migration will automatically be switched to post_copy mode? I think it\u0027s important to mention this here, so it will be possible to understand how to manage live migration abort in this case. Still interested in handling libvirt events in monitor.","commit_id":"74871ea06cae19b38f8ac20825b4a7198902f368"},{"author":{"_account_id":21272,"name":"Luis Tomas","email":"luis5tb@gmail.com","username":"luis5tb"},"change_message_id":"56787a7a2faa079baa7de89f13ea0691b8391f22","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"To be added:"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"* Switch the ongoing live-migration to post-copy mode:"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"  `POST /servers/{id}/migrations/{id}/action`"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"  Body::"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    {"},{"line_number":162,"context_line":"      \"switch_postcopy\": null"},{"line_number":163,"context_line":"    }"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    Normal http response code: `202 Accepted`"},{"line_number":166,"context_line":"    No response body is needed"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    Expected error http response code: `400 Bad Request`"},{"line_number":169,"context_line":"    - the instance state is invalid for forcing live migration to complete,"},{"line_number":170,"context_line":"    i.e., the task state is not \u0027migrating\u0027 or the migration is not post-copy"},{"line_number":171,"context_line":"    enabled."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    Expected error http response code: `403 Forbidden`"},{"line_number":174,"context_line":"    - Policy violation if the caller is not granted access to"},{"line_number":175,"context_line":"    \u0027os_compute_api:servers:migrations:switch_postcopy\u0027 in policy.json"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    Expected error http response code: `404 Not Found`"},{"line_number":178,"context_line":"    - the instance does not exist"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"  Because this is async call there might be an error that will not be exposed"},{"line_number":181,"context_line":"  through API. Such error will be logged by compute service."},{"line_number":182,"context_line":""},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"Security impact"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_59ec88ba","line":181,"range":{"start_line":155,"start_character":0,"end_line":181,"end_character":60},"in_reply_to":"1a122d0e_4070110b","updated":"2016-04-21 11:04:38.000000000","message":"Yes, I\u0027m waiting for the summit outcome to update the specs based on the discussions and agreed solution.\nAs regards to the automatically switch, I will include it too. Basically, it will be based on the number of memory iterations while in pre-copy mode. And yes, the switch will be perform by the monitor, when we detect that X memory iterations has been reached","commit_id":"74871ea06cae19b38f8ac20825b4a7198902f368"},{"author":{"_account_id":21272,"name":"Luis Tomas","email":"luis5tb@gmail.com","username":"luis5tb"},"change_message_id":"b94e69321a384bd619176b41314e4db1c6b58aa1","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"To be added:"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"* Switch the ongoing live-migration to post-copy mode:"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"  `POST /servers/{id}/migrations/{id}/action`"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"  Body::"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    {"},{"line_number":162,"context_line":"      \"switch_postcopy\": null"},{"line_number":163,"context_line":"    }"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    Normal http response code: `202 Accepted`"},{"line_number":166,"context_line":"    No response body is needed"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    Expected error http response code: `400 Bad Request`"},{"line_number":169,"context_line":"    - the instance state is invalid for forcing live migration to complete,"},{"line_number":170,"context_line":"    i.e., the task state is not \u0027migrating\u0027 or the migration is not post-copy"},{"line_number":171,"context_line":"    enabled."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    Expected error http response code: `403 Forbidden`"},{"line_number":174,"context_line":"    - Policy violation if the caller is not granted access to"},{"line_number":175,"context_line":"    \u0027os_compute_api:servers:migrations:switch_postcopy\u0027 in policy.json"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    Expected error http response code: `404 Not Found`"},{"line_number":178,"context_line":"    - the instance does not exist"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"  Because this is async call there might be an error that will not be exposed"},{"line_number":181,"context_line":"  through API. Such error will be logged by compute service."},{"line_number":182,"context_line":""},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"Security impact"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_1157f726","line":181,"range":{"start_line":155,"start_character":0,"end_line":181,"end_character":60},"in_reply_to":"1a122d0e_f1e23b2e","updated":"2016-04-20 06:02:03.000000000","message":"Migration should be started with the VIR_MIGRATE_POSTCOPY flag, and then, it can be switch to post-copy at any time, without aborting the migration. If that flag is not included when starting the migration, then migration need to be aborted, start a new one with the flag and switch to postcopy.","commit_id":"74871ea06cae19b38f8ac20825b4a7198902f368"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"64845bc7b8ecb17c48f2e26721be34fd83cc2a99","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"To be added:"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"* Switch the ongoing live-migration to post-copy mode:"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"  `POST /servers/{id}/migrations/{id}/action`"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"  Body::"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    {"},{"line_number":162,"context_line":"      \"switch_postcopy\": null"},{"line_number":163,"context_line":"    }"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    Normal http response code: `202 Accepted`"},{"line_number":166,"context_line":"    No response body is needed"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    Expected error http response code: `400 Bad Request`"},{"line_number":169,"context_line":"    - the instance state is invalid for forcing live migration to complete,"},{"line_number":170,"context_line":"    i.e., the task state is not \u0027migrating\u0027 or the migration is not post-copy"},{"line_number":171,"context_line":"    enabled."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    Expected error http response code: `403 Forbidden`"},{"line_number":174,"context_line":"    - Policy violation if the caller is not granted access to"},{"line_number":175,"context_line":"    \u0027os_compute_api:servers:migrations:switch_postcopy\u0027 in policy.json"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    Expected error http response code: `404 Not Found`"},{"line_number":178,"context_line":"    - the instance does not exist"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"  Because this is async call there might be an error that will not be exposed"},{"line_number":181,"context_line":"  through API. Such error will be logged by compute service."},{"line_number":182,"context_line":""},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"Security impact"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_2439f7d7","line":181,"range":{"start_line":155,"start_character":0,"end_line":181,"end_character":60},"in_reply_to":"1a122d0e_f1e23b2e","updated":"2016-04-20 04:28:25.000000000","message":"Yes, it is possible. Since post-copy is in QEMU you can start live migration in two modes. First one does not allow post-copy and is old well-known pre-copy mode. Second one uses userfaultfd mechanisms and allows to switch from pre-copy to post-copy at any time.","commit_id":"74871ea06cae19b38f8ac20825b4a7198902f368"},{"author":{"_account_id":6608,"name":"Paul Carlton","email":"paul.carlton2@hpe.com","username":"paul-carlton2"},"change_message_id":"89a9b5b0ff1d77667a90e4b3ffb8dee9637b1f93","unresolved":false,"context_lines":[{"line_number":229,"context_line":"pre-copy VM live migrations but will have some overhead. Therefore it is"},{"line_number":230,"context_line":"better to have different set of flags for pre- and post-copy migrations. This"},{"line_number":231,"context_line":"also means that if a migration was not started with the post-copy flag, it"},{"line_number":232,"context_line":"cannot be switched to post-copy mode later on."},{"line_number":233,"context_line":""},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"Developer impact"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_00561905","line":232,"updated":"2016-04-21 10:00:39.000000000","message":"Better to just have a flag that enables or disables post copy and let live migration process figure out whether to set the flag to allow it to be used on a per migration basis, per https://review.openstack.org/#/c/306561","commit_id":"74871ea06cae19b38f8ac20825b4a7198902f368"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"e25c08cef87370c621b461d91a0c0bd855815067","unresolved":false,"context_lines":[{"line_number":24,"context_line":"network bandwidth between the source and the destination hosts."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"As a result, if the admin needs to complete the migration, it needs to either"},{"line_number":27,"context_line":"cancel the migration and migrate the VM as a cold migration or set a time out"},{"line_number":28,"context_line":"for it, so that after that time the VM is paused and migrated. In both"},{"line_number":29,"context_line":"cases, the migration is not live anymore and the downtime may be unacceptable."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"In addition to that, pre-copy live migration may need to re-send several times"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a122d0e_050ec231","line":28,"range":{"start_line":27,"start_character":61,"end_line":28,"end_character":63},"updated":"2016-05-04 10:35:46.000000000","message":"not sure about the time out mechanism, I\u0027d mention to the force complete API call.","commit_id":"c8b6aacefce5dbe87f808627cfa31dce77b91aec"},{"author":{"_account_id":21272,"name":"Luis Tomas","email":"luis5tb@gmail.com","username":"luis5tb"},"change_message_id":"92334ce988b870e1f2073daa50ae2985fcec0c3a","unresolved":false,"context_lines":[{"line_number":24,"context_line":"network bandwidth between the source and the destination hosts."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"As a result, if the admin needs to complete the migration, it needs to either"},{"line_number":27,"context_line":"cancel the migration and migrate the VM as a cold migration or set a time out"},{"line_number":28,"context_line":"for it, so that after that time the VM is paused and migrated. In both"},{"line_number":29,"context_line":"cases, the migration is not live anymore and the downtime may be unacceptable."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"In addition to that, pre-copy live migration may need to re-send several times"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a122d0e_13236306","line":28,"range":{"start_line":27,"start_character":61,"end_line":28,"end_character":63},"in_reply_to":"1a122d0e_050ec231","updated":"2016-05-05 15:17:53.000000000","message":"Done","commit_id":"c8b6aacefce5dbe87f808627cfa31dce77b91aec"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"e25c08cef87370c621b461d91a0c0bd855815067","unresolved":false,"context_lines":[{"line_number":68,"context_line":"charge of handling the tunnelled flag (i.e."},{"line_number":69,"context_line":"`_handle_live_migration_tunnelled`) will be created to handle the post-copy"},{"line_number":70,"context_line":"flags. This will ensure that, if the `live_migration_postcopy` option is set"},{"line_number":71,"context_line":"to `True`, and the post-copy capability is available, the migration will be"},{"line_number":72,"context_line":"started with the proper flags so that it can be later switched to post-copy"},{"line_number":73,"context_line":"mode upon need."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"Additionally, an automatic mechanism to swicth an ongoing pre-copy live"},{"line_number":76,"context_line":"migration to post-copy mode will be included in the driver, at the"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a122d0e_659336fb","line":73,"range":{"start_line":71,"start_character":0,"end_line":73,"end_character":15},"updated":"2016-05-04 10:35:46.000000000","message":"What happens if we set the flag to True but the capability is not there? My guess is logging a warning but I am wonder if we want to store this info somewhere (in the migration object) to give an easy way for operators to check if the migration was in post-copy mode.","commit_id":"c8b6aacefce5dbe87f808627cfa31dce77b91aec"},{"author":{"_account_id":21272,"name":"Luis Tomas","email":"luis5tb@gmail.com","username":"luis5tb"},"change_message_id":"92334ce988b870e1f2073daa50ae2985fcec0c3a","unresolved":false,"context_lines":[{"line_number":68,"context_line":"charge of handling the tunnelled flag (i.e."},{"line_number":69,"context_line":"`_handle_live_migration_tunnelled`) will be created to handle the post-copy"},{"line_number":70,"context_line":"flags. This will ensure that, if the `live_migration_postcopy` option is set"},{"line_number":71,"context_line":"to `True`, and the post-copy capability is available, the migration will be"},{"line_number":72,"context_line":"started with the proper flags so that it can be later switched to post-copy"},{"line_number":73,"context_line":"mode upon need."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"Additionally, an automatic mechanism to swicth an ongoing pre-copy live"},{"line_number":76,"context_line":"migration to post-copy mode will be included in the driver, at the"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a122d0e_333f7f26","line":73,"range":{"start_line":71,"start_character":0,"end_line":73,"end_character":15},"in_reply_to":"1a122d0e_659336fb","updated":"2016-05-05 15:17:53.000000000","message":"Yes, logging a warning.\nAs regards to storing this info, are you proposing to extend migration_type enum with a new field, lets say \u0027post-copy-migration\u0027? Another option is to include it at the migration-data object, similarly to \u0027is_shared_block_storage\u0027 , we can include \u0027is_post_copy_ready\u0027 or something like that.","commit_id":"c8b6aacefce5dbe87f808627cfa31dce77b91aec"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"a975e73b4344fee8660e56590059d061e29413d7","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"Similarly to the `live_migration_bandwidth` parameter, the number of memory"},{"line_number":85,"context_line":"iterations before the switch to postcopy will be defined in another"},{"line_number":86,"context_line":"configuration parameter named `live_migration_postcopy_max_iterations`."},{"line_number":87,"context_line":"This will allow a more or less aggressive configuration in the use of"},{"line_number":88,"context_line":"post-copy. It can be modified based on the different needs. For instance, it"},{"line_number":89,"context_line":"could be set to a small number (even 0) for evacuation purposes, minimizing"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a122d0e_652a04e9","line":86,"range":{"start_line":86,"start_character":31,"end_line":86,"end_character":69},"updated":"2016-05-04 15:35:36.000000000","message":"Maybe we can default it to \"-1\" and use that as flag which says that post-copy is disabled. This would make the new option \"live_migration_postcopy\" obsolete. Summarized:\n\n    live_migration_postcopy_max_iterations\n         \u003c 0    \u003d disabled\n        \u003e\u003d 0    \u003d enabled with iterations count","commit_id":"c8b6aacefce5dbe87f808627cfa31dce77b91aec"},{"author":{"_account_id":21272,"name":"Luis Tomas","email":"luis5tb@gmail.com","username":"luis5tb"},"change_message_id":"92334ce988b870e1f2073daa50ae2985fcec0c3a","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"Similarly to the `live_migration_bandwidth` parameter, the number of memory"},{"line_number":85,"context_line":"iterations before the switch to postcopy will be defined in another"},{"line_number":86,"context_line":"configuration parameter named `live_migration_postcopy_max_iterations`."},{"line_number":87,"context_line":"This will allow a more or less aggressive configuration in the use of"},{"line_number":88,"context_line":"post-copy. It can be modified based on the different needs. For instance, it"},{"line_number":89,"context_line":"could be set to a small number (even 0) for evacuation purposes, minimizing"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a122d0e_b330af08","line":86,"range":{"start_line":86,"start_character":31,"end_line":86,"end_character":69},"in_reply_to":"1a122d0e_652a04e9","updated":"2016-05-05 15:17:53.000000000","message":"That is another option, but I think it is more intuitive to have 2 different variables to clearly differentiate the two concepts, being \"post-copy ready\" and the actual switch to \"post-copy mode\". Also, note that while the \u0027live_migration_postcopy\u0027 needs to be set when triggering the migraiton, the latter could be changed once the migration has started (if the former is set to True).","commit_id":"c8b6aacefce5dbe87f808627cfa31dce77b91aec"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"e25c08cef87370c621b461d91a0c0bd855815067","unresolved":false,"context_lines":[{"line_number":85,"context_line":"iterations before the switch to postcopy will be defined in another"},{"line_number":86,"context_line":"configuration parameter named `live_migration_postcopy_max_iterations`."},{"line_number":87,"context_line":"This will allow a more or less aggressive configuration in the use of"},{"line_number":88,"context_line":"post-copy. It can be modified based on the different needs. For instance, it"},{"line_number":89,"context_line":"could be set to a small number (even 0) for evacuation purposes, minimizing"},{"line_number":90,"context_line":"the amount of network traffic. Or it could be increased in case the network"},{"line_number":91,"context_line":"is not reliable."},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"Note these changes also entail that, if a VM live migration has already been"},{"line_number":94,"context_line":"switched to post-copy mode, any cancelation should be declined as none of the"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a122d0e_c53deade","line":91,"range":{"start_line":88,"start_character":59,"end_line":91,"end_character":16},"updated":"2016-05-04 10:35:46.000000000","message":"if it is a conf parameter we do not have a very good flexibility as we need to set it before the compute service starts. Reading that paragraph it seems we can easily change the param based on different use case. Can you make that bit more clear, please?","commit_id":"c8b6aacefce5dbe87f808627cfa31dce77b91aec"},{"author":{"_account_id":21272,"name":"Luis Tomas","email":"luis5tb@gmail.com","username":"luis5tb"},"change_message_id":"92334ce988b870e1f2073daa50ae2985fcec0c3a","unresolved":false,"context_lines":[{"line_number":85,"context_line":"iterations before the switch to postcopy will be defined in another"},{"line_number":86,"context_line":"configuration parameter named `live_migration_postcopy_max_iterations`."},{"line_number":87,"context_line":"This will allow a more or less aggressive configuration in the use of"},{"line_number":88,"context_line":"post-copy. It can be modified based on the different needs. For instance, it"},{"line_number":89,"context_line":"could be set to a small number (even 0) for evacuation purposes, minimizing"},{"line_number":90,"context_line":"the amount of network traffic. Or it could be increased in case the network"},{"line_number":91,"context_line":"is not reliable."},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"Note these changes also entail that, if a VM live migration has already been"},{"line_number":94,"context_line":"switched to post-copy mode, any cancelation should be declined as none of the"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a122d0e_f336a700","line":91,"range":{"start_line":88,"start_character":59,"end_line":91,"end_character":16},"in_reply_to":"1a122d0e_c53deade","updated":"2016-05-05 15:17:53.000000000","message":"Done","commit_id":"c8b6aacefce5dbe87f808627cfa31dce77b91aec"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"e25c08cef87370c621b461d91a0c0bd855815067","unresolved":false,"context_lines":[{"line_number":146,"context_line":"If there is a failure during the migration process, after the switch to"},{"line_number":147,"context_line":"post-copy has been done, the VM cannot be recovered and needs to be"},{"line_number":148,"context_line":"restarted. This happens in post-copy mode as none of the hosts have a"},{"line_number":149,"context_line":"complete version of the VM."},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"Performance Impact"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a122d0e_28ce3383","line":149,"updated":"2016-05-04 10:35:46.000000000","message":"+1 to mention that.\nA question here:\nMy understanding is that in post-copy we start immediately the VM on the target host and we fetch the memory page not transferred yet from the source and that can have a (small?) impact on the performance of the instance, if I am right I think we should mention it","commit_id":"c8b6aacefce5dbe87f808627cfa31dce77b91aec"},{"author":{"_account_id":21272,"name":"Luis Tomas","email":"luis5tb@gmail.com","username":"luis5tb"},"change_message_id":"92334ce988b870e1f2073daa50ae2985fcec0c3a","unresolved":false,"context_lines":[{"line_number":146,"context_line":"If there is a failure during the migration process, after the switch to"},{"line_number":147,"context_line":"post-copy has been done, the VM cannot be recovered and needs to be"},{"line_number":148,"context_line":"restarted. This happens in post-copy mode as none of the hosts have a"},{"line_number":149,"context_line":"complete version of the VM."},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"Performance Impact"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1a122d0e_26957f3f","line":149,"in_reply_to":"1a122d0e_28ce3383","updated":"2016-05-05 15:17:53.000000000","message":"Done","commit_id":"c8b6aacefce5dbe87f808627cfa31dce77b91aec"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"49715bdf0a7be56ca39a379c2c26b5f6fd35c6b7","unresolved":false,"context_lines":[{"line_number":72,"context_line":"to `True`, and the post-copy capability is available, the migration will be"},{"line_number":73,"context_line":"started with the proper flags so that it can be later switched to post-copy"},{"line_number":74,"context_line":"mode upon need. If the post-copy capability is not available, then a warning"},{"line_number":75,"context_line":"is logged."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"Additionally, an automatic mechanism to swicth an ongoing pre-copy live"},{"line_number":78,"context_line":"migration to post-copy mode will be included in the driver, at the"}],"source_content_type":"text/x-rst","patch_set":3,"id":"dab17558_93c52e5d","line":75,"range":{"start_line":75,"start_character":9,"end_line":75,"end_character":10},"updated":"2016-05-10 15:23:46.000000000","message":"If the admin has requested post-copy and it is not avaialble, then this should be a hard error, not merely a warning. The admin should fix their host configuration.","commit_id":"06fc6c98ba0c8275b226b2497107c043d8abbf31"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"49715bdf0a7be56ca39a379c2c26b5f6fd35c6b7","unresolved":false,"context_lines":[{"line_number":81,"context_line":"iterations is greater than a defined threshold, the switch will be triggered"},{"line_number":82,"context_line":"by calling the libvirt python binding function `migrateStartPostCopy`. To do"},{"line_number":83,"context_line":"so, it will firstly check if the migration is still running and that is has"},{"line_number":84,"context_line":"not already been switched to post-copy mode."},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"Similarly to the `live_migration_bandwidth` parameter, the number of memory"},{"line_number":87,"context_line":"iterations before the switch to postcopy will be defined in another"}],"source_content_type":"text/x-rst","patch_set":3,"id":"dab17558_5379062f","line":84,"updated":"2016-05-10 15:23:46.000000000","message":"Switching simply based on the number of iterations is not a great approach. For some workloads the max iters will be too small causing unnecessary switch to post-copy. For other workloads the max iters will be too large causing unnecessary delay before switching to post-copy.\n\nNova has sufficient knowledge to intelligently switch to post-copy mode at the right time. Approximately, nova should allow it to run in pre-copy mode for one iteration, and thereafter it should start monitoring the data remaining high water mark. If the data remaining high water mark does not decrease by at least 10% on each iteration, then it is a sign that live migration will not complete in suitable timeframe. At that point Nova should switch to post-copy mode.","commit_id":"06fc6c98ba0c8275b226b2497107c043d8abbf31"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"49715bdf0a7be56ca39a379c2c26b5f6fd35c6b7","unresolved":false,"context_lines":[{"line_number":97,"context_line":"switched to post-copy mode, any cancelation should be declined as none of the"},{"line_number":98,"context_line":"hosts have a complete version of the VM."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"Alternatives"},{"line_number":102,"context_line":"------------"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"dab17558_b3f2f298","line":100,"updated":"2016-05-10 15:23:46.000000000","message":"WRT to the \"force_complete\" facility in the Nova public API. Currently that method will pause the guest in order to force completion. If we have post-copy active, then there is really no need to pause the guest. We can instead simply switch to post-copy mode at that time. Once in post-copy mode migration will complete in approximately the same amount of time as it would if we had paused the guest, but with the advantage that the guest keeps running.","commit_id":"06fc6c98ba0c8275b226b2497107c043d8abbf31"}]}
