Skip to content

Commit

Permalink
monitor: Fix ipcache lookup debug msg
Browse files Browse the repository at this point in the history
The ipcache lookup debug messages state:

    Failed to map daddr

and

    Successfully mapped daddr

but the ipcache lookups aren't necessarily specific to the *destination*
IP address.

Signed-off-by: Paul Chaignon <paul@cilium.io>
  • Loading branch information
pchaigno authored and aanm committed May 29, 2020
1 parent 83f491e commit 33cb7a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Documentation/contributing/development/dev_setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ print the normal form of monitor output along with debug messages:
-> lxc_health: 16:f9:cd:dc:87:e5 -> 8e:3c:a3:67:cc:1e ARP
CPU 00: MARK 0xbbe3d555 FROM 0 DEBUG: Inheriting identity=1 from stack
<- host flow 0xbbe3d555 identity 1->0 state new ifindex 0 orig-ip 0.0.0.0: 10.11.251.76:57896 -> 10.11.166.21:4240 tcp ACK
CPU 00: MARK 0xbbe3d555 FROM 0 DEBUG: Successfully mapped daddr=10.11.251.76 to identity=1
CPU 00: MARK 0xbbe3d555 FROM 0 DEBUG: Successfully mapped addr=10.11.251.76 to identity=1
CPU 00: MARK 0xbbe3d555 FROM 0 DEBUG: Attempting local delivery for container id 745 from seclabel 1
CPU 00: MARK 0xbbe3d555 FROM 745 DEBUG: Conntrack lookup 1/2: src=10.11.251.76:57896 dst=10.11.166.21:4240
CPU 00: MARK 0xbbe3d555 FROM 745 DEBUG: Conntrack lookup 2/2: nexthdr=6 flags=0
Expand Down
8 changes: 4 additions & 4 deletions pkg/monitor/datapath_debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,13 +350,13 @@ func (n *DebugMsg) subTypeString() string {
case DbgL4Create:
return fmt.Sprintf("Matched L4 policy; creating conntrack %s", l4CreateInfo(n))
case DbgIPIDMapFailed4:
return fmt.Sprintf("Failed to map daddr=%s to identity", ip4Str(n.Arg1))
return fmt.Sprintf("Failed to map addr=%s to identity", ip4Str(n.Arg1))
case DbgIPIDMapFailed6:
return fmt.Sprintf("Failed to map daddr.p4=[::%s] to identity", ip6Str(n.Arg1))
return fmt.Sprintf("Failed to map addr.p4=[::%s] to identity", ip6Str(n.Arg1))
case DbgIPIDMapSucceed4:
return fmt.Sprintf("Successfully mapped daddr=%s to identity=%d", ip4Str(n.Arg1), n.Arg2)
return fmt.Sprintf("Successfully mapped addr=%s to identity=%d", ip4Str(n.Arg1), n.Arg2)
case DbgIPIDMapSucceed6:
return fmt.Sprintf("Successfully mapped daddr.p4=[::%s] to identity=%d", ip6Str(n.Arg1), n.Arg2)
return fmt.Sprintf("Successfully mapped addr.p4=[::%s] to identity=%d", ip6Str(n.Arg1), n.Arg2)
case DbgLbStaleCT:
return fmt.Sprintf("Stale CT entry found stale_ct.rev_nat_id=%d, svc.rev_nat_id=%d", n.Arg2, n.Arg1)
case DbgInheritIdentity:
Expand Down

0 comments on commit 33cb7a5

Please sign in to comment.