Message ID | 20230612193344.3796-3-quintela@redhat.com |
---|---|
State | New |
Headers | show |
Series | Migration deprecated parts | expand |
On Mon, Jun 12, 2023 at 09:33:40PM +0200, Juan Quintela wrote: > Use 'migrate_set_parameter block_incremental true' instead. > > Signed-off-by: Juan Quintela <quintela@redhat.com> > --- > docs/about/deprecated.rst | 7 +++++++ > qapi/migration.json | 11 +++++++++-- > migration/migration.c | 5 +++++ > 3 files changed, 21 insertions(+), 2 deletions(-) > > diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst > index e1aa0eafc8..c75a3a8f5a 100644 > --- a/docs/about/deprecated.rst > +++ b/docs/about/deprecated.rst > @@ -433,3 +433,10 @@ Migration > ``skipped`` field in Migration stats has been deprecated. It hasn't > been used for more than 10 years. > > +``inc`` migrate command option (since 8.1) > +'''''''''''''''''''''''''''''''''''''''''' > + > +The new way to modify migration is using migration parameters. > +``inc`` functionality can be acchieved using > +``migrate_set_parameter block-incremental true``. This is a HMP command, but the change affects QMP too. I'd suggest ``inc`` functionality can be achieved by setting the ``block-incremental`` migration parameter to ``true``. > + > diff --git a/qapi/migration.json b/qapi/migration.json > index bcae193733..4ee28df6da 100644 > --- a/qapi/migration.json > +++ b/qapi/migration.json > @@ -1424,13 +1424,19 @@ > # > # @blk: do block migration (full disk copy) > # > -# @inc: incremental disk copy migration > +# @inc: incremental disk copy migration. This option is deprecated. > +# Use 'migrate_set_parameter block-incremetantal true' instead. @inc: incremental disk copy migration. This option is deprecated. Set the 'block-incremetantal' migration parameter to 'true' instead. > # > # @detach: this argument exists only for compatibility reasons and is > # ignored by QEMU > # > # @resume: resume one paused migration, default "off". (since 3.0) > # > +# Features: > +# > +# @deprecated: option @inc is better set with > +# 'migrate_set_parameter block-incremental true'. # @deprecated: option @inc should be enabled by # setting the 'block-incremental' migration parameter to 'true'. > +# > # Returns: nothing on success > # > # Since: 0.14 > @@ -1452,7 +1458,8 @@ > # <- { "return": {} } > ## > { 'command': 'migrate', > - 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', > + 'data': {'uri': 'str', '*blk': 'bool', > + '*inc': { 'type': 'bool', 'features': ['deprecated'] }, > '*detach': 'bool', '*resume': 'bool' } } > > ## > diff --git a/migration/migration.c b/migration/migration.c > index dc05c6f6ea..7ebce7c7bf 100644 > --- a/migration/migration.c > +++ b/migration/migration.c > @@ -1544,6 +1544,11 @@ static bool migrate_prepare(MigrationState *s, bool blk, bool blk_inc, > { > Error *local_err = NULL; > > + if (blk_inc) { > + warn_report("-inc migrate option is deprecated, use" > + "'migrate_set_parameter block-incremental true' instead."); warn_report("-inc migrate option is deprecated, set the" "'block-incremental' migration parameter to 'true' instead."); With regards, Daniel
Daniel P. Berrangé <berrange@redhat.com> wrote: > On Mon, Jun 12, 2023 at 09:33:40PM +0200, Juan Quintela wrote: >> Use 'migrate_set_parameter block_incremental true' instead. >> >> Signed-off-by: Juan Quintela <quintela@redhat.com> >> --- >> docs/about/deprecated.rst | 7 +++++++ >> qapi/migration.json | 11 +++++++++-- >> migration/migration.c | 5 +++++ >> 3 files changed, 21 insertions(+), 2 deletions(-) >> >> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst >> index e1aa0eafc8..c75a3a8f5a 100644 >> --- a/docs/about/deprecated.rst >> +++ b/docs/about/deprecated.rst >> @@ -433,3 +433,10 @@ Migration >> ``skipped`` field in Migration stats has been deprecated. It hasn't >> been used for more than 10 years. >> >> +``inc`` migrate command option (since 8.1) >> +'''''''''''''''''''''''''''''''''''''''''' >> + >> +The new way to modify migration is using migration parameters. >> +``inc`` functionality can be acchieved using >> +``migrate_set_parameter block-incremental true``. > > This is a HMP command, but the change affects QMP too. I'd suggest > > ``inc`` functionality can be achieved by setting the > ``block-incremental`` migration parameter to ``true``. Applied all suggestions. Thanks.
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index e1aa0eafc8..c75a3a8f5a 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -433,3 +433,10 @@ Migration ``skipped`` field in Migration stats has been deprecated. It hasn't been used for more than 10 years. +``inc`` migrate command option (since 8.1) +'''''''''''''''''''''''''''''''''''''''''' + +The new way to modify migration is using migration parameters. +``inc`` functionality can be acchieved using +``migrate_set_parameter block-incremental true``. + diff --git a/qapi/migration.json b/qapi/migration.json index bcae193733..4ee28df6da 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -1424,13 +1424,19 @@ # # @blk: do block migration (full disk copy) # -# @inc: incremental disk copy migration +# @inc: incremental disk copy migration. This option is deprecated. +# Use 'migrate_set_parameter block-incremetantal true' instead. # # @detach: this argument exists only for compatibility reasons and is # ignored by QEMU # # @resume: resume one paused migration, default "off". (since 3.0) # +# Features: +# +# @deprecated: option @inc is better set with +# 'migrate_set_parameter block-incremental true'. +# # Returns: nothing on success # # Since: 0.14 @@ -1452,7 +1458,8 @@ # <- { "return": {} } ## { 'command': 'migrate', - 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', + 'data': {'uri': 'str', '*blk': 'bool', + '*inc': { 'type': 'bool', 'features': ['deprecated'] }, '*detach': 'bool', '*resume': 'bool' } } ## diff --git a/migration/migration.c b/migration/migration.c index dc05c6f6ea..7ebce7c7bf 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1544,6 +1544,11 @@ static bool migrate_prepare(MigrationState *s, bool blk, bool blk_inc, { Error *local_err = NULL; + if (blk_inc) { + warn_report("-inc migrate option is deprecated, use" + "'migrate_set_parameter block-incremental true' instead."); + } + if (resume) { if (s->state != MIGRATION_STATUS_POSTCOPY_PAUSED) { error_setg(errp, "Cannot resume if there is no "
Use 'migrate_set_parameter block_incremental true' instead. Signed-off-by: Juan Quintela <quintela@redhat.com> --- docs/about/deprecated.rst | 7 +++++++ qapi/migration.json | 11 +++++++++-- migration/migration.c | 5 +++++ 3 files changed, 21 insertions(+), 2 deletions(-)