Skip to content

test: failing reproducer - no error for high UID (>65535) - #949

Draft
lengau wants to merge 1 commit into
mainfrom
fix/issue-259-high-uid-no-error
Draft

test: failing reproducer - no error for high UID (>65535)#949
lengau wants to merge 1 commit into
mainfrom
fix/issue-259-high-uid-no-error

Conversation

@lengau

@lengau lengau commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

Reproducer for #259

Enterprise systems using NIS, SSSD, or Active Directory commonly assign UIDs above 65535. When map_user_uid=True with such a UID, LXD rejects it with:

Error: Failed instance creation: Failed creating instance record:
Failed initialising instance: Host id is in the range of subids

This message is cryptic. craft-providers should detect this condition and raise a clear ProviderError before calling LXD.

Failing test

test_set_id_map_raises_for_high_uid — shows that _set_id_map() currently calls lxc.config_set(raw.idmap=...) for UIDs > 65535 rather than raising a descriptive error first.

Fix

Add a check in _set_id_map() before the lxc.config_set call: if uid > 65535, raise a ProviderError with a link to documentation.

Closes #259

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot launch lxd instance with high uids

1 participant