Coder Social home page Coder Social logo

Comments (4)

invidian avatar invidian commented on September 4, 2024

Shouldn't pods have unique IDs? Or maybe use pod ID as identifier? (wild guess, I don't know much how things works)

from traceloop.

pothos avatar pothos commented on September 4, 2024

Ah, yes:

kubectl get pod -o custom-columns=ID:.metadata.uid
ID
c5886398-75b1-11e9-a997-02090d9b1a32

It seems the first part is the only thing that changes for a same-named pod.

from traceloop.

alban avatar alban commented on September 4, 2024

Straceback can address a pod by cgroup and it should be unique because it contains the metadata.uid. But that's in the http interface and not in inspektor-gadget.

We have to think about usability though. Could we have both options? Specify the pod name, and maybe fail if there are several traces with the same name, and ask about indeed or uid?

from traceloop.

pothos avatar pothos commented on September 4, 2024

Seems it's solved because the list shows unique trace IDs which can be used to get the correct trace when the pod name is the same. So we can close this issue.

If the trace is selected by pod name there is still a clash because lines 869-884 in straceback.go take the first pod found either by explicit matching or found by containerID.

	containerID, _ := sb.podInformer.GetContainerIDFromPod(namespace, podname, containerIndex)

	for i := 0; i < int(C.MaxTracedPrograms); i++ {
		if containerID != "" && sb.tracelets[i].containerID == containerID {
			out, err = sb.DumpProg(uint32(i))
			return
		}
		if sb.tracelets[i].namespace == namespace &&
			sb.tracelets[i].podname == podname &&
			sb.tracelets[i].containeridx == containerIndex {
			out, err = sb.DumpProg(uint32(i))
			return
		}

from traceloop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.