Commit f06af3ca authored by Thomas Thrainer's avatar Thomas Thrainer

Check disk template in right dict when copying

Due to the structure of the code this condition can't possibly be true.
We have to look in the new_diskparams dict instead, otherwise it'd be
possible to try to update a non-existing entry.

(The same patch is in stable-2.7 as 106441d9 already).
Signed-off-by: default avatarThomas Thrainer <thomasth@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent a648fa8f
......@@ -803,7 +803,7 @@ class LUClusterSetParams(LogicalUnit):
self.new_diskparams = objects.FillDict(cluster.diskparams, {})
if self.op.diskparams:
for dt_name, dt_params in self.op.diskparams.items():
if dt_name not in self.op.diskparams:
if dt_name not in self.new_diskparams:
self.new_diskparams[dt_name] = dt_params
else:
self.new_diskparams[dt_name].update(dt_params)
......
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