← Back to issue list

Using default compatibility tag can cause DNS name conflicts

View original Github issue

Metadata

Project
craft-providers
Number
#454
Type
issue
State
open
Author
mr-cal
Labels
Type: Bug
Created
Updated
Closed

Current evaluation

Bug: missing compatibility_tag causes LXD DNS name conflicts when launching instances for multiple projects. Open for ~3 years with no maintainer comments or assignee.

Suggested action: needs triage

Reason: The issue has no maintainer comments, no assignee, and only the initial 'Type: Bug' label, indicating it hasn't been properly triaged or prioritized despite being open for nearly 3 years. The referenced related issue (craft-application#139) was closed without resolution, suggesting this needs fresh assessment to determine if the bug still exists and whether the suggested warning or architectural fix is appropriate.

Impact: 50 Quick Win: 35.0 Staleness: 75 Complexity: 30 Confidence: 60 Support Request: 10

Issue body

### Bug Description The `Base` class can accept an optional [`compatibility_tag`](https://github.com/canonical/craft-providers/blob/03704c107b3d88132a33453302c79da1dc9619c5/craft_providers/base.py#L107). If a `compatibility_tag` is not provided and craft-providers launches LXD instances for 2 different projects, LXD will fail because the two base instances have identical names. Source: https://github.com/canonical/craft-application/issues/139 ### Quick fix craft-providers should log a warning if a compatibility tag is not provided: ``` Warning: Compatibilty tag not provided. This may cause a name collision when launching LXD instances. ``` ### Long term fix As part of a major release, the `compatibility_tag` should be easier to use. It should be required and prepended to the base's compatibility tag. This simply the usage from: ```python from craft_providers import bases base = bases.BuilddBase(compatibility_tag=f"testcraft-{bases.BuildBase.compatibility_tag}", ...) ``` to: ```python from craft_providers import bases base = bases.BuilddBase(compatibility_tag="testcraft", ...) ``` ### To Reproduce ```python #! /usr/bin/env python3 from pathlib import Path import logging from craft_providers import bases, lxd logging.basicConfig(level="DEBUG") provider_a = lxd.LXDProvider(lxd_project="project1") provider_a.ensure_provider_is_available() alias = bases.BuilddBaseAlias.JAMMY my_base = bases.BuilddBase(alias=alias) with provider_a.launched_environment( project_name = "hello-world", project_path = Path().absolute(), base_configuration=my_base, build_base=alias.value, instance_name = "test-instance", ) as instance: instance.execute_run(["ls"]) provider_b = lxd.LXDProvider(lxd_project="project2") provider_b.ensure_provider_is_available() alias = bases.BuilddBaseAlias.JAMMY my_base = bases.BuilddBase(alias=alias) with provider_b.launched_environment( project_name = "hello-world", project_path = Path().absolute(), base_configuration=my_base, build_base=alias.value, instance_name = "test-instance", ) as instance: instance.execute_run(["ls"]) ``` ### part yaml _No response_ ### Relevant log output ```shell * Command standard error output: b'Error: Failed start validation for device "eth0": Instance DNS name "base-instance-buildd-base-v3-craft-comub-523148486bd0c6cc722c" already used on network\nTry `lxc info --show-log local:base-instance-buildd-base-v3-craft-comub-523148486bd0c6cc722c` for more info\n' ```

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6
Impact: 50
Quick Win: 35.0
Staleness: 75
Complexity: 30
Confidence: 60
Support Request: 10
needs triage Bug: missing compatibility_tag causes LXD DNS name conflicts when launching instances for multiple projects. Open for ~3 years with no maintainer comments or assignee.
qwen/qwen3.6-35b-a3b
Staleness: 85
Complexity: 20
Confidence: 80
Support Request: 5
close stale Bug report detailing DNS name conflicts in LXD when craft-providers launches instances without a compatibility tag. Includes reproduction steps and proposed warning/long-term fix. Unaddressed for over two years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 65
Complexity: 20
Confidence: 85
Support Request: 0
keep open Bug where omitting the compatibility_tag in craft-providers causes LXD instance DNS name collisions. Includes reproduction steps and proposed warning/fix. Currently open with no maintainer follow-up.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 20
Confidence: 85
Support Request: 0
needs triage Bug where omitting compatibility_tag in craft-providers causes LXD instance DNS name collisions. Includes reproduction steps and proposed fixes, but has seen no maintainer engagement in nearly 2.5 years.

Update history

No update history recorded yet.

Related work

  • Related To: craft-application#139 (confidence 90%)

    The issue body explicitly references this issue as the source. It was closed without resolution or linked PRs, indicating the underlying problem may persist.

Related issues

No related issues found above the similarity threshold.