From eb6a59dd11816e0104b0ea3543ff917b71619c22 Mon Sep 17 00:00:00 2001 From: Sooraj Sreekumar Date: Tue, 30 Jan 2024 22:07:42 +0530 Subject: [PATCH] =?UTF-8?q?NET-6653=20Enabling=20container=20logs=20when?= =?UTF-8?q?=20initConsulServers=20fails=20and=20ret=E2=80=A6=20(#20396)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NET-6653 Enabling container logs when initConsulServers fails and return an error (container logs during launch() failure) On branch NET-6653 modified: testing/deployer/sprawl/boot.go --- testing/deployer/sprawl/boot.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/testing/deployer/sprawl/boot.go b/testing/deployer/sprawl/boot.go index 0389c77914..908916a113 100644 --- a/testing/deployer/sprawl/boot.go +++ b/testing/deployer/sprawl/boot.go @@ -313,6 +313,9 @@ func (s *Sprawl) initConsulServers() error { func (s *Sprawl) createFirstTime() error { if err := s.initConsulServers(); err != nil { + if err := s.CaptureLogs(context.Background()); err != nil { + s.logger.Warn("container logs capture encountered failures", "error", err) + } return fmt.Errorf("initConsulServers: %w", err) }