Skip to content

Commit

Permalink
fix mcast e2e error (#4503)
Browse files Browse the repository at this point in the history
Signed-off-by: clyi <[email protected]>
  • Loading branch information
changluyi committed Sep 12, 2024
1 parent 9795131 commit 2b24b2b
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions test/e2e/kube-ovn/subnet/subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -1180,19 +1180,28 @@ var _ = framework.Describe("[group:subnet]", func() {
modifiedSubnet.Spec.EnableMulticastSnoop = true
subnetClient.PatchSync(subnet, modifiedSubnet)

subnet = subnetClient.Get(subnetName)
framework.ExpectNotEmpty(subnet.Status.McastQuerierIP)
framework.ExpectNotEmpty(subnet.Status.McastQuerierMAC)
framework.WaitUntil(time.Second, 5*time.Second, func(_ context.Context) (bool, error) {
subnet = subnetClient.Get(subnetName)

if subnet.Status.McastQuerierIP != "" && subnet.Status.McastQuerierMAC != "" {
return true, nil
}
return false, nil
}, fmt.Sprintf("subnet %s failed to acquire mcast ip and mac", subnet.Name))

ginkgo.By("Checking subnet multicast snoop disable " + subnetName)
subnet = subnetClient.Get(subnetName)
modifiedSubnet = subnet.DeepCopy()
modifiedSubnet.Spec.EnableMulticastSnoop = false
subnetClient.PatchSync(subnet, modifiedSubnet)

subnet = subnetClient.Get(subnetName)
framework.ExpectEmpty(subnet.Status.McastQuerierIP)
framework.ExpectEmpty(subnet.Status.McastQuerierMAC)
framework.WaitUntil(time.Second, 5*time.Second, func(_ context.Context) (bool, error) {
subnet = subnetClient.Get(subnetName)
if subnet.Status.McastQuerierIP == "" && subnet.Status.McastQuerierMAC == "" {
return true, nil
}
return false, nil
}, fmt.Sprintf("subnet %s failed to release mcast ip and mac", subnet.Name))
})

framework.ConformanceIt("should support subnet add nat outgoing policy rules", func() {
Expand Down

0 comments on commit 2b24b2b

Please sign in to comment.