From a956eda9f72aa106cba5f90c84ba8e43f1aabdad Mon Sep 17 00:00:00 2001 From: Malte Poll <1780588+malt3@users.noreply.github.com> Date: Mon, 22 Jan 2024 17:01:38 +0100 Subject: [PATCH] cli: add debug logging to understand timing of verify call --- cli/verify.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cli/verify.go b/cli/verify.go index e34d6ac7e9..2b7975a29a 100644 --- a/cli/verify.go +++ b/cli/verify.go @@ -53,21 +53,25 @@ func runVerify(cmd *cobra.Command, _ []string) error { if err != nil { return err } + logger.Debug("Starting verification") validateOptsGen := newCoordinatorValidateOptsGen() dialer := dialer.New(atls.NoIssuer, snp.NewValidator(validateOptsGen, logger), &net.Dialer{}) + logger.Debug("Dialing coordinator", "endpoint", flags.coordinator) conn, err := dialer.Dial(cmd.Context(), flags.coordinator) if err != nil { return fmt.Errorf("Error: failed to dial coordinator: %w", err) } defer conn.Close() + logger.Debug("Getting manifest") client := coordapi.NewCoordAPIClient(conn) resp, err := client.GetManifests(cmd.Context(), &coordapi.GetManifestsRequest{}) if err != nil { - return fmt.Errorf("failed to set manifest: %w", err) + return fmt.Errorf("failed to get manifest: %w", err) } + logger.Debug("Got response") filelist := map[string][]byte{ coordRootPEMFilename: resp.CACert,