The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6790
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === The first thing a new user might try to do is create a new container named after a distro: "ubuntu-18.04". This fails with an error that the name is not valid, but wasn't clear about the problem. This clarifies that the container name is supposed to be a valid *DNS* hostname. Since dots seem like a common problem in potential container names, those are called out specifically as a problem.
From 71c5ffa1c2e4e1c36a84be7aaa595178df076c44 Mon Sep 17 00:00:00 2001 From: Mark Stosberg <m...@stosberg.com> Date: Mon, 27 Jan 2020 21:14:37 -0500 Subject: [PATCH] Improve a first impression error message The first thing a new user might try to do is create a new container named after a distro: "ubuntu-18.04". This fails with an error that the name is not valid, but wasn't clear about the problem. This clarifies that the container name is supposed to be a valid *DNS* hostname. Since dots seem like a common problem in potential container names, those are called out specifically as a problem. --- lxd/container.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lxd/container.go b/lxd/container.go index e86439c2df..58fe1fbc09 100644 --- a/lxd/container.go +++ b/lxd/container.go @@ -61,7 +61,7 @@ func containerValidName(name string) error { } if !shared.ValidHostname(name) { - return fmt.Errorf("Container name isn't a valid hostname") + return fmt.Errorf("Container name isn't a valid DNS hostname. Names may not contain dots.") } return nil
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel