@@ -69,6 +69,63 @@ contents:
69
69
fall 2
70
70
}
71
71
72
+ {{- if and (eq .Infra.Status.PlatformStatus.Type "OpenStack") (or (eq .IPFamilies "DualStack") (eq .IPFamilies "DualStackIPv6Primary")) }}
73
+ # When using dual-stack with OpenStack, both IPv4 and IPv6 share the same Neutron Port,
74
+ # causing OVN to assume both addresses belong to the same node, which may not always be the case.
75
+ # To address this, we ensure that the API VIPs remain grouped through state changes,
76
+ # the same goes for Ingress VIPs.
77
+ vrrp_sync_group VG_API {
78
+ group {
79
+ {{`{{ range $i, $config := .Configs }}`}}
80
+ {{`{{$nonVirtualIP := .NonVirtualIP}}`}}
81
+
82
+ {{`{{$participateInAPIVRRP := not .EnableUnicast}}`}}
83
+ {{`{{- if .EnableUnicast}}
84
+ {{- range .LBConfig.Backends}}
85
+ {{- if eq $nonVirtualIP .Address}}
86
+ {{$participateInAPIVRRP = true}}
87
+ {{- end}}
88
+ {{- end}}
89
+ {{- end}}`}}
90
+
91
+ {{`{{if $participateInAPIVRRP}}`}}
92
+ {{`{{ .Cluster.Name }}`}}_API_{{`{{$i}}`}}
93
+ {{`{{ end }}`}}
94
+ {{`{{ end }}`}}
95
+ }
96
+ track_script {
97
+ chk_ocp_lb
98
+ chk_ocp_both
99
+ chk_mcs
100
+ }
101
+ }
102
+
103
+ vrrp_sync_group VG_INGRESS {
104
+ group {
105
+ {{`{{ range $i, $config := .Configs }}`}}
106
+ {{`{{$nonVirtualIP := .NonVirtualIP}}`}}
107
+ {{`{{$participateInIngressVRRP := not .EnableUnicast}}`}}
108
+ {{`{{- if .EnableUnicast}}
109
+ {{- range .IngressConfig.Peers}}
110
+ {{- if eq $nonVirtualIP .}}
111
+ {{$participateInIngressVRRP = true}}
112
+ {{- end}}
113
+ {{- end}}
114
+ {{- end}}`}}
115
+
116
+ {{`{{if $participateInIngressVRRP}}`}}
117
+ {{`{{ .Cluster.Name }}`}}_INGRESS_{{`{{$i}}`}}
118
+ {{`{{ end }}`}}
119
+ {{`{{ end }}`}}
120
+ }
121
+ track_script {
122
+ chk_ingress
123
+ chk_ingress_ready
124
+ chk_default_ingress
125
+ }
126
+ }
127
+ {{- end}}
128
+
72
129
{{`{{ range $i, $config := .Configs }}`}}
73
130
{{`{{$nonVirtualIP := .NonVirtualIP}}`}}
74
131
@@ -105,11 +162,13 @@ contents:
105
162
virtual_ipaddress {
106
163
{{`{{ .Cluster.APIVIP }}`}}/{{`{{ .Cluster.VIPNetmask }}`}} label vip
107
164
}
165
+ {{- if not (and (eq .Infra.Status.PlatformStatus.Type "OpenStack") (or (eq .IPFamilies "DualStack") (eq .IPFamilies "DualStackIPv6Primary"))) }}
108
166
track_script {
109
167
chk_ocp_lb
110
168
chk_ocp_both
111
169
chk_mcs
112
170
}
171
+ {{- end}}
113
172
}
114
173
{{`{{end}}`}}
115
174
@@ -146,11 +205,13 @@ contents:
146
205
virtual_ipaddress {
147
206
{{`{{ .Cluster.IngressVIP }}`}}/{{`{{ .Cluster.VIPNetmask }}`}} label vip
148
207
}
208
+ {{- if not (and (eq .Infra.Status.PlatformStatus.Type "OpenStack") (or (eq .IPFamilies "DualStack") (eq .IPFamilies "DualStackIPv6Primary"))) }}
149
209
track_script {
150
210
chk_ingress
151
211
chk_ingress_ready
152
212
chk_default_ingress
153
213
}
214
+ {{- end}}
154
215
}
155
216
{{`{{ end }}`}}
156
217
{{`{{ end }}`}}
0 commit comments