Open mr-cal opened 1 year ago
[bump] since I couldn't find this in jira
Thank you for reporting us your feedback!
The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-2775.
This message was autogenerated
That JIRA link is not public.
How is it going with this issue?
I have this problem when trying to build on a VM in an cluster.
Is there any workarounds?
There has not been any progress made on this issue.
There is a workaround described in https://discourse.charmhub.io/t/using-charmcraft-with-very-high-uids/7208
Even though that is for charmcraft, the workaround should apply to snapcraft and rockcraft.
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 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).
When craft-providers launches a container with the config
raw.idmap=both <uid> 0
, LXD fails withError: 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:
charmcraft
project in LXD to accommodate high uids (security.idmap.base
,security.idmap.size
)Source