← 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

Enhancement to replace LXD CLI with pylxd for faster, more reliable LXD interaction. Partially adopted (commit #874). Decision pending LXD 6.x migration.

Suggested action: keep open

Reason: The issue has been triaged (labeled as Enhancement) and has maintainer engagement across multiple comments. A clear path forward exists: @steinbro (2026-01-15) suggested revisiting when migrating from LXD 5.x to 6.x. Partial progress has been made (commit #874 uses pylxd for instance existence checks), and the issue remains relevant pending LXD 6.x LTS release.

Impact: 55 Quick Win: 19.25 Staleness: 45 Complexity: 65 Confidence: 65 Support Request: 15

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
qwen3.6-35b-a3b-mtp-q6
Impact: 55
Quick Win: 19.25
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.
qwen3.6-35b-a3b-mtp-q6
Staleness: 35
Complexity: 75
Confidence: 85
Support Request: 0
keep open Enhancement to replace LXD CLI usage with pylxd for improved reliability. Discussed by maintainers, with a plan to revisit during the upcoming LXD 6.x migration. Currently open and tracked.

Update history

No update history recorded yet.

Related work

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

    Similar enhancement in snapcraft to use pylxd instead of lxc exec, but was abandoned due to mocking-related test failures. Provides context on challenges with pylxd adoption.

Related issues

Issue Project State Summary Similarity
#3147 Use `pylxd` instead of `lxc exec` snapcraft closed Abandoned after mocking-related test failures prevented progress. Maintainer closed the pull request as stale, deferring LXD remote handling improvements to future development.
74%