(deploy deployer, o options, path, reason string)
| 357 | } |
| 358 | |
| 359 | func 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 | |
| 384 | func listNodes(dp deployer, dump string) error { |
| 385 | cmd, err := dp.KubectlCommand() |
no test coverage detected