From 3e7b1f73a3a3b21acb0112e6c712b308e9a7ad72 Mon Sep 17 00:00:00 2001 From: Nitin Soni Date: Mon, 19 May 2025 19:29:48 -0700 Subject: [PATCH] juniper: Handle a rare scrapligo exception errTimeoutError Increase cert gen timeout to avoid timeouts deploying large topology --- topo/node/juniper/juniper.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/topo/node/juniper/juniper.go b/topo/node/juniper/juniper.go index 4bfcd3f9..f5622772 100644 --- a/topo/node/juniper/juniper.go +++ b/topo/node/juniper/juniper.go @@ -32,7 +32,7 @@ var ( // For committing a very large config scrapliOperationTimeout = 300 * time.Second // Wait for PKI cert infra - certGenTimeout = 10 * time.Minute + certGenTimeout = 15 * time.Minute // Time between polls certGenRetrySleep = 30 * time.Second // Wait for config mode @@ -130,7 +130,7 @@ func (n *Node) waitConfigInfraReadyAndPushConfigs(configs []string) error { for time.Since(start) < configModeTimeout { multiresp, err := n.cliConn.SendConfigs(configs) if err != nil { - if strings.Contains(err.Error(), "errPrivilegeError") { + if strings.Contains(err.Error(), "errPrivilegeError") || strings.Contains(err.Error(), "errTimeoutError") { log.Infof("Config mode not ready. Retrying in %v. Node %s, Resp %v", configModeRetrySleep, n.Name(), err) } else { return fmt.Errorf("failed pushing configs: %v", err)