Message ID | 20231017172307.22858-4-quintela@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Migration deprecated parts | expand |
Juan Quintela <quintela@redhat.com> wrote: > Use blocked-mirror with NBD instead. > > Signed-off-by: Juan Quintela <quintela@redhat.com> > Acked-by: Stefan Hajnoczi <stefanha@redhat.com> > Reviewed-by: Thomas Huth <thuth@redhat.com> > Reviewed-by: Markus Armbruster <armbru@redhat.com> Hi Kevin and Stefan Can we change the iotest output to fix this? https://gitlab.com/juan.quintela/qemu/-/jobs/5314070229 tput mismatch (see /builds/juan.quintela/qemu/build/tests/qemu-iotests/scratch/raw-file-183/183.out.bad) --- /builds/juan.quintela/qemu/tests/qemu-iotests/183.out +++ /builds/juan.quintela/qemu/build/tests/qemu-iotests/scratch/raw-file-183/183.out.bad @@ -28,6 +28,8 @@ { 'execute': 'migrate', 'arguments': { 'uri': 'unix:SOCK_DIR/migrate', 'blk': true } } +warning: parameter 'blk is deprecated; use blockdev-mirror with NBD instead +warning: block migration is deprecated; use blockdev-mirror with NBD instead {"return": {}} { 'execute': 'query-status' } {"return": {"status": "postmigrate", "singlestep": false, "running": false}} I really want to give the warnings two users. I guess that you want to test blk migration. What do you recommend? Later, Juan.
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index b51136f50a..1312c563bb 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -470,3 +470,12 @@ As an intermediate step the ``inc`` functionality can be achieved by setting the ``block-incremental`` migration parameter to ``true``. But this parameter is also deprecated. +``blk`` migrate command option (since 8.2) +'''''''''''''''''''''''''''''''''''''''''' + +Use blockdev-mirror with NBD instead. + +As an intermediate step the ``blk`` functionality can be achieved by +setting the ``block`` migration capability to ``true``. But this +capability is also deprecated. + diff --git a/qapi/migration.json b/qapi/migration.json index fa7f4f2575..3765c2b662 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -1526,8 +1526,8 @@ # # Features: # -# @deprecated: Member @inc is deprecated. Use blockdev-mirror with -# NBD instead. +# @deprecated: Members @inc and @blk are deprecated. Use +# blockdev-mirror with NBD instead. # # Returns: nothing on success # @@ -1550,7 +1550,8 @@ # <- { "return": {} } ## { 'command': 'migrate', - 'data': {'uri': 'str', '*blk': 'bool', + 'data': {'uri': 'str', + '*blk': { 'type': 'bool', 'features': [ 'deprecated' ] }, '*inc': { 'type': 'bool', 'features': [ 'deprecated' ] }, '*detach': 'bool', '*resume': 'bool' } } diff --git a/migration/migration-hmp-cmds.c b/migration/migration-hmp-cmds.c index 83176f5bae..dfe98da355 100644 --- a/migration/migration-hmp-cmds.c +++ b/migration/migration-hmp-cmds.c @@ -750,6 +750,11 @@ void hmp_migrate(Monitor *mon, const QDict *qdict) " use blockdev-mirror with NBD instead"); } + if (blk) { + warn_report("option '-b' is deprecated;" + " use blockdev-mirror with NBD instead"); + } + qmp_migrate(uri, !!blk, blk, !!inc, inc, false, false, true, resume, &err); if (hmp_handle_error(mon, err)) { diff --git a/migration/migration.c b/migration/migration.c index e54baf9102..16d4602e52 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1608,6 +1608,11 @@ static bool migrate_prepare(MigrationState *s, bool blk, bool blk_inc, " use blockdev-mirror with NBD instead"); } + if (blk) { + warn_report("parameter 'blk is deprecated;" + " use blockdev-mirror with NBD instead"); + } + if (resume) { if (s->state != MIGRATION_STATUS_POSTCOPY_PAUSED) { error_setg(errp, "Cannot resume if there is no "