Skip to content

Commit f3d5fa7

Browse files
authored
fix(linstor): deal with missing group during SR creation (#159)
An update of the LINSTOR RPMs changes the behavior of the `storage_pool_create` function. It seems that we now receive two errors instead of one, which prevented us from entering the "missing LVM group" code branch during SR creation. As reminder, it's tolerated to have VGs not present on some nodes, it's why we have a specific code to deal with it. API errors when a group is missing: ``` [RESTMessageResponse({'ret_code': -4611686018409298978, 'message': "(xcp-node-1) Volume group 'linstor_group' not found", 'obj_refs': {'StorPoolDfn': 'test', 'Node': 'xcp-node-1'}, 'created_at': '2026-08-31T16:35:29.487312-04:00'}), RESTMessageResponse({'ret_code': -4611686018409298970, 'message': "Registration of storage pool 'test' on node 'xcp-node-1' failed due to an unhandled exception of type DelayedApiRcException. Exceptions have been converted to responses", 'details': 'Node: xcp-node-1, Storage pool name: test', 'error_report_ids': ['6A95E399-00000-000002'], 'obj_refs': {'StorPoolDfn': 'test', 'Node': 'xcp-node-1'}, 'created_at': '2026-08-31T16:35:29.494205-04:00'})] ``` Signed-off-by: Ronan Abhamon <ronan.abhamon@vates.tech>
1 parent b817e7a commit f3d5fa7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/linstorvolumemanager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1936,7 +1936,7 @@ def _create_sr(cls, group_name, ips, redundancy, thin_provisioning, logger=defau
19361936
result
19371937
)
19381938
if errors:
1939-
if len(errors) == 1 and errors[0].is_error(
1939+
if errors[0].is_error(
19401940
linstor.consts.FAIL_STOR_POOL_CONFIGURATION_ERROR
19411941
) and reg_volume_group_not_found.match(errors[0].message):
19421942
logger(

0 commit comments

Comments
 (0)