[PATCH 5/5] Always bring up network interfaces

Daniel M. Weeks weeksd2 at rpi.edu
Fri Apr 17 04:02:40 AEST 2020


This is necessary to process IB interfaces when a specific interface has
been selected for DHCP, otherwise IB interfaces will not be listed in
the info or config UIs.

When IB interfaces are first discovered, they do not have a unique
hardware address so they are not registered. Bringing them up even if
they won't ultimately be configured gives them a second chance to be
registered.

Signed-off-by: Daniel M. Weeks <weeksd2 at rpi.edu>
---
 discover/network.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/discover/network.c b/discover/network.c
index 5f3a05c..b00190e 100644
--- a/discover/network.c
+++ b/discover/network.c
@@ -522,15 +522,6 @@ static void configure_interface(struct network *network,
 		return;
 	}
 
-	/* if we're in manual config mode, we need an interface configuration */
-	if (network->manual_config && !config) {
-		interface->state = IFSTATE_IGNORED;
-		pb_log("network: skipping %s: manual config mode, "
-				"but no config for this interface\n",
-				interface->name);
-		return;
-	}
-
 	/* new interface? bring up to the point so we can detect a link */
 	if (interface->state == IFSTATE_NEW) {
 		if (!up) {
@@ -544,6 +535,15 @@ static void configure_interface(struct network *network,
 		}
 	}
 
+	/* if we're in manual config mode, we need an interface configuration */
+	if (network->manual_config && !config) {
+		interface->state = IFSTATE_IGNORED;
+		pb_log("network: skipping %s: manual config mode, "
+				"but no config for this interface\n",
+				interface->name);
+		return;
+	}
+
 	/* no link? wait for a notification */
 	if (interface->state == IFSTATE_UP_WAITING_LINK && !link)
 		return;
-- 
Daniel M. Weeks


-- 
Daniel M. Weeks
Lead HPC Developer
Center for Computational Innovations
Rensselaer Polytechnic Institute
Troy, NY 12180
518-276-4458


More information about the Petitboot mailing list