← Back to issue list

build providers: set hostname for lxd

View original Github issue

Metadata

Project
snapcraft
Number
#3521
Type
pull request
State
merged
Author
cjp256
Labels
Created
Updated
Closed

Current evaluation

Merged. Fixes LXD build provider hostname configuration by running hostname -F to notify the kernel after updating /etc/hostname. Approved by reviewers, passed CI, and achieved 100% coverage.

Suggested action:

No scores available.

Issue body

The hostname is being written to /etc/hostname, but the kernel is not being informed of the update. Use hostname -F to set it after writing. Signed-off-by: Chris Patterson <chris.patterson@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
qwen/qwen3.6-35b-a3b Merged. Fixes LXD build provider hostname configuration by running hostname -F to notify the kernel after updating /etc/hostname. Approved by reviewers, passed CI, and achieved 100% coverage.
qwen3.6-35b-a3b-mtp-q6 Merged into master. Fixes LXD hostname configuration by running hostname -F to update the kernel after writing to /etc/hostname, resolving a reported performance issue. Maintainer-authored with complete test coverage.
qwen3.6-35b-a3b-mtp-q6 Merged into master. Resolves LXD hostname configuration by invoking hostname -F to notify the kernel after writing to /etc/hostname, fixing reported sudo slowness. Achieved 100% test coverage.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#3141 build providers: use LXD-provided DNS by default snapcraft merged Merged into master. Configures the host to use systemd-resolved for DNS resolution, leveraging LXD-provided DNS by default. Approved with passing CI checks and 100% diff coverage across two files.
75%
#3052 build providers: wait for systemd and better nameserver setup on LXD snapcraft merged 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.
71%