-
Notifications
You must be signed in to change notification settings - Fork 146
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
ROX-20713: Add log with connection details (External Entities in NWG) #8580
Conversation
Images are ready for the commit at b66d6cf. To use with deploy scripts, first |
/test gke-qa-e2e-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand it, the new log statements can display something else than 255.255.255.255
or ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
only when collector is configured with ROX_ENABLE_EXTERNAL_IPS
. Is this correct ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Regarding the log output:
I don't know about v6 compatibility at this point, but we should maybe think about it as we investigate the NetworkGraph further.
Looking at this KCS, it seems OpenShift can run a v4/v6 DualStack, but runs v4 only by default.
@Maddosaurus IPv6 is a good point, but I have not tested it on a cluster that would use it. I guess that for such cases, we would use the same structure:
The |
d52711c
to
d82ff02
Compare
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me.
I am just a bit concerned with the processing involved in formatting the strings. Lazy evaluation mechanism in Go seems to be planned for Go2 (golang/go#37739).
IP conversion to string and concatenation will seemingly always occur whatever the log level (https://github.com/stackrox/zap/blob/master/sugar.go#L218)
Description
Currently, if customers see an edge connecting a container with External Entities on the network graph, then they have no information about this connection.
With this PR, we are adding a log line to Sensor with information about all external connections that are unknown. It means that we show source and destination of the connection (namespace + container name on one side, and IP address and port on the other side) for all cases when "External Entities" would appear on the graph.
Note that we will not show this log line, if the source/destination is external but belongs to the known CIDR ranges. In that case, we will show the name associated with the CIDR range on the graph and no log entry will be produced.
Checklist
N/A
Testing Performed
Here I tell how I validated my change
Reminder for reviewers
In addition to reviewing code here, reviewers must also review testing and request further testing in case the
performed one does not seem sufficient. As a reviewer, you must not approve the change until you understand the
performed testing and you are satisfied with it.