Skip to content

Commit 65021ac

Browse files
committed
fix(linstorvhdutil): coalesce helper returns the sector count now
Without this change we have an error in cleanup.py that interrupts the coalesce algorithm. Signed-off-by: Ronan Abhamon <ronan.abhamon@vates.fr>
1 parent 122b4a1 commit 65021ac

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

drivers/linstor-manager

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,8 +539,7 @@ def set_parent(session, args):
539539
def coalesce(session, args):
540540
try:
541541
device_path = args['devicePath']
542-
vhdutil.coalesce(device_path)
543-
return ''
542+
return str(vhdutil.coalesce(device_path))
544543
except Exception as e:
545544
util.SMlog('linstor-manager:coalesce error: {}'.format(e))
546545
raise

drivers/linstorvhdutil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ def force_parent(self, path, parentPath, parentRaw=False):
376376

377377
@linstormodifier()
378378
def force_coalesce(self, path):
379-
return self._call_method(vhdutil.coalesce, 'coalesce', path, use_parent=True)
379+
return int(self._call_method(vhdutil.coalesce, 'coalesce', path, use_parent=True))
380380

381381
@linstormodifier()
382382
def force_repair(self, path):

0 commit comments

Comments
 (0)