← Back to issue list

snapcraft fails on initial cleanbuild probe

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1697979
Type
issue
State
closed
Author
~lazypower
Labels
—
Created
Updated
Closed

Current evaluation

Closed as obsolete: cleanbuild was decommissioned, and standard Snapcraft builds now transparently use a clean build environment.

Resolution: closed stale

Reason: The 17 August 2023 closing comment from maintainer @~sergiusens said cleanbuild was no longer supported because all builds now clean-build by default. No resolving PR or commit was cited.

Evaluated by: mr-cal-bot

No scores available.

Issue body

I was attempting to build a new snap via 'snapcraft cleanbuild' on rev 2.29. Notables: my lxd install is an alias from another snap package providing lxd. I'm not certain if this is intended to work or if it will ever work due to it being a third party lxd package. charles@carbon:~/work/snaps/rtorrent$ snap aliases Command Alias Notes conjure-up.conjure-down conjure-down - conjure-up.juju juju - conjure-up.lxc lxc manual My test was unsuccessful via a message complaining that the command completed unsuccessfully: $ snapcraft cleanbuild --debug Starting snapcraft 2.29 from /usr/lib/python3/dist-packages/snapcraft. Setting up part 'rtorrent' with plugin 'cmake' and properties {'build-packages': ['libcurl', 'libncurses5'], 'snap': [], 'source': 'https://github.com/rakshasa/rtorrent.git', 'plugin': 'cmake', 'stage': [], 'prime': []}. Connection refused; is LXD running? Traceback (most recent call last): File "/usr/lib/python3/dist-packages/snapcraft/internal/lxd.py", line 229, in _verify_remote check_output(['lxc', 'list', '{}:'.format(remote)]) File "/usr/lib/python3.5/subprocess.py", line 626, in check_output **kwargs).stdout File "/usr/lib/python3.5/subprocess.py", line 708, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['lxc', 'list', 'local:']' returned non-zero exit status 1 The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/bin/snapcraft", line 31, in <module> snapcraft.main.main() File "/usr/lib/python3/dist-packages/snapcraft/main.py", line 253, in main return run(args, project_options) File "/usr/lib/python3/dist-packages/snapcraft/main.py", line 295, in run lifecycle.cleanbuild(project_options, remote=args['--remote']), File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle.py", line 344, in cleanbuild metadata=config.get_metadata(), remote=remote).execute() File "/usr/lib/python3/dist-packages/snapcraft/internal/lxd.py", line 143, in __init__ container_name=container_name, remote=remote) File "/usr/lib/python3/dist-packages/snapcraft/internal/lxd.py", line 53, in __init__ _verify_remote(remote) File "/usr/lib/python3/dist-packages/snapcraft/internal/lxd.py", line 237, in _verify_remote '#multiple-hosts'.format(remote)) from e snapcraft.internal.errors.SnapcraftEnvironmentError: There are either no permissions or the remote 'local' does not exist. Verify the existing remotes by running `lxc remote list` To setup a new remote, follow the instructions at https://linuxcontainers.org/lxd/getting-started-cli/#multiple-hosts $ lxc list local: +---------------+---------+------+------+------------+-----------+ | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | +---------------+---------+------+------+------------+-----------+ | juju-2bad81-0 | STOPPED | | | PERSISTENT | 0 | +---------------+---------+------+------+------------+-----------+ $ lxc remote list +-----------------+------------------------------------------+---------------+--------+--------+ | NAME | URL | PROTOCOL | PUBLIC | STATIC | +-----------------+------------------------------------------+---------------+--------+--------+ | images | https://images.linuxcontainers.org | simplestreams | YES | NO | +-----------------+------------------------------------------+---------------+--------+--------+ | local (default) | unix:// | lxd | NO | YES | +-----------------+------------------------------------------+---------------+--------+--------+ | ubuntu | https://cloud-images.ubuntu.com/releases | simplestreams | YES | YES | +-----------------+------------------------------------------+---------------+--------+--------+ | ubuntu-daily | https://cloud-images.ubuntu.com/daily | simplestreams | YES | YES | +-----------------+------------------------------------------+---------------+--------+--------+

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed stale Closed as obsolete: cleanbuild was decommissioned, and standard Snapcraft builds now transparently use a clean build environment.
stealth/space-bunny-alpha — closed stale 2.29 cleanbuild failed on the initial LXD probe with a third-party (conjure-up) lxc alias; closed 2023 by maintainer note that cleanbuild is no longer supported since all builds now default to cleanbuild.
stealth/space-bunny-alpha — closed stale Abandoned after inactivity: Snapcraft 2.29 could not connect to LXD through a third-party snap alias; no fix or workaround was provided.
qwen/qwen3.6-35b-a3b — — Abandoned due to inactivity. The cleanbuild probe failed connecting to LXD, likely because the third-party snap alias was unsupported. No fix or workaround was provided.
qwen/qwen3.6-35b-a3b — — Closed without resolution. Snapcraft cleanbuild failed due to LXD connection errors when LXD was provided via a third-party snap alias. The report received no comments or fixes and was abandoned.
qwen/qwen3.6-35b-a3b — — Abandoned. The report details a snapcraft cleanbuild failure caused by an LXD connection error during the initial probe, despite the LXD daemon being accessible via CLI. No comments or fixes were provided.
qwen3.6-35b-a3b-mtp-q6 — — Closed without resolution. The cleanbuild LXD integration was abandoned and later deprecated in snapcraft. No fix was implemented.

Update history

Date Change
created

Related issues

Issue Project State Summary Similarity
#1800119 snapcraft cleanbuild snapcraft (launchpad) closed The obsolete cleanbuild command was retired because builds became clean by default; a maintainer closed the report in August 2023.
83%
#1816042 snapcraft cleanbuild fails if container isn't fully ready snapcraft (launchpad) closed Closed as obsolete: @sergiusens said cleanbuild was no longer supported because normal builds now transparently provide clean builds.
82%
#1746359 snapcraft cleanbuild --debug should provide guidance on build failure snapcraft (launchpad) closed Superseded by Snapcraft 3.x base-based build environments, which replaced the legacy cleanbuild --debug container workflow.
80%
#1752498 cleanbuild fails with lxd snap snapcraft (launchpad) closed Closed as obsolete: the cleanbuild command was removed; Snapcraft builds now perform clean builds by default.
78%
#1811208 snapcraft failed to build with cleanbuild on 18.04 snapcraft (launchpad) closed Expired after 60 days without activity; no fix was recorded. A maintainer advised using --destructive-mode because cross-compilation in build environments was unsupported.
78%
#1609803 snapcraft cleanbuild --no-clean-up snapcraft (launchpad) closed Cleanbuild debugging landed in snapcore/snapcraft PR #740 (commit a24083e75); follow-up PR #1404 made --debug enter a shell when builds fail.
77%
#2044389 snapcraft clean failed but exit 0 snapcraft (launchpad) open Snapcraft 7.5.3 reports a missing build environment during clean but exits 0; a maintainer confirmed the bug and agreed it should fail, with no fix recorded.
76%
#1675516 can't cleanbuild snapcraft itself snapcraft (launchpad) closed Fresh testing confirmed Snapcraft could build itself successfully; the report was closed after the suspected interim fix was verified.
75%
#1570706 Snapcraft cleanbuild command doesn't work snapcraft (launchpad) closed Fixed by merged canonical/snapcraft PR #458 (f78b1e3a3), which corrected Cleanbuilder constructor arguments so snapcraft cleanbuild could initialize its container.
75%
#1817288 snapcraft cleanbuild produces incorrect architecture snap snapcraft (launchpad) closed Bug (legacy cleanbuild naming a snap _multi.snap despite correct advanced architectures) was never fixed; closed in Aug 2023 by ~sergiusens noting cleanbuild is no longer supported and all builds are now transparently clean.
74%