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

Add EgressNode field in Traceflow observation #5949

Conversation

Atish-iaf
Copy link
Contributor

Fixes #5911

@Atish-iaf Atish-iaf force-pushed the add-EgressNode-field-in-Traceflow-observation branch from 375cd62 to a910db0 Compare January 31, 2024 09:52
@Atish-iaf Atish-iaf added the area/ops/traceflow Issues or PRs related to the Traceflow feature label Jan 31, 2024
@Atish-iaf Atish-iaf marked this pull request as ready for review January 31, 2024 12:02
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.

cc @antoninbas @heanlan @yuntanghsu for change to FlowExporter.

Comment on lines 196 to 197
egressNode:
type: string
Copy link
Contributor

@luolanzone luolanzone Feb 1, 2024

Choose a reason for hiding this comment

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

I don't think we need to add this field for v1alpha1 version. We have promoted the version to v1beta1 half a year ago. @tnqn @antoninbas any thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

I didn't comment because it's harmless anyway. It's just about whether v1alpha1 client will see the added field, no compatibility impact.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed for v1alpha1.

@Atish-iaf Atish-iaf force-pushed the add-EgressNode-field-in-Traceflow-observation branch from a910db0 to aa2bfa9 Compare February 1, 2024 04:29
Copy link
Contributor

@antoninbas antoninbas left a comment

Choose a reason for hiding this comment

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

Changes to the FlowExporter should probably be reverted (the extra return value can be ignored when calling GetEgress in fillEgressInfo). If we want to add the Egress Node to the exported IPFIX record, it should be done in a separate PR (note that the current version of this PR doesn't actually update the IPFIX record).

@@ -86,6 +86,7 @@ type Connection struct {
EgressIP string
AppProtocolName string
HttpVals string
EgressNode string
Copy link
Contributor

Choose a reason for hiding this comment

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

If you are not going to add this information to the exported IPFIX record, then I don't think the FlowExporter changes in this PR make sense.
And if you do want to add the information to the record, it should probably be done in a separate PR (a change to go-ipfix is also required), given that this one is specific to Traceflow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

reverted, thanks.

@@ -641,14 +641,15 @@ func (exp *FlowExporter) findFlowType(conn flowexporter.Connection) uint8 {
}

func (exp *FlowExporter) fillEgressInfo(conn *flowexporter.Connection) {
egressName, egressIP, err := exp.egressQuerier.GetEgress(conn.SourcePodNamespace, conn.SourcePodName)
egressName, egressIP, egressNode, err := exp.egressQuerier.GetEgress(conn.SourcePodNamespace, conn.SourcePodName)
Copy link
Contributor

Choose a reason for hiding this comment

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

To add a new field, please open a PR in go-ipfix repository to update the registry first.

reference PRs for adding egressName and egressIP fields: vmware/go-ipfix#308 #5088

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks.

Fixes antrea-io#5911

Signed-off-by: Kumar Atish <atish.iaf@gmail.com>
@Atish-iaf Atish-iaf force-pushed the add-EgressNode-field-in-Traceflow-observation branch from aa2bfa9 to 307b586 Compare February 2, 2024 01:41
@rajnkamr rajnkamr added this to the Antrea v1.16 release milestone Feb 2, 2024
@tnqn
Copy link
Member

tnqn commented Feb 9, 2024

/skip-all

1 similar comment
@tnqn
Copy link
Member

tnqn commented Feb 9, 2024

/skip-all

@tnqn tnqn added the action/release-note Indicates a PR that should be included in release notes. label Feb 9, 2024
@antoninbas antoninbas merged commit 84e23bc into antrea-io:main Feb 9, 2024
52 of 55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/release-note Indicates a PR that should be included in release notes. area/ops/traceflow Issues or PRs related to the Traceflow feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

To Support EgressNode(as EgressNodeName) field in Traceflow Observation
6 participants