Skip to content

Commit ce44943

Browse files
yzhao1012copybaranaut
authored andcommitted
Remove localhost: prefix from the remote pod/service names
Summary: This allows self arrow to a pod/service to indicate traffic between different Istio's envoy proxy side car and the main container. Test Plan: Verified on web UI Reviewers: #stirling, philkuz Reviewed By: philkuz Signed-off-by: yzhao1012 <yzhao@pixielabs.ai> Differential Revision: https://phab.corp.pixielabs.ai/D12000 GitOrigin-RevId: 95e448e
1 parent 1d47ba9 commit ce44943

6 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/carnot/planner/pxl_lib/pxviews.pxl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,10 @@ def http_graph(start_time, end_time):
208208
localhost_ip_regexp = r'127\.0\.0\.[0-9]+'
209209
df.is_remote_addr_localhost = px.regex_match(localhost_ip_regexp, df.remote_ip)
210210
df.remote_pod = px.select(df.is_remote_addr_localhost,
211-
'localhost:' + df.traced_pod,
211+
df.traced_pod,
212212
px.pod_id_to_pod_name(px.ip_to_pod_id(df.remote_ip)))
213213
df.remote_service = px.select(df.is_remote_addr_localhost,
214-
'localhost:' + df.traced_service,
214+
df.traced_service,
215215
px.service_id_to_service_name(px.ip_to_service_id(df.remote_ip)))
216216

217217
# Assign requestor and responder based on the trace_role.

src/pxl_scripts/px/cluster/cluster.pxl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,10 @@ def service_let_graph(start_time: str):
373373
localhost_ip_regexp = r'127\.0\.0\.[0-9]+'
374374
df.is_remote_addr_localhost = px.regex_match(localhost_ip_regexp, df.remote_addr)
375375
df.remote_pod = px.select(df.is_remote_addr_localhost,
376-
'localhost:' + df.pod,
376+
df.pod,
377377
px.pod_id_to_pod_name(px.ip_to_pod_id(df.remote_addr)))
378378
df.remote_service = px.select(df.is_remote_addr_localhost,
379-
'localhost:' + df.traced_service,
379+
df.traced_service,
380380
px.service_id_to_service_name(px.ip_to_service_id(df.remote_addr)))
381381

382382
df.remote_ip = df.remote_addr

src/pxl_scripts/px/dns_flow_graph/dns_flow_graph.pxl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def dns_flow_graph(start_time: str, from_entity_filter: str, to_entity_filter: s
5555
localhost_ip_regexp = r'127\.0\.0\.[0-9]+'
5656
df.is_remote_addr_localhost = px.regex_match(localhost_ip_regexp, df.remote_addr)
5757
df.to_entity = px.select(df.is_remote_addr_localhost,
58-
'localhost:' + px.upid_to_pod_name(df.upid),
58+
px.upid_to_pod_name(df.upid),
5959
px.Service(px.nslookup(df.remote_addr)))
6060

6161
df = df.drop(['upid', 'is_remote_addr_localhost'])

src/pxl_scripts/px/namespace/namespace.pxl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ def inbound_service_let_graph(start_time: str, namespace: px.Namespace):
140140
localhost_ip_regexp = r'127\.0\.0\.[0-9]+'
141141
df.is_remote_addr_localhost = px.regex_match(localhost_ip_regexp, df.remote_addr)
142142
df.remote_pod = px.select(df.is_remote_addr_localhost,
143-
'localhost:' + df.pod,
143+
df.pod,
144144
px.pod_id_to_pod_name(px.ip_to_pod_id(df.remote_addr)))
145145
df.remote_service = px.select(df.is_remote_addr_localhost,
146-
'localhost:' + df.traced_service,
146+
df.traced_service,
147147
px.service_id_to_service_name(px.ip_to_service_id(df.remote_addr)))
148148

149149
df.remote_ip = df.remote_addr

src/pxl_scripts/px/net_flow_graph/net_flow_graph.pxl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def net_flow_graph(start_time: str, ns: px.Namespace, from_entity_filter: str,
6262
localhost_ip_regexp = r'127\.0\.0\.[0-9]+'
6363
df.is_remote_addr_localhost = px.regex_match(localhost_ip_regexp, df.remote_addr)
6464
df.to_entity = px.select(df.is_remote_addr_localhost,
65-
'localhost:' + df.pod,
65+
df.pod,
6666
px.nslookup(df.remote_addr))
6767

6868
# Filter out entities as specified by the user.

src/pxl_scripts/px/services/services.pxl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,10 @@ def inbound_let_service_graph(start_time: str, namespace: px.Namespace):
168168
localhost_ip_regexp = r'127\.0\.0\.[0-9]+'
169169
df.is_remote_addr_localhost = px.regex_match(localhost_ip_regexp, df.remote_addr)
170170
df.remote_pod = px.select(df.is_remote_addr_localhost,
171-
'localhost:' + df.pod,
171+
df.pod,
172172
px.pod_id_to_pod_name(px.ip_to_pod_id(df.remote_addr)))
173173
df.remote_service = px.select(df.is_remote_addr_localhost,
174-
'localhost:' + df.traced_service,
174+
df.traced_service,
175175
px.service_id_to_service_name(px.ip_to_service_id(df.remote_addr)))
176176

177177
df.remote_ip = df.remote_addr

0 commit comments

Comments
 (0)