Skip to content

Commit

Permalink
Storage: fix different results after restarting service for logical pool
Browse files Browse the repository at this point in the history
The logical pool will be active from libvirt-9.9.0 after restarting service. But before it the result is also expected. So all these test results need to be keeped. This PR mainly fix it here.

Signed-off-by: Meina Li <[email protected]>
  • Loading branch information
meinaLi committed Feb 7, 2024
1 parent b37c57e commit c432384
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libvirt/tests/src/storage/virsh_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,9 @@ def check_pool_info(pool_info, check_point, value):
# pool as active. This is independent of autostart.
# So a directory based storage pool is thus pretty much always active,
# and so as the SCSI pool.
if pool_type not in ['dir', 'scsi', 'logical']:
if pool_type == 'disk' and libvirt_version.version_compare(8, 1, 0):
if pool_type not in ['dir', 'scsi']:
if (pool_type == 'disk' and libvirt_version.version_compare(8, 1, 0)) or \
(pool_type == 'logical' and libvirt_version.version_compare(9, 9, 0)):
utlv.check_exit_status(result)
else:
result = virsh.pool_start(pool_name, ignore_status=True)
Expand Down

0 comments on commit c432384

Please sign in to comment.