Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add default cni logs to minikbue logs #15909

Merged
merged 8 commits into from
Feb 24, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg/minikube/logs/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ var importantPods = []string{
"kube-scheduler",
"kube-proxy",
"kube-controller-manager",
"kindnet",
}

// logRunner is the subset of CommandRunner used for logging
Expand Down
8 changes: 6 additions & 2 deletions test/integration/multinode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,9 +493,10 @@ func validateDeployAppToMultiNode(ctx context.Context, t *testing.T, profile str
}
podIPs := strings.Split(strings.Trim(rr.Stdout.String(), "'"), " ")
if len(podIPs) != 2 {
t.Errorf("expected 2 Pod IPs but got %d", len(podIPs))
t.Errorf("expected 2 Pod IPs but got %d, output: %q", len(podIPs), rr.Output())
} else if podIPs[0] == podIPs[1] {
t.Errorf("expected 2 different pod IPs but got %s and %s", podIPs[0], podIPs[0])
t.Errorf("expected 2 different pod IPs but got %s and %s. output: %q", podIPs[0], podIPs[0], rr.Output())
medyagh marked this conversation as resolved.
Show resolved Hide resolved

}

// get Pod names
Expand Down Expand Up @@ -549,6 +550,9 @@ func validatePodsPingHost(ctx context.Context, t *testing.T, profile string) {
continue
}
hostIP := net.ParseIP(strings.TrimSpace(out.Stdout.String()))
if hostIP == nil {
t.Errorf("minikbue host ip is nil: %s", out.Output())
medyagh marked this conversation as resolved.
Show resolved Hide resolved
}
// try pinging host from pod
ping := fmt.Sprintf("ping -c 1 %s", hostIP)
if _, err := Run(t, exec.CommandContext(ctx, Target(), "kubectl", "-p", profile, "--", "exec", name, "--", "sh", "-c", ping)); err != nil {
Expand Down