@@ -17,6 +17,7 @@ import (
1717 e2epodoutput "k8s.io/kubernetes/test/e2e/framework/pod/output"
1818
1919 "github.com/onsi/ginkgo/v2"
20+ "github.com/onsi/gomega/format"
2021
2122 apiv1 "github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1"
2223 "github.com/kubeovn/kube-ovn/pkg/ipam"
@@ -550,6 +551,20 @@ var _ = framework.SerialDescribe("[group:underlay]", func() {
550551 break
551552 }
552553 }
554+
555+ if ! found {
556+ ginkgo .By ("Getting ip addresses and routes of container " + containerName )
557+ links , err := iproute .AddressShow ("eth0" , func (cmd ... string ) ([]byte , []byte , error ) {
558+ return docker .Exec (containerID , nil , cmd ... )
559+ })
560+ framework .ExpectNoError (err )
561+ framework .Logf ("addresses of container:\n %s" , format .Object (links , 2 ))
562+ routes , err := iproute .RouteShow ("eth0" , "" , func (cmd ... string ) ([]byte , []byte , error ) {
563+ return docker .Exec (containerID , nil , cmd ... )
564+ })
565+ framework .ExpectNoError (err )
566+ framework .Logf ("routes of container:\n %s" , format .Object (routes , 2 ))
567+ }
553568 framework .ExpectTrue (found , "Address conflict should be reported in pod events" )
554569 })
555570
0 commit comments