build providers: wait for systemd and better nameserver setup on LXD
Metadata
Current evaluation
PR #3052 merged as commit 7faeb2591: LXD build providers now wait for systemd to be running or degraded and prefer systemd-resolved's local nameserver; core20 provider tests enabled.
Resolution: closed resolved
Reason: The pull request was approved and merged into the main branch as commit 7faeb2591, adding systemd 'is-system-running' readiness checks and improved nameserver selection for LXD build providers.
Evaluated by: mr-cal-bot
No scores available.
Issue body
systemd has a sub-command "is-system-running", we care about two
results:
- running: which is implied with exit code 0
- degraded: which exits with code 1, for which we need to parse the
output.
The reason to parse for degraded is that LXD containers usually work
with systemd in a degraded state.
Additionally enable the build-provider test suite for core20, also
using the common make-hello instead of the in "suite" one (symlinked).
when systemd-resolved is running on the system, it will write the
actual resolv.conf in a prescribed location, which is now picked up as
the default to use the best local-to-host nameserver. The use of the
environment variable still overrides any setting for the cases where
it may be needed.
Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
- [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `./runtests.sh static`?
- [ ] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | PR #3052 merged as commit 7faeb2591: LXD build providers now wait for systemd to be running or degraded and prefer systemd-resolved's local nameserver; core20 provider tests enabled. | |
| stealth/space-bunny-alpha | — | closed resolved | PR #3052 merged as 7faeb2591, adding systemd running/degraded readiness checks and preferring systemd-resolved’s local nameserver for LXD builds. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged. Updated LXD build provider to handle systemd degraded state, enable core20 tests, and configure nameserver resolution via systemd-resolved with env var override. Approved, passed CI, +154/-50 lines across 8 files. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged updates to build providers that handle systemd's degraded state on LXD, improve nameserver configuration via systemd-resolved, and enable the core20 test suite. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3281 build providers: hide systemd setup for LXD | snapcraft | merged | Merged in PR #3281 (commit 8029036c6), hiding verbose LXD systemd setup output by default while preserving it in internal debug logs. | |
| #2647 build providers: catch LXD socket error | snapcraft | merged | Merged PR #2647 as commit d1902b8cb, adding error handling for LXD socket failures in build providers. | |
| #3141 build providers: use LXD-provided DNS by default | snapcraft | merged | Merged in canonical/snapcraft#3141 via commit 0a9fe51ad, making build providers use LXD-provided DNS through systemd-resolved and restart networkd without restarting containers. | |
| #5519 Docs: Multiple errors related to build provider installation | snapcraft | closed | Docs errors fixed by merged PR #5537 (commit 6ac28562d): sudo and the user-group step were dropped and LXD init corrected to `sudo lxd init --auto`; core20-only resource tip kept. | |
| #2966 build providers: move to buildd images | snapcraft | merged | Merged as commit 916097e6d, moving LXD build providers to Ubuntu buildd images to support all architectures and core20. | |
| #5537 docs: update build provider procedures | snapcraft | merged | Merged PR #5537 in commit 6ac28562d, updating build-provider docs to remove sudo/user-group steps and correct LXD initialization; fixes #5519. | |
| #3098 build providers: bootstrap with dirmngr | snapcraft | merged | Merged PR #3098 (commit 355346eac) adding dirmngr to core20 build-provider bootstrap requirements and switching package repos to lxd explicitly for a minimal environment. |