feat: linstorhostcall rewrite - #93
Merged
Merged
Conversation
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>
Nambrok
requested changes
Aug 12, 2025
| 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] |
There was a problem hiding this comment.
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.
Millefeuille42
force-pushed
the
mlr/feat-linstorhostcall-rewrite
branch
3 times, most recently
from
August 12, 2025 13:50
70ee630 to
a2ec9f1
Compare
Wescoeur
self-requested a review
August 19, 2025 21:54
Wescoeur
requested changes
Aug 19, 2025
Millefeuille42
force-pushed
the
mlr/feat-linstorhostcall-rewrite
branch
from
August 20, 2025 10:16
365ae23 to
2037b2a
Compare
Nambrok
approved these changes
Aug 20, 2025
Wescoeur
approved these changes
Aug 21, 2025
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
force-pushed
the
mlr/feat-linstorhostcall-rewrite
branch
from
August 21, 2025 13:28
2037b2a to
7b50e3b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.