Commit beabf067 authored by Guido Trotter's avatar Guido Trotter
Browse files

Fix mispopulation of nic parameters at nic modify

There's a bug in Ganeti 2.1 rc0 that makes nic parameters be populated
from the "filled in" dict, even if we're not changing any values in
them. This patch fixes the problem, by populating them from the correct
(unfilled) dict.
Signed-off-by: default avatarGuido Trotter <>
Reviewed-by: default avatarMichael Hanselmann <>
parent 3e5af833
......@@ -7833,8 +7833,8 @@ class LUSetInstanceParams(LogicalUnit):
for key in 'mac', 'ip':
if key in nic_dict:
setattr(instance.nics[nic_op], key, nic_dict[key])
if nic_op in self.nic_pnew:
instance.nics[nic_op].nicparams = self.nic_pnew[nic_op]
if nic_op in self.nic_pinst:
instance.nics[nic_op].nicparams = self.nic_pinst[nic_op]
for key, val in nic_dict.iteritems():
result.append(("nic.%s/%d" % (key, nic_op), val))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment