Whamcloud - gitweb
LU-12626 lnet: create existing net returns EEXIST 81/35681/2
authorOlaf Faaland <faaland1@llnl.gov>
Fri, 2 Aug 2019 16:38:50 +0000 (09:38 -0700)
committerOleg Drokin <green@whamcloud.com>
Thu, 15 Aug 2019 07:55:06 +0000 (07:55 +0000)
When "lnetctl net add" is called for an interface/net pair that
already exists, the error returned should be EEXIST, so the
user knows that the net is already configured.

Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Change-Id: Idab79ab288a11a2920793f27df235b4dfab497fe
Reviewed-on: https://review.whamcloud.com/35681
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/api-ni.c

index 99fda25..d50c939 100644 (file)
@@ -2388,7 +2388,7 @@ lnet_startup_lndnet(struct lnet_net *net, struct lnet_lnd_tunables *tun)
                 * up is actually unique. if it's not fail. */
                if (!lnet_ni_unique_net(&net_l->net_ni_list,
                                        ni->ni_interfaces[0])) {
-                       rc = -EINVAL;
+                       rc = -EEXIST;
                        goto failed1;
                }