From b97f6a92b9070d38d02c80493dd990ce4a7f45a2 Mon Sep 17 00:00:00 2001 From: Rebecca Mahany-Horton Date: Fri, 15 Nov 2024 11:29:17 -0500 Subject: [PATCH] Give launcher interactive enough time to run during doctor (#1958) --- ee/debug/checkups/checkups.go | 2 +- ee/debug/checkups/osquery.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ee/debug/checkups/checkups.go b/ee/debug/checkups/checkups.go index 374ca539f..beff7a444 100644 --- a/ee/debug/checkups/checkups.go +++ b/ee/debug/checkups/checkups.go @@ -233,7 +233,7 @@ func RunDoctor(ctx context.Context, k types.Knapsack, w io.Writer) { warningCheckups := []string{} for _, c := range checkupsFor(k, doctorSupported) { - ctx, cancel := context.WithTimeout(context.TODO(), 10*time.Second) + ctx, cancel := context.WithTimeout(context.TODO(), 20*time.Second) defer cancel() doctorCheckup(ctx, c, w) diff --git a/ee/debug/checkups/osquery.go b/ee/debug/checkups/osquery.go index a00fea65a..c7db0c879 100644 --- a/ee/debug/checkups/osquery.go +++ b/ee/debug/checkups/osquery.go @@ -77,7 +77,7 @@ func (o *osqueryCheckup) interactive(ctx context.Context) error { out, err := cmd.CombinedOutput() o.executionTimes[cmd.String()] = fmt.Sprintf("%d ms", time.Now().UnixMilli()-startTime) if err != nil { - return fmt.Errorf("running %s interactive: err %w, output %s", launcherPath, err, string(out)) + return fmt.Errorf("running %s interactive: err %w, output %s; ctx err: %+v", launcherPath, err, string(out), cmdCtx.Err()) } return nil