Commit e228ab9c authored by Dimitris Aragiorgis's avatar Dimitris Aragiorgis Committed by Michele Tartara
Browse files

Support reseting arbitrary params of ext disks

If param=default and the param already exists then we remove
it from params dict. This is stolen by GetUpdatedParams() which
is used for hvparams modification/inheritance.

This means that 'default' value is not accepted for an arbitrary
param of an ext disk.
Signed-off-by: default avatarDimitris Aragiorgis <>
Signed-off-by: default avatarMichele Tartara <>
Reviewed-by: default avatarMichele Tartara <>
parent c5c72215
......@@ -3200,7 +3200,14 @@ class LUInstanceSetParams(LogicalUnit):
for key, value in params.iteritems():
if (key not in constants.MODIFIABLE_IDISK_PARAMS and
self.instance.disk_template == constants.DT_EXT):
disk.params[key] = value
# stolen from GetUpdatedParams: default means reset/delete
if value.lower() == constants.VALUE_DEFAULT:
del disk.params[key]
except KeyError:
disk.params[key] = value
changes.append(("disk.params:%s/%d" % (key, idx), value))
return changes
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