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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

connectivity: add unknown ICMPv4 code as expected drop reason #2242

Merged

Conversation

giorio94
Copy link
Member

@giorio94 giorio94 commented Jan 18, 2024

ICMP destination unreachable packets are dropped with "Unknown ICMPv4 code" reason when Cilium is configured with both KPR and BPF masquerade enabled, except that in the fragmentation needed case. Hence, let's add them to the default list of expected drop reasons, as they can be legitimately generated for instance when connecting to a NodePort if the corresponding backend is not yet ready, as in the clustermesh case:

172.18.0.7:35748 (ID:9) <> kube-system/clustermesh-apiserver:32379 (host) from-network FORWARDED (TCP Flags: SYN)
172.18.0.2 (host) <> 172.18.0.7 (ID:9) Unknown ICMPv4 code DROPPED (ICMPv4 DestinationUnreachable(Port))

Otherwise the no-unexpected-packet-drops test fails with:

馃煡 Found unexpected packet drops:

{
  "labels": {
    "direction": "EGRESS",
    "reason": "Unknown ICMPv4 code"
  },
  "name": "cilium_drop_count_total",
  "value": 10
}

ICMP destination unreachable packets are dropped with "Unknown ICMPv4
code" reason when Cilium is configured with both KPR and BPF masquerade
enabled, except that in the fragmentation needed case. Hence, let's add them
to the default list of expected drop reasons, as they can be legitimately
generated for instance when connecting to a NodePort if the corresponding
backend is not yet ready, as in the clustermesh case:

172.18.0.7:35748 (ID:9) <> kube-system/clustermesh-apiserver:32379 (host) from-network FORWARDED (TCP Flags: SYN)
172.18.0.2 (host) <> 172.18.0.7 (ID:9) Unknown ICMPv4 code DROPPED (ICMPv4 DestinationUnreachable(Port))

Otherwise the no-unexpected-packet-drops test fails with:

馃煡 Found unexpected packet drops:
{
  "labels": {
    "direction": "EGRESS",
    "reason": "Unknown ICMPv4 code"
  },
  "name": "cilium_drop_count_total",
  "value": 10
}

Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
@asauber
Copy link
Member

asauber commented Jan 23, 2024

@giorio94 In your example, why is the direction egress?

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jan 23, 2024
@giorio94
Copy link
Member Author

@giorio94 In your example, why is the direction egress?

AFAIU, egress refers to the direction of the ICMP DestinationUnreachable packet which fails to be masqueraded when trying to egress the node that originated it.

@michi-covalent michi-covalent added this pull request to the merge queue Jan 23, 2024
@michi-covalent michi-covalent removed this pull request from the merge queue due to the queue being cleared Jan 23, 2024
@michi-covalent michi-covalent merged commit c1e6ef6 into cilium:main Jan 23, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants