Skip to content

Commit b817e7a

Browse files
authored
fix(linstor): handle RAW type in compute_volume_size (#158)
Regression caused by this commit: ``` refactor(sm): move all VDI types in a new module `vditype.py` ``` The RAW type is no longer checked by this function; this prevents the creation of RAW volumes and consequently blocks HA activation. Signed-off-by: Ronan Abhamon <ronan.abhamon@vates.tech>
1 parent 7cb7eaf commit b817e7a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/linstorcowutil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ def compute_volume_size(self, virtual_size: int) -> int:
474474
)
475475
bitmap_overhead = self._cowutil.calcOverheadBitmap(virtual_size)
476476
virtual_size += meta_overhead + bitmap_overhead
477-
else:
477+
elif self._vdi_type != VdiType.RAW:
478478
raise Exception('Invalid image type: {}'.format(self._vdi_type))
479479

480480
return LinstorVolumeManager.round_up_volume_size(virtual_size)

0 commit comments

Comments
 (0)