CAIDA / pybgpstream

Python bindings for BGPStream
https://bgpstream.caida.org
BSD 2-Clause "Simplified" License
28 stars 22 forks source link

bgpstream setup which works locally fails in container #30

Closed t0gre closed 4 years ago

t0gre commented 4 years ago

I have this code which works fine locally:

    stream = pybgpstream.BGPStream(data_interface = "singlefile")
    stream.set_data_interface_option("singlefile", "upd-file", file_path)

    for elem in stream:
         print(str(elem))

When I run this exact same code in a container on kubernetes it fails silently. Everything up until iteration on the stream runs (there's some code above that in reality, and I put in some logging), but when it comes to the for-loop on the stream the process just stalls. No error message, just silence.

I can exec into the container and check the file is there, and it is.

Any idea what's might be causing that?

Thanks

alistairking commented 4 years ago

Interesting!

It's especially odd that you're not getting any error messages.

Does the container work if you run it without putting it into k8s?

t0gre commented 4 years ago

Just tried that now. Exactly the same in local docker. Similarly, I can exec into the container and the file is there. I am using the caida/bgpstream:2.0.0-rc3 image as my base for the container, and I have other containers collecting from routeviews with this container, so it's something related to the singlefile...

alistairking commented 4 years ago

We'll try and reproduce the problem and see if we can figure this out

t0gre commented 4 years ago

Thanks very much

digizeph commented 4 years ago

Hi @tomgreenwood1, we have updated the bgpstream docker images with a fix that should resolve your issue. Could you try use caida/bgpstream:2.0.0-rc4 image as base, rebuild your image with --no-cache option, and see if the issue is resolved? Thanks!

t0gre commented 4 years ago

Hi @digizeph I can confirm that has resolved the issue. Thanks.