Skip to contentSkip to conversation

migrate-start-postcopy: Improve text

PATCH In review Dr. David Alan Gilbert (git) 3 participants 4 messages Nov 12, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 migrate-start-postcopy: Improve text

From: "Dr. David Alan Gilbert" <[email protected]>

Improve the text in both the qapi-schema and hmp help to point out you need to set the postcopy-ram capability prior to issuing migrate-start-postcopy.

Also fix the text of the migrate_start_postcopy error that deals with capabilities.

---
v2
Updated text to Erik's suggestion
Fixed error text error spotted by Christian

 hmp-commands.hx       | 4 +++-
 migration/migration.c | 2 +-
 qapi-schema.json      | 4 +++-
 3 files changed, 7 insertions(+), 3 deletions(-)
hmp-commands.hx +3 -1
index 8939b98..a3e5cb7 100644
@@ -1011,7 +1011,9 @@ ETEXI
         .name       = "migrate_start_postcopy",
         .args_type  = "",
         .params     = "",
-        .help       = "Switch migration to postcopy mode",
+        .help       = "Followup to a migration command to switch the migration"
+                      " to postcopy mode. The x-postcopy-ram capability must "
+                      "be set before the original migration command.",
         .mhandler.cmd = hmp_migrate_start_postcopy,
     },
 
migration/migration.c +1 -1
index 5df490a..9bd2ce7 100644
@@ -768,7 +768,7 @@ void qmp_migrate_start_postcopy(Error **errp)
     MigrationState *s = migrate_get_current();
 
     if (!migrate_postcopy_ram()) {
-        error_setg(errp, "Enable postcopy with migration_set_capability before"
+        error_setg(errp, "Enable postcopy with migrate_set_capability before"
                          " the start of migration");
         return;
     }
qapi-schema.json +3 -1
index 8c3a42a..3973fa6 100644
@@ -706,7 +706,9 @@
 ##
 # @migrate-start-postcopy
 #
-# Switch migration to postcopy mode
+# Followup to a migration command to switch the migration to postcopy mode.
+# The x-postcopy-ram capability must be set before the original migration
+# command.
 #
 # Since: 2.5
 { 'command': 'migrate-start-postcopy' }
Signature · 1 line
2.5.0
#1 lore raw
Quoted 54 lines · Dr. David Alan Gilbert (git)

From: "Dr. David Alan Gilbert" <[email protected]>

Improve the text in both the qapi-schema and hmp help to point out you need to set the postcopy-ram capability prior to issuing migrate-start-postcopy.

Also fix the text of the migrate_start_postcopy error that deals with capabilities.

---
v2
Updated text to Erik's suggestion
Fixed error text error spotted by Christian

  hmp-commands.hx       | 4 +++-
  migration/migration.c | 2 +-
  qapi-schema.json      | 4 +++-
  3 files changed, 7 insertions(+), 3 deletions(-)
hmp-commands.hx +3 -1
index 8939b98..a3e5cb7 100644
@@ -1011,7 +1011,9 @@ ETEXI
          .name       = "migrate_start_postcopy",
          .args_type  = "",
          .params     = "",
-        .help       = "Switch migration to postcopy mode",
+        .help       = "Followup to a migration command to switch the migration"
+                      " to postcopy mode. The x-postcopy-ram capability must "
+                      "be set before the original migration command.",
          .mhandler.cmd = hmp_migrate_start_postcopy,
      },
 
migration/migration.c +1 -1
index 5df490a..9bd2ce7 100644
@@ -768,7 +768,7 @@ void qmp_migrate_start_postcopy(Error **errp)
      MigrationState *s = migrate_get_current();
 
      if (!migrate_postcopy_ram()) {
-        error_setg(errp, "Enable postcopy with migration_set_capability before"
+        error_setg(errp, "Enable postcopy with migrate_set_capability before"
                           " the start of migration");
          return;
      }
qapi-schema.json +0 -0
index 8c3a42a..3973fa6 100644

qapi-schema.json line 714

Quoted 10 lines
qapi-schema.json +3 -1
@@ -706,7 +706,9 @@
  ##
  # @migrate-start-postcopy
  #
-# Switch migration to postcopy mode
+# Followup to a migration command to switch the migration to postcopy mode.
+# The x-postcopy-ram capability must be set before the original migration
+# command.
  #
  # Since: 2.5
  { 'command': 'migrate-start-postcopy' }

I like the rewording especially in the help text. This will make it far clearer to the user.

fwiw, Acked-by: Jason J. Herne <[email protected]>

Signature · 1 line
-- Jason J. Herne ([email protected])
Reviewed-by on v2 1/1
#2 lore raw
In reply to Dr. David Alan Gilbert (git)
Quoted 6 lines · Dr. David Alan Gilbert (git)

From: "Dr. David Alan Gilbert" <[email protected]>

Improve the text in both the qapi-schema and hmp help to point out you need to set the postcopy-ram capability prior to issuing migrate-start-postcopy.

Quoted 7 lines

Also fix the text of the migrate_start_postcopy error that deals with capabilities.

---
v2
Updated text to Erik's suggestion

It's Eric, but you're not the first (nor the last) to make that typo.

qapi-schema.json line 709

Quoted 7 lines

+++ b/qapi-schema.json

qapi-schema.json +1 -1
@@ -706,7 +706,9 @@
 ##
 # @migrate-start-postcopy
 #
-# Switch migration to postcopy mode
+# Followup to a migration command to switch the migration to postcopy mode.

Maybe "Followup to the migrate command to switch the migration..."

But the wording you have also covers the case if we add something other than just 'migrate' to start a migration, so I'm fine either way.

Signature · 2 lines
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org
#3 lore raw
Quoted 10 lines · * Eric Blake ([email protected]) wrote:
Quoted 9 lines · Dr. David Alan Gilbert (git)

From: "Dr. David Alan Gilbert" <[email protected]>

Improve the text in both the qapi-schema and hmp help to point out you need to set the postcopy-ram capability prior to issuing migrate-start-postcopy.

Also fix the text of the migrate_start_postcopy error that deals with capabilities.

Quoted 6 lines
Quoted 4 lines

---
v2
Updated text to Erik's suggestion

It's Eric, but you're not the first (nor the last) to make that typo.

Oops sorry about that.

Quoted 10 lines

qapi-schema.json line 709

Quoted 7 lines

+++ b/qapi-schema.json

qapi-schema.json +1 -1
@@ -706,7 +706,9 @@
 ##
 # @migrate-start-postcopy
 #
-# Switch migration to postcopy mode
+# Followup to a migration command to switch the migration to postcopy mode.

Maybe "Followup to the migrate command to switch the migration..."

Quoted 4 lines

But the wording you have also covers the case if we add something other than just 'migrate' to start a migration, so I'm fine either way.

Thanks,

Dave

Quoted 5 lines
Signature · 3 lines
-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK