Skip to content

feat: linstorhostcall rewrite - #93

Merged
Nambrok merged 3 commits into
3.2.12-8.3from
mlr/feat-linstorhostcall-rewrite
Aug 21, 2025
Merged

feat: linstorhostcall rewrite#93
Nambrok merged 3 commits into
3.2.12-8.3from
mlr/feat-linstorhostcall-rewrite

Conversation

@Millefeuille42

@Millefeuille42 Millefeuille42 commented Aug 11, 2025

Copy link
Copy Markdown

cherry-picked commits (160db7d and 0bba929) from 2.30.8-8.2-linstor-fixes-staging.

Also adds two fixes about access before assignment on exceptions, the latter being crucial for this PR to work.

Nambrok and others added 2 commits August 11, 2025 11:34
Try to use host_OpaqueRef to access primary then try on the master host
if it doesn't work, then find the primary with linstor API or if no
primary, any other host.

Signed-off-by: Damien Thenot <damien.thenot@vates.tech>
Co-authored-by: Ronan Abhamon <ronan.abhamon@vates.fr>
Signed-off-by: Damien Thenot <damien.thenot@vates.tech>
@Millefeuille42
Millefeuille42 requested a review from Nambrok August 11, 2025 14:20
@Millefeuille42 Millefeuille42 self-assigned this Aug 11, 2025
Comment thread drivers/linstorvhdutil.py Outdated
Comment thread drivers/linstorvhdutil.py Outdated
Comment thread drivers/linstorvhdutil.py Outdated
response = util.retry(remote_call, 5, 2)
except Exception as remote_e:
self._raise_openers_exception(device_path, local_e or remote_e)
host_ref_attached = list(util.get_hosts_attached_on(self._session, [vdi_uuid]))[0]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The call to util.get_hosts_attached_on() only "works" for a leaf VDI. Base copies don't have this information stored on them. It's out of scope for this PR but eventually we might want to check for leaves of our VDI.

Comment thread drivers/linstorvhdutil.py Outdated
@Millefeuille42
Millefeuille42 force-pushed the mlr/feat-linstorhostcall-rewrite branch 3 times, most recently from 70ee630 to a2ec9f1 Compare August 12, 2025 13:50
@Millefeuille42
Millefeuille42 requested a review from Nambrok August 13, 2025 07:58
@Wescoeur
Wescoeur self-requested a review August 19, 2025 21:54
Comment thread drivers/linstorvolumemanager.py Outdated
Comment thread drivers/linstorvhdutil.py Outdated
Comment thread drivers/linstorvhdutil.py Outdated
@Millefeuille42
Millefeuille42 force-pushed the mlr/feat-linstorhostcall-rewrite branch from 365ae23 to 2037b2a Compare August 20, 2025 10:16
@Nambrok
Nambrok requested a review from Wescoeur August 20, 2025 13:49
fix(linstor): prevent use of e before assignment in nested try-except
fix(linstor): use util.get_master_ref to get the master ref
fix(linstor): log host_ref instead UUID to prevent XAPI call
fix(log_failed_call): set error value for the call without an actual error
fix(linstorhostcall): use next iter instead of list conversion
cleanup(linstor): remove currently unused get_primary function

Signed-off-by: Mathieu Labourier <mathieu.labourier@vates.tech>
Co-authored-by: Damien Thenot <damien.thenot@vates.tech>
Co-authored-by: Ronan Abhamon <ronan.abhamon@vates.tech>
@Millefeuille42
Millefeuille42 force-pushed the mlr/feat-linstorhostcall-rewrite branch from 2037b2a to 7b50e3b Compare August 21, 2025 13:28
@Nambrok
Nambrok merged commit 62ed4ad into 3.2.12-8.3 Aug 21, 2025
5 checks passed
@Nambrok
Nambrok deleted the mlr/feat-linstorhostcall-rewrite branch August 21, 2025 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants