Skip to content

xapi/attach_helpers: remove useless check for leaked vbds #7035

Merged
psafont merged 2 commits into
masterfrom
dev/pau/control-domain
Jun 8, 2026
Merged

xapi/attach_helpers: remove useless check for leaked vbds #7035
psafont merged 2 commits into
masterfrom
dev/pau/control-domain

Conversation

@psafont

@psafont psafont commented Apr 24, 2026

Copy link
Copy Markdown
Member

Looks like this mechanism was used in the past, and only one vestigial
check on VBD creation was used.

It does not make sense to create a VBD associated with a task and
immediately check whether it has leaked.

psafont added 2 commits April 24, 2026 17:14
Gate the checks done for the other_config keys task_id and related_to to
VBDs associated with control domains

Signed-off-by: Pau Ruiz Safont <pau.safont@vates.tech>
Looks like this mechanism was used in the past, and only one vestigial
check on VBD creation was used.

It does not make sense to create a VBD associated with a task and
immediately check whether it has leaked.

Signed-off-by: Pau Ruiz Safont <pau.safont@vates.tech>
Comment thread ocaml/xapi/attach_helpers.ml Outdated
let has_task = List.mem_assoc Xapi_globs.vbd_task_key other_config in
let has_related = List.mem_assoc Xapi_globs.related_to_key other_config in
if (not has_task) && not has_related then (
if (not can_leak) || ((not has_task) && not has_related) then (

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If not can_leak means "not a control domain", doesn't this conflict with the comment below?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh it's all gone in the second commit...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I can find this code is used on vdi clone and copy, so there was nothing to ensure this code applied to only control domains. I believe the comment to be wrong.

@psafont psafont marked this pull request as ready for review June 2, 2026 13:17
@psafont psafont added this pull request to the merge queue Jun 8, 2026
Merged via the queue into master with commit 4db1de6 Jun 8, 2026
28 checks passed
@psafont psafont deleted the dev/pau/control-domain branch June 8, 2026 12:53
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.

4 participants