From a967416c432202c595df16319814184a20640b94 Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Tue, 25 Jun 2013 08:43:57 +0200
Subject: [PATCH] Provide the right fix for the kvm_extra parameter

With the previous adjustment the arguments were boxed into one extra
array. This actually makes the parameter work (with the same caveats).

The manpage is also updated with the limitations.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
---
 lib/hypervisor/hv_kvm.py | 2 +-
 man/gnt-instance.rst     | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/hypervisor/hv_kvm.py b/lib/hypervisor/hv_kvm.py
index b2d158de8..54bd557f4 100644
--- a/lib/hypervisor/hv_kvm.py
+++ b/lib/hypervisor/hv_kvm.py
@@ -1369,7 +1369,7 @@ class KVMHypervisor(hv_base.BaseHypervisor):
         kvm_cmd.extend(["-usbdevice", dev])
 
     if hvp[constants.HV_KVM_EXTRA]:
-      kvm_cmd.extend([hvp[constants.HV_KVM_EXTRA].split(" ")])
+      kvm_cmd.extend(hvp[constants.HV_KVM_EXTRA].split(" "))
 
     # Save the current instance nics, but defer their expansion as parameters,
     # as we'll need to generate executable temp files for them.
diff --git a/man/gnt-instance.rst b/man/gnt-instance.rst
index 196040416..daa35c078 100644
--- a/man/gnt-instance.rst
+++ b/man/gnt-instance.rst
@@ -715,7 +715,9 @@ kvm\_extra
     Valid for the KVM hypervisor.
 
     Any other option to the KVM hypervisor, useful tweaking anything
-    that Ganeti doesn't support.
+    that Ganeti doesn't support. Note that values set with this
+    parameter are split on a space character and currently don't support
+    quoting.
 
 machine\_version
     Valid for the KVM hypervisor.
-- 
GitLab