snapd 2.53.2 does not allow upper case hostnames
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Fix Released
|
Critical
|
Ian Johnson |
Bug Description
With snapd 2.53.2 we had the first major/stable release of the ability to set the hostname from a snap config setting, which was landed in https:/
However that PR effectively introduced a regression wherein if a hostname had been configured directly either by D-Bus or otherwise not using `snap set system hostname=...` and that hostname does not match the restrictive regular expression that snapd matches the hostname against, then all system config settings are no longer usable because snapd complains that the previously set hostname does not fit the pattern. See:
- Run configure hook of "core" snap (run hook "configure": cannot set hostname "C663432546-00514": name not valid)
The fix here is two-fold, one we should expand the regular expression we check against in snapd, and two we should have logic to know whether a setting of a "virtual"
Changed in snapd: | |
assignee: | nobody → Ian Johnson (anonymouse67) |
An initial relaxation of the regular expression is here: https:/ /github. com/snapcore/ snapd/pull/ 11123
However if you are affected by this bug, please indicate to us in this bug report an example of the sort of hostname you are using so we can be sure to allow it in the regular expression we are using.