lxd: pass id for host mount uid mapping
Metadata
Current evaluation
Merged #98 added an application-provided ID for LXD host-mount UID mapping while retaining the running user's UID as the default, resolving #97.
Resolution: closed resolved
Reason: Merged PR #98 implements the requested UID mapping behavior and explicitly states that it fixes #97.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Instead of always using the running user's uid for id mapping, allow
the value to be passed by the application so that the uid of the host
directory owner can be used in situations where the two values are
different. Default to the current user's uid to keep compatibility
with existing behavior.
CRAFT-893, fixes #97
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged #98 added an application-provided ID for LXD host-mount UID mapping while retaining the running user's UID as the default, resolving #97. | |
| qwen/qwen3.6-35b-a3b | — | closed resolved | Merged by cmatsuoka, fixing #97 by allowing host mount uid mapping to be passed by the application instead of defaulting to the running user's uid. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Related To:
craft-providers#97
(confidence 100%)
The merged PR explicitly identifies #97 as the bug it fixes.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #97 Filesystem uid mapping incorrect in lxd instance | craft-providers | closed | LXD host-mount ID mapping was fixed by #98 (05d4834), then refined by merged #780 (5717e2c), which sets UID and GID maps separately. | |
| #18 providers: fix id mapping in lxd project mount | rockcraft | merged | Merged PR #18 fixed LXD project mounts to map the host directory owner rather than the current UID, preventing file-creation failures when their IDs differ. | |
| #1588 lxd: use SUDO_UID for ID mapping | snapcraft | merged | Merged PR #1588 as commit 695794f4c, changing LXD ID mapping to use SUDO_UID and fixing Launchpad bug 1719996. | |
| #1904 lxd: raw.idmap expects host and container id respectively | snapcraft | merged | Merged PR #1904 fixed LXD `raw.idmap` argument order so host UID maps to container root (0), instead of mapping both IDs to the host user; commit 6bd4c9e59. | |
| #769 LXD idmap improperly set for high uids and gids | craft-providers | closed | Fixed by merged PR #98 (76a2d3a): LXD raw.idmap now maps the host UID and GID separately, correcting ownership for high, mismatched IDs. | |
| #1385 lxd: Don't assume user ID to 1000 for raw.idmap | snapcraft | merged | Merged PR #1385 as commit e85e0779b, removing LXD raw.idmap's hard-coded UID 1000 assumption for Launchpad bug 1700703; PR #1904 later corrected mapping order. | |
| #1629 lxd: fix the unit test for the user id map | snapcraft | merged | Merged as commit e820e119e (#1629), fixing the LXD user ID-map unit test under root execution after #1588 changed ID mapping to use SUDO_UID. |