MCPcopy
hub / github.com/kubernetes/test-infra / dumpRemoteLogs

Function dumpRemoteLogs

kubetest/e2e.go:359–382  ·  view source on GitHub ↗
(deploy deployer, o options, path, reason string)

Source from the content-addressed store, hash-verified

357}
358
359func dumpRemoteLogs(deploy deployer, o options, path, reason string) []error {
360 if o.kubemark {
361 // For dumping kubemark logs with logexporter, we should use
362 // root cluster kubeconfig.
363 kubeconfigKubemark := os.Getenv("KUBECONFIG")
364 kubeconfigRoot := os.Getenv("KUBEMARK_ROOT_KUBECONFIG")
365 if err := os.Setenv("KUBECONFIG", kubeconfigRoot); err != nil {
366 return []error{err}
367 }
368 defer os.Setenv("KUBECONFIG", kubeconfigKubemark)
369 }
370
371 if reason != "" {
372 reason += " "
373 }
374
375 var errs []error
376
377 errs = util.AppendError(errs, control.XMLWrap(&suite, reason+"DumpClusterLogs", func() error {
378 return deploy.DumpClusterLogs(path, o.logexporterGCSPath)
379 }))
380
381 return errs
382}
383
384func listNodes(dp deployer, dump string) error {
385 cmd, err := dp.KubectlCommand()

Callers 1

runFunction · 0.85

Calls 3

AppendErrorFunction · 0.92
XMLWrapMethod · 0.80
DumpClusterLogsMethod · 0.65

Tested by

no test coverage detected