The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/7227
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) === Note for reviewers (especially @stgraber): I realized that now that we try to listen to the configured network address in `lxd init`, the behavior is not idempotent anymore. If you try to run again `lxd init` and use the same network address you'll get an error. Not sure if we care about this. Signed-off-by: Free Ekanayaka <free.ekanay...@canonical.com>
From 84c256206af3ac44b6e1237df1ef1613824689e5 Mon Sep 17 00:00:00 2001 From: Free Ekanayaka <free.ekanay...@canonical.com> Date: Mon, 20 Apr 2020 13:27:19 +0100 Subject: [PATCH] lxd/init: Improve error messages when failing to bind an address Signed-off-by: Free Ekanayaka <free.ekanay...@canonical.com> --- lxd/main_init_interactive.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lxd/main_init_interactive.go b/lxd/main_init_interactive.go index 38ff31b08e..8c848b4adb 100644 --- a/lxd/main_init_interactive.go +++ b/lxd/main_init_interactive.go @@ -124,7 +124,7 @@ func (c *cmdInit) askClustering(config *cmdInitData, d lxd.InstanceServer) error } listener, err := net.Listen("tcp", address) if err != nil { - return fmt.Errorf("Can't bind address %q", address) + return fmt.Errorf("Can't bind address %q: %v", address, err) } listener.Close() return nil @@ -656,7 +656,7 @@ they otherwise would. address := fmt.Sprintf("%s:%d", netAddr, netPort) listener, err := net.Listen("tcp", address) if err != nil { - return fmt.Errorf("Can't bind address %q", address) + return fmt.Errorf("Can't bind address %q: %v", address, err) } listener.Close() return nil
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel