Skip to content
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

Update traceflow graph message for service destinations #1607

Merged
merged 1 commit into from
Dec 15, 2020

Conversation

ZhangYW18
Copy link
Contributor

@ZhangYW18 ZhangYW18 commented Dec 3, 2020

Add destination pod name & IP in load balancing stage when destination is a service.

Example graph:
tfgraph

@antrea-bot
Copy link
Collaborator

Thanks for your PR.
Unit tests and code linters are run automatically every time the PR is updated.
E2e, conformance and network policy tests can only be triggered by a member of the vmware-tanzu organization. Regular contributors to the project should join the org.

The following commands are available:

  • /test-e2e: to trigger e2e tests.
  • /skip-e2e: to skip e2e tests.
  • /test-conformance: to trigger conformance tests.
  • /skip-conformance: to skip conformance tests.
  • /test-all-features-conformance: to trigger conformance tests with all alpha features enabled.
  • /skip-all-features-conformance: to skip conformance tests with all alpha features enabled.
  • /test-whole-conformance: to trigger all conformance tests on linux.
  • /skip-whole-conformance: to skip all conformance tests on linux.
  • /test-networkpolicy: to trigger networkpolicy tests.
  • /skip-networkpolicy: to skip networkpolicy tests.
  • /test-windows-conformance: to trigger windows conformance tests.
  • /skip-windows-conformance: to skip windows conformance tests.
  • /test-windows-networkpolicy: to trigger windows networkpolicy tests.
  • /skip-windows-networkpolicy: to skip windows networkpolicy tests.
  • /test-hw-offload: to trigger ovs hardware offload test.
  • /skip-hw-offload: to skip ovs hardware offload test.
  • /test-all: to trigger all tests (except whole conformance).
  • /skip-all: to skip all tests (except whole conformance).

@ZhangYW18 ZhangYW18 marked this pull request as draft December 3, 2020 05:31
@codecov-io
Copy link

codecov-io commented Dec 3, 2020

Codecov Report

Merging #1607 (d3d495a) into master (9d3d10b) will decrease coverage by 1.46%.
The diff coverage is 53.45%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1607      +/-   ##
==========================================
- Coverage   63.31%   61.85%   -1.47%     
==========================================
  Files         170      181      +11     
  Lines       14250    16656    +2406     
==========================================
+ Hits         9023    10302    +1279     
- Misses       4292     5309    +1017     
- Partials      935     1045     +110     
Flag Coverage Δ
e2e-tests 37.10% <25.71%> (?)
kind-e2e-tests 52.94% <51.71%> (-2.44%) ⬇️
unit-tests 40.55% <12.30%> (-0.73%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cmd/antrea-agent/agent.go 0.00% <0.00%> (ø)
cmd/antrea-agent/options.go 26.89% <0.00%> (+6.17%) ⬆️
...gent/controller/noderoute/node_route_controller.go 46.60% <ø> (+0.13%) ⬆️
.../agent/flowexporter/connections/conntrack_linux.go 29.48% <0.00%> (+0.32%) ⬆️
pkg/agent/stats/collector.go 92.04% <ø> (-5.69%) ⬇️
pkg/controller/networkpolicy/tier.go 100.00% <ø> (+10.00%) ⬆️
pkg/features/antrea_features.go 16.66% <ø> (ø)
pkg/ovs/openflow/ofctrl_builder.go 60.94% <0.00%> (-1.23%) ⬇️
pkg/ovs/openflow/ofctrl_group.go 48.57% <0.00%> (-4.56%) ⬇️
pkg/ovs/openflow/ofctrl_action.go 51.26% <5.71%> (-10.10%) ⬇️
... and 82 more

@@ -177,8 +177,14 @@ func getTraceflowMessage(o *opsv1alpha1.Observation) string {
if o.Component == opsv1alpha1.NetworkPolicy && len(o.NetworkPolicy) > 0 {
str += "\nNetpol: " + o.NetworkPolicy
}
if len(o.Pod) > 0 {
str += "\nTo: " + o.Pod
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After taking a look at the example graph, I would suggest to use "To Pod" here.

Copy link
Contributor

@mengdie-song mengdie-song left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the enhancement. From my point, a general suggestion would be adding a little bit details for each field shown on the graph to avoid any confusion.

pkg/graphviz/traceflow.go Outdated Show resolved Hide resolved
pkg/graphviz/traceflow.go Outdated Show resolved Hide resolved
Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the improvement. However the destination is a little confusing to me as the service name, not sure if others have the same feeling.

Copy link
Contributor

@jianjuns jianjuns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we should show the Pod name in the destination box (either just Pod name, or both Service and Pod names)?

@jianjuns
Copy link
Contributor

jianjuns commented Dec 7, 2020

Thanks for the improvement. However the destination is a little confusing to me as the service name, not sure if others have the same feeling.

Just saw @tnqn's reply after adding the same comment.

@ZhangYW18
Copy link
Contributor Author

Do you think we should show the Pod name in the destination box (either just Pod name, or both Service and Pod names)?

Maybe we can replace service name with pod name, and show service name below:

namespaceName/podName
service: serviceName

@ZhangYW18
Copy link
Contributor Author

ZhangYW18 commented Dec 8, 2020

Have updated the IP-related names as well as the example graph.

str += "\nTo: " + o.Pod
}
if o.Action != opsv1alpha1.Dropped && len(o.TranslatedDstIP) > 0 {
str += "\nTranslated Destination IP: " + o.TranslatedDstIP
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure the exact meaning of TranslatedDstIP here, maybe @gran-vmv can give some details for this field, so that we can enhance UI description for this.
Will it always be Pod IP? Or in the case where destination is service, it will be service IP instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK, TranslatedDstIP is only set for service access and it's the destination pod ip.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thanks Quan.

@ZhangYW18
Copy link
Contributor Author

@gran-vmv Would you review this patch or not?

@tnqn
Copy link
Member

tnqn commented Dec 10, 2020

Do you think we should show the Pod name in the destination box (either just Pod name, or both Service and Pod names)?

Maybe we can replace service name with pod name, and show service name below:

namespaceName/podName
service: serviceName

@ZhangYW18 have you applied this change? I didn't see it from the example and the code.

@ZhangYW18
Copy link
Contributor Author

Do you think we should show the Pod name in the destination box (either just Pod name, or both Service and Pod names)?

Maybe we can replace service name with pod name, and show service name below:

namespaceName/podName
service: serviceName

@ZhangYW18 have you applied this change? I didn't see it from the example and the code.

No, I didn't. I'm still waiting for more suggestions.

@tnqn
Copy link
Member

tnqn commented Dec 10, 2020

maybe you can go ahead with the approach of including both service and pod information.

@ZhangYW18
Copy link
Contributor Author

Have updated the destination name in service case.

Copy link
Contributor

@jianjuns jianjuns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new design looks good to me.

Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@tnqn
Copy link
Member

tnqn commented Dec 11, 2020

/test-all

@tnqn
Copy link
Member

tnqn commented Dec 11, 2020

/skip-all since this touches octant plugin code only.

@tnqn
Copy link
Member

tnqn commented Dec 11, 2020

@mengdie-song before merging it, do you have other comments since you reviewed this as well?

Copy link
Contributor

@mengdie-song mengdie-song left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tnqn tnqn merged commit fedf14c into antrea-io:master Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants