Skip to content

Commit

Permalink
resolve reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
syw14 committed May 19, 2023
1 parent a6e2f6e commit f6db866
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tools/bug-report/pkg/content/content.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ import (
"strings"
"time"

"github.com/hashicorp/go-multierror"
"istio.io/istio/istioctl/pkg/util/formatting"
"istio.io/istio/pkg/config/analysis/analyzers"
"istio.io/istio/pkg/config/analysis/diag"
"istio.io/istio/pkg/config/analysis/local"
"istio.io/istio/pkg/config/resource"
"istio.io/istio/pkg/kube"
"istio.io/istio/pkg/util/istiomultierror"
"istio.io/istio/tools/bug-report/pkg/common"
"istio.io/istio/tools/bug-report/pkg/kubectlcmd"
"istio.io/pkg/log"
Expand Down Expand Up @@ -183,23 +185,23 @@ func GetIstiodInfo(p *Params) (map[string]string, error) {

// GetProxyInfo returns internal proxy debug info.
func GetProxyInfo(p *Params) (map[string]string, error) {
var errStr []string
errs := istiomultierror.New()
if p.Namespace == "" || p.Pod == "" {
return nil, fmt.Errorf("getProxyInfo requires namespace and pod")
}
ret := make(map[string]string)
for _, url := range common.ProxyDebugURLs(p.ClusterVersion) {
out, err := p.Runner.EnvoyGet(p.Namespace, p.Pod, url, p.DryRun)
if err != nil {
errStr = append(errStr, err.Error())
errs = multierror.Append(errs, err)
continue
}
ret[url] = out
}
if len(errStr) == 0 {
return ret, nil
if errs.ErrorOrNil() != nil {
return nil, errs
}
return ret, fmt.Errorf(strings.Join(errStr, "\n"))
return ret, nil
}

func GetZtunnelInfo(p *Params) (map[string]string, error) {
Expand Down

0 comments on commit f6db866

Please sign in to comment.