Orange-OpenSource / towards5gs-helm

Helm charts for deploying 5G network services on Kubernetes
Other
167 stars 130 forks source link

Manual UE's connectivity test is Failed but helm's test result shows Succeeded #45

Closed hi120ki closed 1 year ago

hi120ki commented 2 years ago

Hi, thank you for the maintenance of this project. This project is so helpful for me.

I tried to deploy free5gc on Kubernetes with reference to Setup free5gc on one single one and test with UERANSIM

Kubernetes is single-node and single-cluster and deployed by kubedam & containerd

And I run UE's connectivity test by helm -n free5gc test ueransim-v1 and it's result is

TEST SUITE:     connectivity-test-configmap
Last Started:   Fri Jul  1 07:00:37 2022
Last Completed: Fri Jul  1 07:00:37 2022
Phase:          Succeeded
TEST SUITE:     ueransim-v1-test-connection
Last Started:   Fri Jul  1 07:00:37 2022
Last Completed: Fri Jul  1 07:00:42 2022
Phase:          Succeeded

but I test UE's connectivity manually, a tunnel interface uesimtun0 is created, but failed to ping check ping -I uesimtun0 www.google.com .

$ kubectl -n free5gc exec -i ueransim-v1-ue-c7c564f8c-9jlgb -- bash -c 'ping -c 10 -I uesimtun0 www.google.com'
PING www.google.com (142.250.206.228) from 10.1.0.5 uesimtun0: 56(84) bytes of data.

--- www.google.com ping statistics ---
10 packets transmitted, 0 received, 100% packet loss, time 9208ms

command terminated with exit code 1

helm's test script is defined here, but it returns wrong result.

I change these script like this, and helm's test returns correct result.

    echo "Test connectivity"
    ping_output="$(kubectl -n {{ $.Release.Namespace }} exec -i ${pod_name} -- bash -c 'ping -c 10 -I uesimtun0 www.google.com')"
    echo "${ping_output}"
    echo "***********************************************************************"
    echo ""
    loss_rate="$(echo "$ping_output" | grep 'loss' | awk -F',' '{ print $3 }' | awk '{ print $1 }')"
    echo "Packet loss-rate is $loss_rate"
    if [ "$loss_rate" = "0%" ] ; then
      echo "Connection test passed - ${loss_rate}"
      exit 0
    else
      echo "Connection test failed - ${loss_rate}"
      exit 1
    fi
TEST SUITE:     connectivity-test-configmap
Last Started:   Fri Jul  1 07:24:14 2022
Last Completed: Fri Jul  1 07:24:14 2022
Phase:          Succeeded
TEST SUITE:     ueransim-v1-test-connection
Last Started:   Fri Jul  1 07:24:14 2022
Last Completed: Fri Jul  1 07:24:37 2022
Phase:          Failed

This issue is not focused on UE's connectivity, but helm's test script.

Could you give me some comments?

Thank you.

raoufkh commented 2 years ago

Hello

@chabimic can you give more details on the test script please?

Bests