← Back to issue list

environment-setup.sh fails

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1847774
Type
issue
State
open
Author
~racb
Labels
Created
Updated
Closed

Current evaluation

environment-setup.sh fails to create the snapcraft-dev LXD container with a newuidmap uid-mapping error on a fresh Ubuntu VM. No maintainer activity in ~7 years; the LXD-based setup script was later split and removed from the repo, so the reported flow is obsolete.

Suggested action: close stale

Reason: The issue is 2516 days old with zero comments and no maintainer interaction. The LXD-based tools/environment-setup.sh it references was split into environment-setup-local.sh (#3366) and both scripts were later removed in commit 237e84d6a (chore: remove unused tools), and the dev environment was migrated to Ubuntu 22.04 (#4425). The original LXD container setup flow no longer exists in the project, so the reported problem is no longer applicable.

Impact: 20 Quick Win: 14.0 Staleness: 95 Complexity: 30 Confidence: 80 Support Request: 40

Issue body

Following the instructions at HACKING.md: git clone https://github.com/snapcore/snapcraft.git cd snapcraft sudo snap install lxd sudo lxd init --auto --storage-backend=dir The following commands seem to be unnecessary in a fresh Ubuntu VM from a cloud image as the ubuntu user is already a member of the lxd group as confirmed by "groups". # sudo adduser "$USER" lxd # newgrp lxd Then: $ ./tools/environment-setup.sh Creating snapcraft-dev Error: Failed to run: /usr/lib/lxd/lxd forkstart snapcraft-dev /var/lib/lxd/containers /var/log/lxd/snapcraft-dev/lxc.conf: Try `lxc info --show-log snapcraft-dev` for more info $ lxc info --show-log snapcraft-dev Name: snapcraft-dev Remote: unix:// Architecture: x86_64 Created: 2019/10/11 14:00 UTC Status: Stopped Type: persistent Profiles: default Log: lxc snapcraft-dev 20191011140030.686 ERROR conf - conf.c:lxc_map_ids:2999 - newuidmap failed to write mapping "newuidmap: uid range [1000-1001) -> [1000-1001) not allowed": newuidmap 7549 0 100000 1000 1000 1000 1 1001 101001 64535 lxc snapcraft-dev 20191011140030.686 ERROR start - start.c:lxc_spawn:1708 - Failed to set up id mapping. lxc snapcraft-dev 20191011140030.706 WARN network - network.c:lxc_delete_network_priv:2613 - Invalid argument - Failed to remove interface "vethRXAOYT" from "lxdbr0" lxc snapcraft-dev 20191011140030.706 ERROR lxccontainer - lxccontainer.c:wait_on_daemonized_start:842 - Received container state "ABORTING" instead of "RUNNING" lxc snapcraft-dev 20191011140030.707 ERROR start - start.c:__lxc_start:1939 - Failed to spawn container "snapcraft-dev" lxc 20191011140030.720 WARN commands - commands.c:lxc_cmd_rsp_recv:132 - Connection reset by peer - Failed to receive response for command "get_state" Expected: container successfully created Actual: lxd error on the uid mapping I don't understand why this isn't working. Here's the problem reduced to just lxd: https://pastebin.ubuntu.com/p/8Sfk349bJf/ It isn't clear to me if this is a problem with the instructions in HACKING.md, with your setup script, or an lxd bug. However this is a great big obstacle in getting a development environment set up for snapcraft, so I'm filing it here.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 20
Quick Win: 14.0
Staleness: 95
Complexity: 30
Confidence: 80
Support Request: 40
close stale environment-setup.sh fails to create the snapcraft-dev LXD container with a newuidmap uid-mapping error on a fresh Ubuntu VM. No maintainer activity in ~7 years; the LXD-based setup script was later split and removed from the repo, so the reported flow is obsolete.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 40
Confidence: 90
Support Request: 30
close stale environment-setup.sh fails to create LXD container due to newuidmap error. Issue is over 6 years old, inactive, and likely obsolete due to LXD/container tech changes.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 45
Confidence: 90
Support Request: 70
close stale Dev environment setup script fails to create LXD container due to newuidmap error. Issue is over 6 years old with no maintainer interaction or labels.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 35
Confidence: 85
Support Request: 70
close stale Fails to create LXD container during snapcraft dev environment setup due to newuidmap permission errors. Unlabeled, no maintainer response, inactive since 2019.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 20
Confidence: 85
Support Request: 10
close stale LXD container setup fails with newuidmap permission errors during environment-setup.sh execution. Reported in 2019 with no maintainer response or labels. Likely outdated due to LXD and snapcraft version changes.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: snapcraft#3366 (confidence 55%)

    tools: split local environment setup from environment-setup.sh — restructured the LXD-based setup the issue targets.

  • Related To: snapcraft#4425 (confidence 50%)

    chore: migrate dev environment to ubuntu 22.04 and python 3.10 — supersedes the old LXD dev-container instructions.

Related issues

No related issues found above the similarity threshold.