← Back to issue list

Cannot launch lxd instance with high uids

View original Github issue

Metadata

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

Current evaluation

Bug preventing LXD instance launch for users with UID > 65,535. Acknowledged by maintainer, no fix yet, workaround available.

Suggested action: keep open

Reason: This is a valid bug affecting enterprise deployments with high UIDs, acknowledged by maintainer mr-cal who confirmed no progress has been made and provided a workaround. The issue remains unfixed and should stay open for future resolution.

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

Issue body

### Overview If the current user's uid (user id) is greater than 65,535, then craft-providers will fail to launch a LXD instance. ### Details Craft-providers [sets the id map](https://github.com/canonical/craft-providers/blob/adc7860d52ba984957433e5331a98eb044239bc6/craft_providers/lxd/launcher.py#L381) so the host's working directory can be mounted in the instance. On the other side, LXD does UID/GID mapping for security reasons (see more [here](https://linuxcontainers.org/lxd/docs/latest/userns-idmap/)). When craft-providers launches a container with the config `raw.idmap=both <uid> 0`, LXD fails with `Error: Failed instance creation: Failed creating instance record: Failed initialising instance: Host id is in the range of subids`. High uids occur in enterprise deployments where technologies like NIS, SSSD, and/or Active Directory are being used. ### Possible solutions If uid>65,535, then: 1. warn and provide a link to the documentation 2. update the `charmcraft` project in LXD to accommodate high uids (`security.idmap.base`, `security.idmap.size`) ### Source - https://github.com/canonical/charmcraft/issues/1054 - https://github.com/canonical/lxd/issues/11600 - https://discourse.charmhub.io/t/using-charmcraft-with-very-high-uids/7208

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6
Impact: 45
Quick Win: 20.25
Staleness: 65
Complexity: 55
Confidence: 75
Support Request: 15
keep open Bug preventing LXD instance launch for users with UID > 65,535. Acknowledged by maintainer, no fix yet, workaround available.
qwen/qwen3.6-35b-a3b
Staleness: 75
Complexity: 60
Confidence: 85
Support Request: 10
keep open Bug where craft-providers fails to launch LXD instances for users with UIDs over 65,535 due to LXD mapping limits. Acknowledged by maintainer, currently stalled with a workaround available.
qwen3.6-35b-a3b-mtp-q6
Staleness: 75
Complexity: 45
Confidence: 85
Support Request: 10
keep open Valid bug where craft-providers fails to launch LXD instances for users with UIDs > 65535. Acknowledged by maintainer, includes a workaround, but no progress has been made.
qwen3.6-35b-a3b-mtp-q6
Staleness: 80
Complexity: 45
Confidence: 85
Support Request: 20
close stale craft-providers fails to launch LXD instances when user UIDs exceed 65,535 due to LXD mapping limits. Maintainer-acknowledged with a documented workaround, but no fix implemented in over three years.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.