Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1911855

Summary: DualStack deployment does not handle Hybrid Route Policy For Pods
Product: OpenShift Container Platform Reporter: Marc Methot <mmethot>
Component: NetworkingAssignee: Ben Bennett <bbennett>
Networking sub component: ovn-kubernetes QA Contact: Anurag saxena <anusaxen>
Status: CLOSED DUPLICATE Docs Contact:
Severity: unspecified    
Priority: unspecified CC: aconstan
Version: 4.6   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-01-04 16:14:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marc Methot 2020-12-31 21:30:25 UTC
DualStack deployment does not handle Hybrid Route Policy For Pods

Adding "k8s.ovn.org/routing-namespaces" annotation to a pod will result in the pod being stuck in ContainerCreating status.

Checking the events we find:
~~~
Warning ErrorAddingLogicalPort 41s (x3 over 45s) controlplane failed to parse gateway router join interface IP: <nil>, err: invalid CIDR address: 192.128.30.1/29 fd12:0:0:12::1/64
~~~

Added annotations after the original pod is created:
~~~
metadata:
  annotations:
    k8s.ovn.org/routing-namespaces: sriov-test-b
    k8s.ovn.org/routing-network: sriov-test-a/test-internal-sriov
~~~

Looking at the log we see both IPs listed in the error.
go `net.ParseCIDR` function cannot handle multiple IPs.
~~~
[mmethot@localhost ~]$ cat ~/Documents/test.go
package main

import (
	"net"
	"fmt"
)

func main() {
	testTwo, _, err := net.ParseCIDR("192.128.30.1/29 fd12:0:0:12::1/64")
	if err != nil {
		fmt.Println("error:", err)
	}
	test, _, _ := net.ParseCIDR("fd12:0:0:12::1/64")
	fmt.Println(test, testTwo)
}
[mmethot@localhost ~]$ go run ~/Documents/test.go
error: invalid CIDR address: 192.128.30.1/29 fd12:0:0:12::1/64
fd12:0:0:12::1 <nil>
~~~

It is the same for 4.6 and master branch.
- https://github.com/openshift/ovn-kubernetes/blob/release-4.6/go-controller/pkg/ovn/egressgw.go#L348


Cheers,
Marc Methot

Comment 2 Alexander Constantinescu 2021-01-04 16:14:49 UTC

*** This bug has been marked as a duplicate of bug 1908888 ***