← Back to issue list

LXDProvider.launched_environment() fails on Fedora 39

View original Github issue

Metadata

Project
craft-providers
Number
#753
Type
issue
State
closed
Author
tigarmo
Labels
—
Created
Updated
Closed

Current evaluation

Fedora 39 hosts crashed in LXDProvider.launched_environment() because ensure_guest_compatible() parsed VERSION_ID as a BuilddBaseAlias. Fixed by PR #762 (commit 789c32e), which skips LXD compat checks on non-Ubuntu hosts.

Resolution: closed resolved

Reason: Maintainer tigarmo closed the issue with 'Fixed in #762'; PR #762 'fix: only do LXD compat checks on Ubuntu' was merged as commit 789c32e, adding an early return in craft_providers/bases/checks.py when the host os-release ID is not 'ubuntu'. The regression had been introduced by merged PR #720 (craft-providers 2.3.0) and tracked internally as CRAFT-4565.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description Trying to launch an LXD instance on Fedora 39 fails as `bases.ensure_guest_compatible()` tries to parse the host system's release as an Ubuntu version. ### To Reproduce You can use [this spread test](https://github.com/canonical/rockcraft/tree/main/tests/spread/foreign/big) in Rockcraft, which runs in Fedora 39. ### part yaml ```shell ``` ### Relevant log output ```shell File "/var/lib/snapd/snap/rockcraft/x1/lib/python3.12/site-packages/craft_application/commands/lifecycle.py", line 90, in _run_manager_for_build_plan provider.run_managed(build, bool(fetch_service_policy)) File "/var/lib/snapd/snap/rockcraft/x1/lib/python3.12/site-packages/craft_application/services/provider.py", line 435, in run_managed with self.instance( File "/snap/rockcraft/current/usr/lib/python3.12/contextlib.py", line 137, in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ File "/var/lib/snapd/snap/rockcraft/x1/lib/python3.12/site-packages/craft_application/services/provider.py", line 165, in instance with provider.launched_environment( File "/snap/rockcraft/current/usr/lib/python3.12/contextlib.py", line 137, in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ File "/var/lib/snapd/snap/rockcraft/x1/lib/python3.12/site-packages/craft_providers/lxd/lxd_provider.py", line 167, in launched_environment bases.ensure_guest_compatible( File "/var/lib/snapd/snap/rockcraft/x1/lib/python3.12/site-packages/craft_providers/bases/checks.py", line 85, in ensure_guest_compatible host_base_alias = BuilddBaseAlias(parse_os_release().get("VERSION_ID")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/snap/rockcraft/current/usr/lib/python3.12/enum.py", line 757, in __call__ return cls.__new__(cls, value) ^^^^^^^^^^^^^^^^^^^^^^^ File "/snap/rockcraft/current/usr/lib/python3.12/enum.py", line 1171, in __new__ raise ve_exc ValueError: '39' is not a valid BuilddBaseAlias ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fedora 39 hosts crashed in LXDProvider.launched_environment() because ensure_guest_compatible() parsed VERSION_ID as a BuilddBaseAlias. Fixed by PR #762 (commit 789c32e), which skips LXD compat checks on non-Ubuntu hosts.
qwen/qwen3.6-35b-a3b — closed resolved Fixed in #762 by handling non-Ubuntu host OS releases (like Fedora 39) in ensure_guest_compatible(), resolving the ValueError when parsing VERSION_ID.

Update history

Date Change
created

Related work

  • Likely Fixed By: canonical/craft-providers#762 (confidence 99%)

    Merged PR 'fix: only do LXD compat checks on Ubuntu' (commit 789c32e); cited by the maintainer in the closing comment.

  • Caused By: canonical/craft-providers#720 (confidence 90%)

    Merged feature PR adding ensure_guest_compatible() checks, shipped in craft-providers 2.3.0; identified by mr-cal as the source of the regression.

Related issues

Issue Project State Summary Similarity
#762 fix: only do LXD compat checks on Ubuntu craft-providers merged Merged PR #762 as commit 789c32e, limiting LXD guest compatibility checks to Ubuntu and fixing Fedora 39 launched_environment failures (#753).
78%