Bug 1911855 - DualStack deployment does not handle Hybrid Route Policy For Pods
Summary: DualStack deployment does not handle Hybrid Route Policy For Pods
Keywords:
Status: CLOSED DUPLICATE of bug 1908888
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Ben Bennett
QA Contact: Anurag saxena
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-31 21:30 UTC by Marc Methot
Modified: 2021-01-04 16:14 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-01-04 16:14:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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 ***


Note You need to log in before you can comment on or make changes to this bug.