Fix revisions_to_keep volume property when creating VM in a specific pool
The revisions_to_keep should be inherited from the pool by default (or whatever else logic is in the storage pool driver). When creating VM in a specific pool, volumes config is re-initialized to include right defaults. But the config cleaning logic in `_clean_volume_config()` failed to remove revisions_to_keep property initialized by the default pool driver. This prevented new pool driver to apply its own default logic. An extreme result was inability to create a VM in 'file' pool at all, because it refuses any revisions_to_keep > 1, and the default LVM pool has revisions_to_keep = 2.
This commit is contained in:
parent
4e6472b018
commit
719eb5c2a2
@ -2262,7 +2262,7 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
|
||||
|
||||
def _clean_volume_config(config):
|
||||
common_attributes = ['name', 'pool', 'size',
|
||||
'revisions_to_keep', 'rw', 'snap_on_start',
|
||||
'rw', 'snap_on_start',
|
||||
'save_on_stop', 'source']
|
||||
return {k: v for k, v in config.items() if k in common_attributes}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user