Skip to content

Commit

Permalink
ready timeout to follow global timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
hellt committed Oct 4, 2021
1 parent fa35585 commit 709c5b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nodes/srl/srl.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ import (
const (
srlDefaultType = "ixrd2"

readyTimeout = time.Second * 30 // max wait time for node to boot
retryTimer = time.Second
retryTimer = 2 * time.Second
// additional config that clab adds on top of the factory config
srlConfigCmdsTpl = `set / system tls server-profile clab-profile
set / system tls server-profile clab-profile key "{{ .TLSKey }}"
Expand Down Expand Up @@ -243,7 +242,8 @@ func (s *srl) SaveConfig(ctx context.Context) error {
// Ready returns when the node boot sequence reached the stage when it is ready to accept config commands
// returns an error if not ready by the expiry of the timer readyTimeout.
func (s *srl) Ready(ctx context.Context) error {
ctx, cancel := context.WithTimeout(ctx, readyTimeout)
// Ready has a timeout set to the global runtime timeout
ctx, cancel := context.WithTimeout(ctx, s.GetRuntime().Config().Timeout)
defer cancel()
var stdout, stderr []byte
var err error
Expand Down

0 comments on commit 709c5b5

Please sign in to comment.