Skip to content

Commit

Permalink
Some more changes
Browse files Browse the repository at this point in the history
  • Loading branch information
banjoh committed Dec 12, 2023
1 parent 930f0e5 commit 1ba54ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pkg/collect/run_pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -467,13 +467,13 @@ func deletePod(ctx context.Context, client *kubernetes.Clientset, pod *corev1.Po
})
if err != nil {
zeroGracePeriod := int64(0)
klog.V(2).Infof("Pod %s forcefully deleted after reaching the maximum wait time of %d seconds due to err=%v",
klog.V(2).Infof("Forcefully deleting pod %s after reaching the maximum wait time of %d seconds due to err=%v",
pod.Name, constants.MAX_TIME_TO_WAIT_FOR_POD_DELETION/time.Second, err,
)
if err := client.CoreV1().Pods(pod.Namespace).Delete(context.Background(), pod.Name, metav1.DeleteOptions{
GracePeriodSeconds: &zeroGracePeriod,
}); err != nil {
klog.Errorf("Failed to wait for pod %s deletion: %v", pod.Name, err)
klog.Errorf("Forced deletion of pod %s failed: %v", pod.Name, err)
return
}
klog.V(2).Infof("Pod %s in %s namespace has been deleted", pod.Name, pod.Namespace)
Expand Down
5 changes: 2 additions & 3 deletions test/e2e/support-bundle/goldpinger_collector_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,9 @@ func Test_GoldpingerCollector(t *testing.T) {
cmd.Stdout = &out
cmd.Stderr = &stdErr
err = cmd.Run()
t.Logf("Stdout: %s\n", out.String())
t.Logf("Stderr: %s\n", stdErr.String())
if err != nil {

t.Logf("Stdout: %s\n", out.String())
t.Logf("Stderr: %s\n", stdErr.String())
t.Fatal(err)
}

Expand Down

0 comments on commit 1ba54ed

Please sign in to comment.