<div dir="ltr">Hi Sylvain,<div><br></div><div>It works almost perfect, thanks. I can see the pods for the namespace, but I can't see any flows...</div><div><br></div><div>Regards,</div><div>Mak</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 23, 2017 at 3:05 PM, Sylvain Afchain <span dir="ltr"><<a href="mailto:safchain@redhat.com" target="_blank">safchain@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Marcos,<br>
<br>
>From what I understand, in OCP there is one network namespace per Pod, each Pod belongs to a project. The name of the project is contained in the "Name" of the Skydive nodes. Let's say we have a project called "test123", we will have<br>
nodes(network namespaces) with names like "k8s_..._test123_...". So if you do the following request, you should be able to get all the network namespaces (meaning pods) for a project.<br>
<br>
G.V().Has('Name', Regex('_test123_'))<br>
<br>
Then if you want to get flows for these pods, just add<br>
<br>
G.V().Has('Name', Regex('_test123_')).Out().<wbr>Flows()<br>
<br>
The regex stuff is not ideal, we are working to add the project name to the node metadata (<a href="https://softwarefactory-project.io/r/6673" rel="noreferrer" target="_blank">https://softwarefactory-<wbr>project.io/r/6673</a>).<br>
<br>
Tell me if it helps a bit :)<br>
<div class="HOEnZb"><div class="h5"><br>
Thanks,<br>
<br>
Sylvain<br>
<br>
----- Mail original -----<br>
> Hi Marcos,<br>
><br>
> Great that you fixed the issue, feel free to open an issue if you think it's<br>
> needed.<br>
><br>
> For the topology I will inject it tomorrow and I will send you a bunch of<br>
> questions accordingly :)<br>
><br>
> Regards,<br>
><br>
> Sylvain<br>
><br>
> ----- Mail original -----<br>
> > Hi Sylvain,<br>
> ><br>
> > The problem has been solved ussing the kubernetes yaml file [1] (adding the<br>
> > ovs plugin) for the DaemonSet definition instead the openshift one [2].<br>
> ><br>
> > [1]<br>
> > <a href="https://github.com/skydive-project/skydive/blob/master/contrib/kubernetes/skydive.yaml" rel="noreferrer" target="_blank">https://github.com/skydive-<wbr>project/skydive/blob/master/<wbr>contrib/kubernetes/skydive.<wbr>yaml</a><br>
> > [2]<br>
> > <a href="https://github.com/skydive-project/skydive/blob/master/contrib/openshift/skydive-template.yaml" rel="noreferrer" target="_blank">https://github.com/skydive-<wbr>project/skydive/blob/master/<wbr>contrib/openshift/skydive-<wbr>template.yaml</a><br>
> ><br>
> > I've also enclosed the topology file.<br>
> ><br>
> > Thanks,<br>
> > Mak<br>
> ><br>
> > On Wed, Feb 22, 2017 at 12:14 PM, Marcos Entenza Garcia <<a href="mailto:mak@redhat.com">mak@redhat.com</a>><br>
> > wrote:<br>
> ><br>
> > > Hi Sylvain,<br>
> > ><br>
> > > Yes, it's blocking now as we don't see the topology. As you said, this<br>
> > > error appears every time we try to view the topology through the web ui,<br>
> > > and also the API is retunring just null values.<br>
> > ><br>
> > > {"Nodes":[],"Edges":[]}<br>
> > ><br>
> > > Thanks,<br>
> > ><br>
> > > Mak<br>
> > ><br>
> > ><br>
> > > On Wed, Feb 22, 2017 at 11:26 AM, Sylvain Afchain <<a href="mailto:safchain@redhat.com">safchain@redhat.com</a>><br>
> > > wrote:<br>
> > ><br>
> > >> About the error, is it blocking ? because this kind of message appears<br>
> > >> when there is a websocket disconnection which can be between<br>
> > >> analyzer/agent<br>
> > >> or just between analyzer/webui following a browser refresh.<br>
> > >><br>
> > >> For the VNID, to be sure to understand your deployment can you send us<br>
> > >> the topology "dump" so that we could re-inject it to an analyzer on our<br>
> > >> side.<br>
> > >><br>
> > >> A "curl" to http://<analyzer>/api/topology will give you the "dump".<br>
> > >><br>
> > >> Thanks,<br>
> > >><br>
> > >> Sylvain<br>
> > >><br>
> > >> ----- Mail original -----<br>
> > >> > Hi guys,<br>
> > >> ><br>
> > >> > Thanks for your responses.<br>
> > >> ><br>
> > >> > @Sylvain, I understand your approach but normally Nodes are shared<br>
> > >> between<br>
> > >> > different projects in OCP, so the only way to identify the specific<br>
> > >> traffic<br>
> > >> > for a Namespace is filtering but the VNID, but correct me if I'm<br>
> > >> > wrong.<br>
> > >> ><br>
> > >> > We are now getting the same error on different deployments for the<br>
> > >> > skydive-analyzer image:<br>
> > >> ><br>
> > >> > wsserver.go:194 http (*WSClient).readPump > ERRO 015 Error while<br>
> > >> > reading<br>
> > >> > websocket from : websocket: close 1001<br>
> > >> ><br>
> > >> > Have you guys git an idea what can cause this?<br>
> > >> ><br>
> > >> > Thanks,<br>
> > >> > Mak<br>
> > >> ><br>
> > >> ><br>
> > >> ><br>
> > >> ><br>
> > >> > On Wed, Feb 22, 2017 at 8:47 AM, Sylvain Afchain <<a href="mailto:safchain@redhat.com">safchain@redhat.com</a>><br>
> > >> > wrote:<br>
> > >> ><br>
> > >> > > Hi Marcos,<br>
> > >> > ><br>
> > >> > > Beyond the VNI support that Nicolas explained, there is a way to get<br>
> > >> flows<br>
> > >> > > for a given namespace. I guess you started a capture at the ovs<br>
> > >> bridge, if<br>
> > >> > > so you can do the following gremlin request:<br>
> > >> > ><br>
> > >> > > G.V().Has('Name', 'ns1').Out().Flows()<br>
> > >> > ><br>
> > >> > > which has to be read like this: get all the nodes with the name<br>
> > >> > > 'ns1'<br>
> > >> > > (your namespace), then returns the nodes belonging to this<br>
> > >> > > namespace,<br>
> > >> > > finally returns the flows for those interfaces.<br>
> > >> > ><br>
> > >> > > Regards,<br>
> > >> > ><br>
> > >> > > Sylvain<br>
> > >> > ><br>
> > >> > > ----- Mail original -----<br>
> > >> > > > Hi Marcos,<br>
> > >> > > ><br>
> > >> > > ><br>
> > >> > > > For the moment it's not possible to filter out the Flows with a<br>
> > >> specific<br>
> > >> > > VNI,<br>
> > >> > > > but a patch [1] is underway to support that by adding a network.ID<br>
> > >> on<br>
> > >> > > each<br>
> > >> > > > UUID where ID is GRE.key or Geneve.ID or VXLAN.VNI and Link.ID for<br>
> > >> > > <a href="http://VLAN.ID" rel="noreferrer" target="_blank">VLAN.ID</a><br>
> > >> > > ><br>
> > >> > > > So it would be possible to filter out all flows with a kind of<br>
> > >> query like<br>
> > >> > > > that :<br>
> > >> > > > G.V().Flows().Has(parentUUID, Within(<br>
> > >> > > > G.V().Flows().Has(application,<br>
> > >> > > 'VXLAN',<br>
> > >> > > > network.ID,<target_VNI>).<wbr>Dedup() ))<br>
> > >> > > ><br>
> > >> > > > But keep it mind it's better practice to start only capture<br>
> > >> interfaces<br>
> > >> > > of a<br>
> > >> > > > specific namespace, for example :<br>
> > >> > > > G.V().Has('Type', 'netns', 'Name', 'vm1').Out().Has('State', 'UP')<br>
> > >> > > ><br>
> > >> > > ><br>
> > >> > > > Regards,<br>
> > >> > > ><br>
> > >> > > > Nicolas<br>
> > >> > > ><br>
> > >> > > > [1] <a href="https://softwarefactory-project.io/r/#/c/6206/" rel="noreferrer" target="_blank">https://softwarefactory-<wbr>project.io/r/#/c/6206/</a><br>
> > >> > > ><br>
> > >> > > ><br>
> > >> > > > On Wed, Feb 22, 2017 at 3:22 AM, Marcos Entenza Garcia <<br>
> > >> <a href="mailto:mak@redhat.com">mak@redhat.com</a><br>
> > >> > > ><br>
> > >> > > > wrote:<br>
> > >> > > ><br>
> > >> > > ><br>
> > >> > > ><br>
> > >> > > > All,<br>
> > >> > > ><br>
> > >> > > > I've got a Skydive deployment in an OCP ovs-multitenat Cluster and<br>
> > >> I was<br>
> > >> > > > wondering if there is any method I could use to filter the traffic<br>
> > >> for<br>
> > >> > > just<br>
> > >> > > > one of the namespaces as all of them has different VNID. The flow<br>
> > >> schema<br>
> > >> > > > doesn't seem to support that and can't find that filter to be<br>
> > >> > > > added<br>
> > >> to a<br>
> > >> > > > Gremlin query.<br>
> > >> > > ><br>
> > >> > > > Any ideas?<br>
> > >> > > ><br>
> > >> > > > Thanks,<br>
> > >> > > > Mak<br>
> > >> > > ><br>
> > >> > > > ______________________________<wbr>_________________<br>
> > >> > > > Skydive-dev mailing list<br>
> > >> > > > <a href="mailto:Skydive-dev@redhat.com">Skydive-dev@redhat.com</a><br>
> > >> > > > <a href="https://www.redhat.com/mailman/listinfo/skydive-dev" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/skydive-dev</a><br>
> > >> > > ><br>
> > >> > > ><br>
> > >> > > ><br>
> > >> > > > ______________________________<wbr>_________________<br>
> > >> > > > Skydive-dev mailing list<br>
> > >> > > > <a href="mailto:Skydive-dev@redhat.com">Skydive-dev@redhat.com</a><br>
> > >> > > > <a href="https://www.redhat.com/mailman/listinfo/skydive-dev" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/skydive-dev</a><br>
> > >> > > ><br>
> > >> > ><br>
> > >> ><br>
> > >><br>
> > ><br>
> > ><br>
> ><br>
><br>
> ______________________________<wbr>_________________<br>
> Skydive-dev mailing list<br>
> <a href="mailto:Skydive-dev@redhat.com">Skydive-dev@redhat.com</a><br>
> <a href="https://www.redhat.com/mailman/listinfo/skydive-dev" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/skydive-dev</a><br>
><br>
</div></div></blockquote></div><br></div>