From af14d7b10f7da6c790bd5879941838a01edb4c1b Mon Sep 17 00:00:00 2001
From: Fabian Seidl <fabian.seidl@h-da.de>
Date: Tue, 22 Aug 2023 13:55:57 +0000
Subject: [PATCH] Hotfix clab slim start configured

See merge request danet/gosdn!520
---
 makefiles/clab/Makefile    | 3 ++-
 scripts/setup-clab-slim.sh | 4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/makefiles/clab/Makefile b/makefiles/clab/Makefile
index b5a7f3957..3280e90d4 100644
--- a/makefiles/clab/Makefile
+++ b/makefiles/clab/Makefile
@@ -20,7 +20,8 @@ containerlab-slim-start-reconfigure: create-clab-dir containerize-all generate-a
 	sudo containerlab deploy --topo $(MAKEFILE_DIR)dev_env_data/clab/gosdn_slim.clab.yaml --reconfigure
 
 containerlab-slim-start-configured: containerlab-slim-start
-	.$(SCRIPTS_DIR)/setup-clab-slim.sh -s true
+	@echo 'Waiting 20 seconds for containers to start...'
+	@.$(SCRIPTS_DIR)/setup-clab-slim.sh -s true
 
 containerlab-slim-stop: create-clab-dir
 	cd $(CLAB_DIR) &&\
diff --git a/scripts/setup-clab-slim.sh b/scripts/setup-clab-slim.sh
index 3046f11bf..390ae6f8e 100755
--- a/scripts/setup-clab-slim.sh
+++ b/scripts/setup-clab-slim.sh
@@ -9,7 +9,7 @@ GOSDN_ADDRESS="172.100.0.5:55055"
 ADMINPW="TestPassword"
 OPENCONFIG_PLUGIN="d1c269a2-6482-4010-b0d8-679dff73153b"
 ## Adjust this if timer is to short.
-SLEEP_TIMER=15
+SLEEP_TIMER=20
 
 ## Check for provided flags.
 while getopts s: flag
@@ -22,6 +22,8 @@ done
 ## Sleep is needed to give gosdn some time to start correctly.
 sleep $SLEEP_TIMER
 
+echo 'Logging in via gosdnc and setting up gnmi-targets in controller...'
+
 ## Call login and create entries for all the network elements.
 ## Could be a bit more automated in the future, but fine for now.
 $GOSDNC_PATH login --controller $GOSDN_ADDRESS --u admin --p $ADMINPW
-- 
GitLab