Package: autopkgtest
Version: 6.0
LXD 6.8 disabled support for `lxc image publish --public` in
non-default projects [1]. autopkgtest-build-lxd calls `lxc image
publish` with --public, meaning that with LXD 6.8+ it can only be run
in project default:
Error: Images can only be marked public in the default project
ERROR:autopkgtest-build-lxd:Command
'['/usr/share/autopkgtest/lib/build-lxd.sh', '--lxd',
'ubuntu:resolute']' returned non-zero exit status 1.
I use autopkgtest in my CI system and don't want to grant API access
to the default project (as it contains more sensitive resources than
other projects). Ideally autopkgtest-build-lxd would expose an option
to control whether the image was published as public or not. Although,
it may be a good idea to wait to design a solution to this until the
LXD 6-series LTS; they are likely to land image registries soon which
may change the landscape a bit [2]. Unfortunately that also introduces
some complexity around Incus compatibility.
Reporting this against 6.0 as it contains the affected code but I've
only experimentally verified against 5.55.
As an aside, is the ci-team still interested in seeing a rewrite of
autopkgtest-build-{lxd,incus} in Python (as indicated in the
comments)? I'd like to implement project support like I did for
autopkgtest-virt-lxd but my sense is that it'd be safer to make
modifications like if the implementation language were python... [3].
Thanks!
~Wesley
[1] https://github.com/canonical/lxd/pull/18052
[2] https://github.com/canonical/lxd/pull/17680
[3] https://salsa.debian.org/ci-team/autopkgtest/-/merge_requests/651