Skip to content

Commit 167945e

Browse files
committed
Fixes getting networkID for network controllers
Function was updated for node network controllers but was not for zone network controllers. It needs to try to find the networkID from the NAD first instead of the nodes. Signed-off-by: Tim Rozet <[email protected]>
1 parent 5aa587e commit 167945e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

go-controller/pkg/ovn/base_network_controller_secondary.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@ func (oc *BaseSecondaryNetworkController) allowPersistentIPs() bool {
805805
func (oc *BaseSecondaryNetworkController) getNetworkID() (int, error) {
806806
if oc.networkID == nil || *oc.networkID == util.InvalidID {
807807
oc.networkID = ptr.To(util.InvalidID)
808+
if netID := oc.GetNetworkID(); netID != util.InvalidID {
809+
*oc.networkID = netID
810+
return *oc.networkID, nil
811+
}
808812
nodes, err := oc.watchFactory.GetNodes()
809813
if err != nil {
810814
return util.InvalidID, err

0 commit comments

Comments
 (0)