[PATCH] conf: Don't generate machine names with a dot

Ján Tomko jtomko at redhat.com
Wed Mar 11 13:22:07 UTC 2020


s/with a dot/ending with a dot/ in the summary?

On a Friday in 2020, Michal Privoznik wrote:
>According to the linked BZ, machined expects either valid
>hostname or valid FQDN. While in case of multiple dots, a
>trailing one doesn't violate FQDN, it does violate the rule in
>case of something simple, like "domain.". But it's safe to remove
>it in both cases.
>

Please mention my libvirt commit 45464db8ba502764cf37ec9335770248bdb3d9a8
and systemd commit d65652f1f21a4b0c59711320f34266c635393c89 here.

>Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1721804
>
>Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>---
> src/conf/domain_conf.c | 4 ++--
> tests/virsystemdtest.c | 1 +
> 2 files changed, 3 insertions(+), 2 deletions(-)

If you care about all the possible use cases:
* the above-mentioned systemd commit also forbids hyphens on either side
   of a dot
* even before that commit, leading dots were not allowed

Using any of the above (including the trailing dot which this commit fixes)
is equally odd to me. (unlike the quick fix I did for the dashes, which were
a result of libvirt cutting of sensible UUIDs in half)

So even after this patch libvirt is able to generate invalid machines.
names. I simply do not care.

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200311/b466416b/attachment-0001.sig>


More information about the libvir-list mailing list