Skip to content

cilium-cli/connectivity: Fix output for LRP tests #37893

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

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

pchaigno
Copy link
Member

@pchaigno pchaigno commented Feb 27, 2025

When LRP tests are printed, we get this sort of unreadible blob:

❌ local-redirect-policy-with-node-dns/local-redirect-policy-with-node-
dns/lrp-node-dns-http-to-{{&Service{ObjectMeta:{echo-external-node  ci
lium-test-5  e4ee46a5-4243-4216-b4b4-90d7c633ec1f 3603 0 2025-02-25 15
:38:30 +0000 UTC <nil> <nil> map[kind:echo-external-node] map[] [] []
[{cilium Update v1 2025-02-25 15:38:30 +0000 UTC FieldsV1 {"f:metadata
":{"f:labels":{".":{},"f:kind":{}}},"f:spec":{"f:clusterIP":{},"f:inte
rnalTrafficPolicy":{},"f:ipFamilyPolicy":{},"f:ports":{".":{},"k:{\"po
rt\":8084,\"protocol\":\"TCP\"}":{".":{},"f:name":{},"f:port":{},"f:pr
otocol":{},"f:targetPort":{}}},"f:selector":{},"f:sessionAffinity":{},
"f:type":{}}} }]},Spec:ServiceSpec{Ports:[]ServicePort{ServicePort{Nam
e:http,Protocol:TCP,Port:8084,TargetPort:{0 8084 },NodePort:0,AppProto
col:nil,},},Selector:map[string]string{kind: echo-external-node,name:
echo-external-node,},ClusterIP:None,Type:ClusterIP,ExternalIPs:[],Sess
ionAffinity:None,LoadBalancerIP:,LoadBalancerSourceRanges:[],ExternalN
ame:,ExternalTrafficPolicy:,HealthCheckNodePort:0,PublishNotReadyAddre
sses:false,SessionAffinityConfig:nil,IPFamilyPolicy:*PreferDualStack,C
lusterIPs:[None],IPFamilies:[IPv4 IPv6],AllocateLoadBalancerNodePorts:
nil,LoadBalancerClass:nil,InternalTrafficPolicy:*Cluster,TrafficDistri
bution:nil,},Status:ServiceStatus{LoadBalancer:LoadBalancerStatus{Ingr
ess:[]LoadBalancerIngress{},},Conditions:[]Condition{},},} }}-2: ciliu
m-test-5/client3-87db7485b-xngvs (10.244.3.155) -> cilium-test-5/echo-
external-node (echo-external-node.cilium-test-5:8084)

This is because we try to print the externalEcho object instead of just its name. This commit fixes it.

Fixes: #34178.

When LRP tests are printed, we get this sort of unreadible blob:

    ❌ local-redirect-policy-with-node-dns/local-redirect-policy-with-node-
    dns/lrp-node-dns-http-to-{{&Service{ObjectMeta:{echo-external-node  ci
    lium-test-5  e4ee46a5-4243-4216-b4b4-90d7c633ec1f 3603 0 2025-02-25 15
    :38:30 +0000 UTC <nil> <nil> map[kind:echo-external-node] map[] [] []
    [{cilium Update v1 2025-02-25 15:38:30 +0000 UTC FieldsV1 {"f:metadata
    ":{"f:labels":{".":{},"f:kind":{}}},"f:spec":{"f:clusterIP":{},"f:inte
    rnalTrafficPolicy":{},"f:ipFamilyPolicy":{},"f:ports":{".":{},"k:{\"po
    rt\":8084,\"protocol\":\"TCP\"}":{".":{},"f:name":{},"f:port":{},"f:pr
    otocol":{},"f:targetPort":{}}},"f:selector":{},"f:sessionAffinity":{},
    "f:type":{}}} }]},Spec:ServiceSpec{Ports:[]ServicePort{ServicePort{Nam
    e:http,Protocol:TCP,Port:8084,TargetPort:{0 8084 },NodePort:0,AppProto
    col:nil,},},Selector:map[string]string{kind: echo-external-node,name:
    echo-external-node,},ClusterIP:None,Type:ClusterIP,ExternalIPs:[],Sess
    ionAffinity:None,LoadBalancerIP:,LoadBalancerSourceRanges:[],ExternalN
    ame:,ExternalTrafficPolicy:,HealthCheckNodePort:0,PublishNotReadyAddre
    sses:false,SessionAffinityConfig:nil,IPFamilyPolicy:*PreferDualStack,C
    lusterIPs:[None],IPFamilies:[IPv4 IPv6],AllocateLoadBalancerNodePorts:
    nil,LoadBalancerClass:nil,InternalTrafficPolicy:*Cluster,TrafficDistri
    bution:nil,},Status:ServiceStatus{LoadBalancer:LoadBalancerStatus{Ingr
    ess:[]LoadBalancerIngress{},},Conditions:[]Condition{},},} }}-2: ciliu
    m-test-5/client3-87db7485b-xngvs (10.244.3.155) -> cilium-test-5/echo-
    external-node (echo-external-node.cilium-test-5:8084)

This is because we try to print the externalEcho object instead of just
its name. This commit fixes it.

Fixes: 839c91d ("connectivity: add LRP with node-local-dns test scenario")
Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
@pchaigno pchaigno added release-note/ci This PR makes changes to the CI. area/lrp Impacts Local Redirect Policy. cilium-cli This PR contains changes related with cilium-cli labels Feb 27, 2025
@github-actions github-actions bot added the cilium-cli-exclusive This PR only impacts cilium-cli binary label Feb 27, 2025
@pchaigno pchaigno marked this pull request as ready for review February 28, 2025 07:34
@pchaigno pchaigno requested a review from a team as a code owner February 28, 2025 07:34
@pchaigno pchaigno requested a review from aspsk February 28, 2025 07:34
@pchaigno pchaigno enabled auto-merge February 28, 2025 07:34
@pchaigno pchaigno added this pull request to the merge queue Feb 28, 2025
@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 Feb 28, 2025
Merged via the queue into cilium:main with commit c46ac07 Feb 28, 2025
69 checks passed
@pchaigno pchaigno deleted the fix-lrp-output-connectivity-tests branch February 28, 2025 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/lrp Impacts Local Redirect Policy. cilium-cli This PR contains changes related with cilium-cli cilium-cli-exclusive This PR only impacts cilium-cli binary ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/ci This PR makes changes to the CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants