← Back to issue list

Consider switching from using the LXD CLI to pylxd

View original Github issue

Metadata

Project
craft-providers
Number
#646
Type
issue
State
open
Author
lengau
Labels
Type: Enhancement
Created
Updated
Closed
—

Current evaluation

Partially underway: pylxd handles some interactions, but most provider operations still use the LXC CLI; maintainers deferred reassessment until the LXD 6.x migration.

Suggested action: keep open

Reason: The work remains relevant: the current provider still uses LXC for operations such as instance listing and file transfer, while commit 48bd685 migrated only existence checks to pylxd. @steinbro explicitly deferred reconsideration until the LXD 6.x migration, and the unresolved remote-server compatibility requirement makes this substantial but not yet turnkey.

Evaluated by: mr-cal-bot

Impact: 48 Quick Win: 6 Complexity: 73 Confidence: 93 Actionability: 46

Issue body

### What needs to get done Replace most usage of the `lxc` and `lxd` CLI with [pylxd](https://github.com/canonical/pylxd). ### Why it needs to get done This is a faster, more reliable way to interact with LXD (e.g. https://github.com/canonical/craft-providers/issues/535)

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 48
Quick Win: 6
Complexity: 73
Confidence: 93
Actionability: 46
keep open Partially underway: pylxd handles some interactions, but most provider operations still use the LXC CLI; maintainers deferred reassessment until the LXD 6.x migration.
stealth/space-bunny-alpha
Impact: 48
Quick Win: 4
Complexity: 78
Confidence: 80
Actionability: 40
keep open Enhancement to replace lxc/lxd CLI calls with pylxd for speed/reliability. Partially done (version check, instance-exists in #874); remaining LXC CLI usage explicitly deferred by maintainers until the LXD 5.x->6.x migration.
stealth/space-bunny-alpha
Impact: 58
Quick Win: 5
Complexity: 86
Confidence: 94
Actionability: 58
keep open Proposed migration from LXD CLI calls to pylxd for speed and reliability; adoption is partial, with the remaining work explicitly deferred until the LXD 6.x migration.
qwen3.6-35b-a3b-mtp-q6
Impact: 55
Quick Win: 19
Staleness: 45
Complexity: 65
Confidence: 65
Support Request: 15
keep open Enhancement to replace LXD CLI with pylxd for faster, more reliable LXD interaction. Partially adopted (commit #874). Decision pending LXD 6.x migration.
qwen/qwen3.6-35b-a3b
Staleness: 65
Complexity: 70
Confidence: 85
Support Request: 10
keep open Issue proposes switching from LXD CLI to pylxd for better reliability. Discussion reveals past decisions against it due to missing remote support. Currently paused, awaiting LXD 6.x migration for re-evaluation.
qwen3.6-35b-a3b-mtp-q6
Staleness: 40
Complexity: 75
Confidence: 90
Support Request: 5
keep open Enhancement to evaluate replacing LXD CLI calls with pylxd for reliability. Currently under discussion among maintainers, pending LXD 6.x migration and reassessment of pylxd's remote server support.

Update history

No update history recorded yet.

Related work

  • Related To: craft-providers#535 (confidence 96%)

    Cited as an example motivating faster and more reliable LXD interaction; it was independently fixed by #532.

  • Related To: craft-providers#874 (confidence 94%)

    Commit 48bd685 partially advanced the migration by using pylxd to determine whether an instance exists.

  • Related To: snapcraft#3147 (confidence 87%)

    A prior pylxd migration targeted non-local remotes but closed unmerged with unresolved FakeContainer test failures.

Related issues

No related issues found above the similarity threshold.