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

exec collector is running in all pods matched the selector #1568

Closed
nvanthao opened this issue Jun 21, 2024 · 1 comment · Fixed by #1571
Closed

exec collector is running in all pods matched the selector #1568

nvanthao opened this issue Jun 21, 2024 · 1 comment · Fixed by #1571
Labels
bug::normal type::bug Something isn't working

Comments

@nvanthao
Copy link
Member

Bug Description

Our doc states that

When the selector refers to more than one replica of a pod, the exec collector will execute in only one of the pods

Expected Behavior
Only exec in 1 pod rather than all pods matched the selector

Steps To Reproduce

  • Run exec collector to a Deployment with 2 replicas
  • Notice exec are running in 2 pods

Additional Context

  • Troubleshoot version: 0.93.2

for _, pod := range pods {
stdout, stderr, execErrors := getExecOutputs(ctx, clientConfig, client, pod, execCollector)
path := filepath.Join(execCollector.Name, pod.Namespace, pod.Name)
if len(stdout) > 0 {
output.SaveResult(bundlePath, filepath.Join(path, execCollector.CollectorName+"-stdout.txt"), bytes.NewBuffer(stdout))
}

@nvanthao nvanthao added type::bug Something isn't working bug::normal labels Jun 21, 2024
@xavpaice
Copy link
Member

Is this a bug in the collector, or the docs? I would have expected a deployment with 2 replicas to run 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug::normal type::bug Something isn't working
Projects
None yet
2 participants