Skip to content

Commit

Permalink
debug etcdloganalyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
vrutkovs committed Jan 27, 2025
1 parent e7f3f40 commit c0e422d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/monitortestlibrary/podaccess/pod_logs_stream_all.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ func (c *PodsStreamer) Stop(ctx context.Context) {
func (c *PodsStreamer) syncPods(ctx context.Context) error {
pods, err := c.podLister.Pods(c.namespaceName).List(c.selector)
if err != nil {
c.logger.WithField("error", err).WithField("namespace", c.namespaceName).Info("error listing pods")
return err
}

Expand All @@ -106,6 +107,7 @@ func (c *PodsStreamer) syncPods(ctx context.Context) error {
pod := pods[i]
// skip pods that are not on nodes
if len(pod.Spec.NodeName) == 0 {
c.logger.WithField("pod", pod.Name).WithField("namespace", c.namespaceName).Info("pod not on node")
continue
}

Expand Down
2 changes: 2 additions & 0 deletions pkg/monitortests/etcd/etcdloganalyzer/monitortest.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/openshift/origin/pkg/monitortestframework"
"github.com/openshift/origin/pkg/monitortestlibrary/podaccess"
"github.com/openshift/origin/pkg/test/ginkgo/junitapi"
"github.com/sirupsen/logrus"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
)
Expand Down Expand Up @@ -61,6 +62,7 @@ func (w *etcdLogAnalyzer) StartCollection(ctx context.Context, adminRESTConfig *
logToIntervalConverter,
namespaceScopedCoreInformers.Pods(),
)
logrus.Infof("Starting informers")

go kubeInformers.Start(ctx.Done())
go podStreamer.Run(ctx, w.finishedCollecting)
Expand Down

0 comments on commit c0e422d

Please sign in to comment.