Skip to content

[stable/caracal] machine_os: Preemptively load vfio kernel module.#682

Merged
mkalcok merged 2 commits intoopenstack-charmers:stable/caracalfrom
mkalcok:caracal-preemptively-load-vfio
May 8, 2025
Merged

[stable/caracal] machine_os: Preemptively load vfio kernel module.#682
mkalcok merged 2 commits intoopenstack-charmers:stable/caracalfrom
mkalcok:caracal-preemptively-load-vfio

Conversation

@mkalcok
Copy link
Copy Markdown
Contributor

@mkalcok mkalcok commented May 8, 2025

Backport of #678

mkalcok added 2 commits May 8, 2025 11:12
Flake8 started to complain about unused 'global' and 'nonlocal'
annotations (F842). Their usage fell into three categories:

* variable was not assigned to after declaring it with 'global'.
* function declared variable as 'global' before returning it.
  However, this does not make returned value "globally writable"
* declaring 'global' for sets and dicts before modifying them.
  This is not necessary. These structures are globally mutable
  even without the 'global' statement.

(cherry picked from commit b20ec47)
Signed-off-by: Martin Kalcok <martin.kalcok@canonical.com>
VFIO kernel module is not always loaded, which causes tests to fail
when they try to set No-IOMMU mode. This change calls modprobe to
ensure that VFIO is loaded before we try to use it.

(cherry picked from commit 0a01a10)
Signed-off-by: Martin Kalcok <martin.kalcok@canonical.com>
@mkalcok mkalcok marked this pull request as ready for review May 8, 2025 12:41
Copy link
Copy Markdown
Contributor

@sabaini sabaini left a comment

Choose a reason for hiding this comment

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

lgtm!

@mkalcok mkalcok merged commit ffdc866 into openstack-charmers:stable/caracal May 8, 2025
16 of 18 checks passed
@mkalcok mkalcok changed the title machine_os: Preemptively load vfio kernel module. [caracal] [stable/caracal] machine_os: Preemptively load vfio kernel module. May 22, 2025
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.

2 participants