summaryrefslogtreecommitdiff
path: root/migration/migration.c
AgeCommit message (Collapse)AuthorFilesLines
2018-02-06migration: Recover block devices if failure in device stateDr. David Alan Gilbert1-1/+2
In e91d895 I added the new pause-before-switchover mechanism to allow migration completion to be delayed; this changes the last state prior to completion to MIGRATE_STATUS_DEVICE rather than MIGRATE_STATUS_ACTIVE. Fix the failure path in migration_completion to recover the block devices if it fails in MIGRATE_STATUS_DEVICE, not just the MIGRATE_STATUS_ACTIVE that it previously had. This corresponds to rh bz: https://bugzilla.redhat.com/show_bug.cgi?id=1538494 whose symptom is an occasional source crash on a failed migration. Fixes: e91d8951d59d483f085f Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2018-02-06migration: use s->threshold_size inside migration_update_countersWei Wang1-3/+2
Fixes: b15df1ae50 ("migration: cleanup stats update into function") The threshold size is changed to be recorded in s->threshold_size. Signed-off-by: Wei Wang <wei.w.wang@intel.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2018-02-06migration: Allow migrate_fd_connect to take an Error *Dr. David Alan Gilbert1-1/+6
Allow whatever is performing the connection to pass migrate_fd_connect an error to indicate there was a problem during connection, an allow us to clean up. The caller must free the error. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2018-01-23migration: Revert postcopy-blocktime commit setPeter Maydell1-47/+4
This reverts commits ca6011c migration: add postcopy total blocktime into query-migrate 5f32dc8 migration: add blocktime calculation into migration-test 2f7dae9 migration: postcopy_blocktime documentation 3be98be migration: calculate vCPU blocktime on dst side 01a87f0 migration: add postcopy blocktime ctx into MigrationIncomingState 31bf06a migration: introduce postcopy-blocktime capability as they don't build on ppc32 due to trying to do atomic accesses on types that are larger than the host pointer type. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-01-15migration: remove notify in fd_errorPeter Xu1-1/+0
It is already called in migrate_fd_cleanup. Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2018-01-15migration: remove some block_cleanup_parameters()Peter Xu1-2/+0
Keep the one in migrate_fd_cleanup() would be enough. Removing the other two. Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2018-01-15migration: put the finish part into a new functionPeter Xu1-45/+49
This patch only moved the last part of migration_thread() into a new function migration_iteration_finish() to make it much shorter. With previous works to remove some local variables, now it's fairly easy to do that. Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2018-01-15migration: major cleanup for migrate iterationsPeter Xu1-35/+55
The major work for migration iterations are to move RAM/block/... data via qemu_savevm_state_iterate(). Generalize those part into a single function. Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2018-01-15migration: cleanup stats update into functionPeter Xu1-36/+50
We have quite a few lines in migration_thread() that calculates some statistics for the migration interations. Isolate it into a single function to improve readability. Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2018-01-15migration: use switch at the end of migrationPeter Xu1-17/+27
It converts the old if clauses into switch, explicitly mentions the possible migration states. The old nested "if"s are not clear on what we do on different states. Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2018-01-15migration: introduce migrate_calculate_completePeter Xu1-11/+20
Generalize the calculation part when migration complete into a function to simplify migration_thread(). Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2018-01-15migration: introduce downtime_startPeter Xu1-8/+4
Introduce MigrationState.downtime_start to replace the local variable "start_time" in migration_thread to avoid passing things around. Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2018-01-15migration: move vm_old_running into global statePeter Xu1-10/+7
Firstly, it was passed around. Let's just move it into MigrationState just like many other variables as state of migration, renaming it to vm_was_running. One thing to mention is that for postcopy, we actually don't need this knowledge at all since postcopy can't resume a VM even if it fails (we can see that from the old code too: when we try to resume we also check against "entered_postcopy" variable). So further we do this: - in postcopy_start(), we don't update vm_old_running since useless - in migration_thread(), we don't need to check entered_postcopy when resume, since it's only used for precopy. Comment this out too for that variable definition. Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2018-01-15migration: split use of MigrationState.total_timePeter Xu1-3/+4
It was used either to: 1. store initial timestamp of migration start, and 2. store total time used by last migration Let's provide two parameters for each of them. Mix use of the two is slightly misleading. Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2018-01-15migration: remove "enable_colo" varPeter Xu1-2/+1
It's only used once, clean it up a bit. Signed-off-by: Peter Xu <peterx@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2018-01-15migration: qemu_savevm_state_cleanup() in cleanupPeter Xu1-8/+2
Moving existing callers all into migrate_fd_cleanup(). It simplifies migration_thread() a bit. Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2018-01-15migration: assert colo instead of checkPeter Xu1-1/+9
When reaching here if we are still "active" it means we must be in colo state. After a quick discussion offlist, we decided to use the safer error_report(). Finally I want to use "switch" here rather than lots of complicated if clauses. Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2018-01-15migration: finalize current_migration objectVladimir Sementsov-Ogievskiy1-0/+5
current_migration has .instance_finalize callback, but it is not called, because nobody unrefs current_migration. Fix that. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2018-01-15migration: add postcopy total blocktime into query-migrateAlexey Perevalov1-4/+38
Postcopy total blocktime is available on destination side only. But query-migrate was possible only for source. This patch adds ability to call query-migrate on destination. To be able to see postcopy blocktime, need to request postcopy-blocktime capability. The query-migrate command will show following sample result: {"return": "postcopy-vcpu-blocktime": [115, 100], "status": "completed", "postcopy-blocktime": 100 }} postcopy_vcpu_blocktime contains list, where the first item is the first vCPU in QEMU. This patch has a drawback, it combines states of incoming and outgoing migration. Ongoing migration state will overwrite incoming state. Looks like better to separate query-migrate for incoming and outgoing migration or add parameter to indicate type of migration. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2018-01-15migration: introduce postcopy-blocktime capabilityAlexey Perevalov1-0/+9
Right now it could be used on destination side to enable vCPU blocktime calculation for postcopy live migration. vCPU blocktime - it's time since vCPU thread was put into interruptible sleep, till memory page was copied and thread awake. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2018-01-15migration: print features as on offJuan Quintela1-4/+9
Once there, do one thing for line Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com>
2018-01-15migration: Use proper types in jsonJuan Quintela1-29/+20
We use int for everything (int64_t), and then we check that value is between 0 and 255. Change it to the valid types. This change only happens for HMP. QMP always use bytes and similar. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2017-10-29migration: Make xbzrle_cache_size a migration parameterJuan Quintela1-11/+32
Right now it is a variable in MigrationState instead of a MigrationParameter. The change allows to set it as the rest of the Migration parameters, from the command line, with query_migration_paramters, set_migrate_parameters, etc. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2017-10-29migration: No need to return the size of the cacheJuan Quintela1-4/+2
After the previous commits, we make sure that the value passed is right, or we just drop an error. So now we return if there is one error or we have setup correctly the value passed. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> -- Improve error messasge Return 0 always for success
2017-10-23migration: Improve migration thread error handlingJuan Quintela1-3/+16
We now report errors also when we finish migration, not only on info migrate. We plan to use this error from several places, and we want the first error to happen to win, so we add an mutex to order it. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2017-10-23migration: pause-before-switchover for postcopyDr. David Alan Gilbert1-7/+22
Add pause-before-switchover support for postcopy. After starting postcopy it will transition active->pre-switchover->postcopy_active Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2017-10-23migration: allow cancel to unpauseDr. David Alan Gilbert1-0/+4
If a migration_cancel is issued during the new paused state, kick the pause_sem to get to unpause so it can cancel. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2017-10-23migration: migrate-continueDr. David Alan Gilbert1-0/+11
A new qmp command allows the caller to continue from a given paused state. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2017-10-23migration: Wait for semaphore before completing migrationDr. David Alan Gilbert1-0/+38
Wait for a semaphore before completing the migration, if the previously added capability was enabled. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2017-10-23migration: Add 'pre-switchover' and 'device' statusesDr. David Alan Gilbert1-0/+6
Add two statuses for use when the 'pause-before-switchover' capability is enabled. 'pre-switchover' is the state that we wait in for management to allow us to continue. 'device' is the state we enter while serialising the devices after management gives us the OK. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2017-10-23migration: Add 'pause-before-switchover' capabilityDr. David Alan Gilbert1-0/+10
When 'pause-before-switchover' is enabled, the outgoing migration will pause before invalidating the block devices and serializing the device state. At this point the management layer gets the chance to clean up any device jobs or other device users before the migration completes. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2017-10-23migration: Move xbzrle cache resize error handling to xbzrle_cache_resizeJuan Quintela1-17/+1
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com>
2017-10-23migration: Fix migrate_test_apply for multifd parametersJuan Quintela1-0/+6
They were missing when introduced on the tree Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com>
2017-09-22migration: pass MigrationIncomingState* into migration check functionsAlexey Perevalov1-1/+2
That tiny refactoring is necessary to be able to set UFFD_FEATURE_THREAD_ID while requesting features, and then to create downtime context in case when kernel supports it. Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2017-09-22migration: split common postcopy out of ram postcopyVladimir Sementsov-Ogievskiy1-13/+26
Split common postcopy staff from ram postcopy staff. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2017-09-22migration: Split migration_fd_process_incomingJuan Quintela1-2/+12
We need that on later patches. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
2017-09-22migration: Create multifd migration threadsJuan Quintela1-0/+26
Creation of the threads, nothing inside yet. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> -- Use pointers instead of long array names Move to use semaphores instead of conditions as paolo suggestion Put all the state inside one struct. Use a counter for the number of threads created. Needed during cancellation. Add error return to thread creation Add id field Rename functions to multifd_save/load_setup/cleanup Change recv parameters to a pointer to struct Change back to a struct Use Error * for _cleanup
2017-09-22migration: Create x-multifd-page-count parameterJuan Quintela1-0/+27
Indicates how many pages we are going to send in each batch to a multifd thread. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> -- Be consistent with defaults and documentation Use new DEFINE_PROP_* Rename x-multifd-group to x-multifd-page-count
2017-09-22migration: Create x-multifd-channels parameterJuan Quintela1-0/+26
Indicates the number of channels that we will create. By default we create 2 channels. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> -- Catch inconsistent defaults (eric). Improve comment stating that number of threads is the same than number of sockets Use new DEFIN_PROP_* Rename x-multifd-threads to x-multifd-threads
2017-09-22migration: Add multifd capabilityJuan Quintela1-0/+10
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> -- Use new DEFINE_PROP
2017-09-22migration: Create migration_has_all_channelsJuan Quintela1-0/+11
This function allows us to decide when to close the listener socket. For now, we only need one connection. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
2017-09-22migration: Create migration_ioc_process_incoming()Juan Quintela1-4/+18
We pass the ioc instead of the fd. This will allow us to have more than one channel open. We also make sure that we set the from_src_file sooner, so we don't need to pass it as a parameter. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> -- Do not assing mis->from_src_file (peterxu)
2017-09-06migration: dump str in migrate_set_state tracePeter Xu1-1/+2
Strings are more readable for debugging. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <1504081950-2528-5-git-send-email-peterx@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Fixed up merge with 977c73
2017-09-06migration: Reset rather than destroy main_thread_load_eventDr. David Alan Gilbert1-1/+1
migration_incoming_state_destroy doesn't really destroy, it cleans up. After a loadvm it's called, but the loadvm command can be run twice, and so destroying an init-once mutex breaks on the second loadvm. Reported-by: Stafford Horne <shorne@gmail.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20170825141940.20740-2-dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Tested-by: Stafford Horne <shorne@gmail.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2017-09-04qapi: Generate FOO_str() macro for QAPI enum FOOMarkus Armbruster1-1/+0
The next commit will put it to use. May look pointless now, but we're going to change the FOO_lookup's type, and then it'll help. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1503564371-26090-13-git-send-email-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2017-08-02migration: fix small leaksMarc-André Lureau1-0/+10
Spotted thanks to valgrind and tests/device-introspect-test: ==11711== 1 bytes in 1 blocks are definitely lost in loss record 6 of 14,537 ==11711== at 0x4C2EB6B: malloc (vg_replace_malloc.c:299) ==11711== by 0x1E0CDBD8: g_malloc (gmem.c:94) ==11711== by 0x1E0E696E: g_strdup (gstrfuncs.c:363) ==11711== by 0x695693: migration_instance_init (migration.c:2226) ==11711== by 0x717C4B: object_init_with_type (object.c:344) ==11711== by 0x717E80: object_initialize_with_type (object.c:375) ==11711== by 0x7182EB: object_new_with_type (object.c:483) ==11711== by 0x718328: object_new (object.c:493) ==11711== by 0x4B8A29: qmp_device_list_properties (qmp.c:542) ==11711== by 0x4A9561: qmp_marshal_device_list_properties (qmp-marshal.c:1425) ==11711== by 0x819D4A: do_qmp_dispatch (qmp-dispatch.c:104) ==11711== by 0x819E82: qmp_dispatch (qmp-dispatch.c:131) Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20170801160419.14180-1-marcandre.lureau@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2017-07-24migration: Use JSON null instead of "" to reset parameter to defaultMarkus Armbruster1-4/+23
migrate-set-parameters sets migration parameters according to is arguments like this: * Present means "set the parameter to this value" * Absent means "leave the parameter unchanged" * Except for parameters tls_creds and tls_hostname, "" means "reset the parameter to its default value The first two are perfectly normal: presence of the parameter makes the command do something. The third one overloads the parameter with a second meaning. The overloading is *implicit*, i.e. it's not visible in the types. Works here, because "" is neither a valid TLS credentials ID, nor a valid host name. Pressing argument values the schema accepts, but are semantically invalid, into service to mean "reset to default" is not general, as suitable invalid values need not exist. I also find it ugly. To clean this up, we could add a separate flag argument to ask for "reset to default", or add a distinct value to @tls_creds and @tls_hostname. This commit implements the latter: add JSON null to the values of @tls_creds and @tls_hostname, deprecate "". Because we're so close to the 2.10 freeze, implement it in the stupidest way possible: have qmp_migrate_set_parameters() rewrite null to "" before anything else can see the null. The proper way to do it would be rewriting "" to null, but that requires fixing up code to work with null. Add TODO comments for that. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2017-07-24migration: Unshare MigrationParameters struct for nowMarkus Armbruster1-5/+61
Commit de63ab6 "migrate: Share common MigrationParameters struct" reused MigrationParameters for the arguments of migrate-set-parameters, with the following rationale: It is rather verbose, and slightly error-prone, to repeat the same set of parameters for input (migrate-set-parameters) as for output (query-migrate-parameters), where the only difference is whether the members are optional. We can just document that the optional members will always be present on output, and then share a common struct between both commands. The next patch can then reduce the amount of code needed on input. I need to unshare them to correct a design flaw in a stupid, but minimally invasive way, in the next commit. We can restore the sharing when we redo that patch in a less stupid way. Add a suitable TODO comment. Note that I revert only the sharing part of commit de63ab6, not the part that made the members of query-migrate-parameters' result optional. The schema (and thus introspection) remains inaccurate for query-migrate-parameters. If we decide not to restore the sharing, we should revert that part, too. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2017-07-24migration: Add TODO comments on duplication of QAPI_CLONE()Markus Armbruster1-0/+3
qmp_query_migrate_parameters() and qmp_migrate_set_parameters() effectively duplicate QAPI_CLONE() inline. Add suitable TODO comments. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2017-07-24migration: Clean up around tls_creds, tls_hostnameMarkus Armbruster1-2/+2
Optional MigrationParameters members tls_creds and tls_hostname can't actually be absent outside qmp_migrate_set_parameters() since commit 4af245d (v2.9.0). Note that commit 4af245d reverted the part of commit de63ab6 (v2.8.0) that made tls_creds and tls_hostname absent instead of "" in the value of query-migrate-parameters, even though commit de63ab6 called that a mistake. What a mess. Drop the redundant tests for presence, and update documentation. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>