From 12649e359bc3a778c5a3f8fb17ee6731c45decd4 Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Tue, 10 Feb 2009 11:59:17 +0000
Subject: [PATCH] LUSetInstanceParams: use the correct hvparams

In LUSetInstanceParam we used to save the dict without defaults for the
instance params as hv_inst, but to use the populated one for the
instance (hv_new). Fixing this leads to instances without all the
parameters set.

Reviewed-by: iustinp
---
 lib/cmdlib.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index bf66dda73..a939749ff 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -5894,7 +5894,7 @@ class LUSetInstanceParams(LogicalUnit):
 
     # hvparams changes
     if self.op.hvparams:
-      instance.hvparams = self.hv_new
+      instance.hvparams = self.hv_inst
       for key, val in self.op.hvparams.iteritems():
         result.append(("hv/%s" % key, val))
 
-- 
GitLab