[PATCH] virsh migrate: Fix positional parameters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks to our smart option parser which automatically assigns positional
parameters the following (previously working) command fails:

    virsh migrate test qemu+ssh://1.2.3.4/system tcp://1.2.3.4/
    error: invalid argument: Unsupported compression method
    'tcp://1.2.3.4/'

We need to make sure new options are added at the end of the list rather
than where they logically belong.

Reported by Brian Rak.

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 tools/virsh-domain.c | 40 ++++++++++++++++++++--------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 02be58f..19c40b3 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -9792,26 +9792,6 @@ static const vshCmdOptDef opts_migrate[] = {
      .type = VSH_OT_BOOL,
      .help = N_("compress repeated pages during live migration")
     },
-    {.name = "comp-methods",
-     .type = VSH_OT_STRING,
-     .help = N_("comma separated list of compression methods to be used")
-    },
-    {.name = "comp-mt-level",
-     .type = VSH_OT_INT,
-     .help = N_("compress level for multithread compression")
-    },
-    {.name = "comp-mt-threads",
-     .type = VSH_OT_INT,
-     .help = N_("number of compression threads for multithread compression")
-    },
-    {.name = "comp-mt-dthreads",
-     .type = VSH_OT_INT,
-     .help = N_("number of decompression threads for multithread compression")
-    },
-    {.name = "comp-xbzrle-cache",
-     .type = VSH_OT_INT,
-     .help = N_("page cache size for xbzrle compression")
-    },
     {.name = "auto-converge",
      .type = VSH_OT_BOOL,
      .help = N_("force convergence during live migration")
@@ -9873,6 +9853,26 @@ static const vshCmdOptDef opts_migrate[] = {
      .type = VSH_OT_INT,
      .help = N_("port to use by target server for incoming disks migration")
     },
+    {.name = "comp-methods",
+     .type = VSH_OT_STRING,
+     .help = N_("comma separated list of compression methods to be used")
+    },
+    {.name = "comp-mt-level",
+     .type = VSH_OT_INT,
+     .help = N_("compress level for multithread compression")
+    },
+    {.name = "comp-mt-threads",
+     .type = VSH_OT_INT,
+     .help = N_("number of compression threads for multithread compression")
+    },
+    {.name = "comp-mt-dthreads",
+     .type = VSH_OT_INT,
+     .help = N_("number of decompression threads for multithread compression")
+    },
+    {.name = "comp-xbzrle-cache",
+     .type = VSH_OT_INT,
+     .help = N_("page cache size for xbzrle compression")
+    },
     {.name = NULL}
 };
 
-- 
2.9.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]