-
Notifications
You must be signed in to change notification settings - Fork 912
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
Falco is not showing container information. All container events are coming with name "incomplete" #716
Comments
Remember that with 0.15.0, docker metadata fetches are now done asynchronously, so the initial process in a container might race and not have container info at the time it runs. You can see this by running falco 0.15.3 and doing repeated calls to
It sounded like your containers are long-lived and you're exec-ing into them to run nc, though, so let's try that. If I first start a container using
(the first incomplete is from the initial docker run command) I'll try ECS next to see if it changes anything. |
I created a single-node ECS cluster of the type Linux + EC2 e.g. not fargate, and then created a task that used appropriate/nc to run long-lived. Here's the entrypoint from docker inspect:
I then ran falco directly on the ec2 host, using a container, with this command line:
Finally, I exec'd into the appropriate/nc container via docker exec -it de3ab0a71e55 /bin/sh and ran nc. I see appropriate falco alerts:
So it looks like it's working to me. Can you describe exactly how you're running falco? Are you running it on the host or as a task. If it's as a task can you paste the task definition as json? You'll want to make sure you have all the appropriate mounts set up. |
/triage needs-information |
Hey @mstemm thanks for taking a look into this. We have been able to reproduce the issue with a limited number of variables.
This produces the following log line in
We have observed that if the container was started before running falco agent, the image metadata will be correctly set, but it container is started after falco agent it is always incomplete. Thanks!! |
Some more information I have found: If I reboot the machine and falco starts automatically at boot, the container name is given correctly...
However if I then restart falco service, I get incomplete for all events every time...
Here's also the output of
|
@gnosek Is looking at this. It appears to be a bug in the container metadata fetch in the sysdig libraries. |
Ok, I've traced this down to how we daemonize the falco process. This bug doesn't happen if the Basically what's happening is that when we daemonize, and eventually kill the parent falco process, we kill the thread We create the I'm trying to track down the best solution. |
Thanks @mfdii, if we ran falco within a docker container would I be right in assuming it wouldn't be ran with the daemon flag? |
That’s correct. As a container the process is not daemonized.
… On Jul 17, 2019, at 8:40 AM, Billy Shambrook ***@***.***> wrote:
Thanks @mfdii, if we ran falco within a docker container would I be right in assuming it wouldn't be ran with the daemon flag?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
So, I don't think we need to fork there. Just doing the parent pid association with I will try to come up with that fix /assign @fntlnz |
OK tried the road above, it's not practical, probably the best option now is to make so that we reassign the parent threads or make it smart and start those threads when it's doing the daemon thing. |
I've been able to reproduce the issue here, then found that we start the capturing before the fork is done, just moving the open logic after the fork fixed the problem. I sent a PR with a fix @mfdii @srivastavaabhinav can you please try it? |
@srivastavaabhinav in this comment you can find the compiled rpm and deb packages to test: #731 (comment) |
@fntlnz thanks! Let me look into it. |
What happened:
Falco is not showing container related information. All container events are coming with name "incomplete".
What you expected to happen:
Container events should come with the container information. I know that few events would come without container names due to the new design, however, even when container is running for more than an hour, still information is not present.
How to reproduce it (as minimally and precisely as possible):
In an already running container, we created a shell and then ran the command "nc". It reported the alert with the container name "incomplete". We are seeing other events as well coming out with container information.
Anything else we need to know?:
Environment:
falco --version
): 0.15.3cat /etc/os-release
):Amazon Linux 2uname -a
):4.14.123-111.109.amzn2.x86_64The text was updated successfully, but these errors were encountered: