NET-6653 Enabling container logs when initConsulServers fails and ret… (#20396)

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
This commit is contained in:
Sooraj Sreekumar 2024-01-30 22:07:42 +05:30 committed by GitHub
parent b0e87dbe13
commit eb6a59dd11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -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)
}