Skip to content

Commit ba87fb8

Browse files
committed
[neutron] add OVN improvements to northd, neutron config, default vals
1 parent 27c0858 commit ba87fb8

File tree

4 files changed

+50
-17
lines changed

4 files changed

+50
-17
lines changed

openstack/neutron/templates/deployment-ovn-northd.yaml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ metadata:
99
kubernetes.io/description: This Deployment launches the ovn-northd.
1010
spec:
1111
progressDeadlineSeconds: 600
12-
replicas: 1
12+
replicas: {{ .Values.pod.replicas.ovn_northd }}
1313
revisionHistoryLimit: 10
1414
selector:
1515
matchLabels:
1616
name: neutron-ovn-northd
1717
strategy:
1818
rollingUpdate:
19-
maxSurge: 0
20-
maxUnavailable: 1
19+
maxSurge: 2
20+
maxUnavailable: {{ sub .Values.pod.replicas.ovn_northd 1 }}
2121
type: RollingUpdate
2222
template:
2323
metadata:
@@ -39,8 +39,9 @@ spec:
3939
command: ["/usr/bin/ovn-northd"]
4040
args:
4141
- "-vfile:off"
42-
- "-vconsole:{{ .Values.ovn.logLevel | default "info" }}"
43-
- "--n-threads={{ .Values.ovn.nThreads | default 1 }}"
42+
- "-vconsole:{{ .Values.ovn.logLevel | default "INFO" }}"
43+
- --pidfile
44+
- --n-threads={{ .Values.ovn.nThreads | default 1 }}
4445
{{- if .Values.ovn.enableSsl }}
4546
- --certificate=/etc/pki/tls/certs/ovndb.crt
4647
- --private_key=/etc/pki/tls/certs/ovndb.key
@@ -58,13 +59,10 @@ spec:
5859
value: "tcp:neutron-ovsdb-sb.{{ .Release.Namespace }}.svc.kubernetes.{{ .Values.global.region }}.cloud.sap:{{ $ovsdb_sb.DB_PORT }}"
5960
readinessProbe:
6061
exec:
61-
command: ["/usr/bin/pidof", "ovn-northd"]
62-
initialDelaySeconds: 5
63-
timeoutSeconds: 3
64-
periodSeconds: 3
65-
livenessProbe:
66-
exec:
67-
command: ["/usr/bin/pidof", "ovn-northd"]
62+
command:
63+
- sh
64+
- -c
65+
- ovn-appctl --target=/tmp/ovn-northd.1.ctl status | grep -qE "active|standby"
6866
initialDelaySeconds: 5
6967
timeoutSeconds: 5
7068
periodSeconds: 5

openstack/neutron/templates/etc/_ml2-conf.ini.tpl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,19 @@ enable_vxlan = false
6262
[ovn]
6363
{{- $ovsdb_nb := index (index .Values "ovsdb-nb") }}
6464
{{- $ovsdb_sb := index (index .Values "ovsdb-sb") }}
65+
# we always use TCP, encryption is recommended to be done by reverse proxy
6566
ovn_nb_connection = tcp:{{ required "ovsdb-nb.EXTERNAL_IP required!" $ovsdb_nb.EXTERNAL_IP }}:{{ $ovsdb_nb.DB_PORT }}
6667
ovn_sb_connection = tcp:{{ required "ovsdb-sb.EXTERNAL_IP required!" $ovsdb_sb.EXTERNAL_IP }}:{{ $ovsdb_sb.DB_PORT }}
68+
69+
ovn_l3_mode = false
70+
ovsdb_log_level = {{ .Values.ovn.logLevel | default "INFO" }}
71+
ovn_metadata_enabled = {{ .Values.ovn.metadata_enabled | default "false" }}
72+
disable_ovn_dhcp_for_baremetal_ports = {{ .Values.ovn.disable_ovn_dhcp_for_baremetal_ports | default "false" }}
73+
{{ with .Values.ovn.dns_servers }}dns_servers = {{ . | join "," }}{{ end }}
74+
{{ with .Values.ovn.ovn_dhcp4_global_options }}ovn_dhcp4_global_options = {{ . }}{{ end }}
75+
{{ with .Values.ovn.ovn_dhcp6_global_options }}ovn_dhcp6_global_options = {{ . }}{{ end }}
76+
{{ with .Values.ovn.dhcp_default_lease_time }}dhcp_default_lease_time = {{ . }}{{ end }}
77+
# https://www.youtube.com/watch?v=ZRWSZRPhJUs
78+
mac_binding_age_threshold = 86400
6779
{{- end }}
80+

openstack/neutron/templates/etc/_uwsgi.ini.tpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ http = :{{.Values.global.neutron_api_port_internal | default 9696}}
1313
plugins-dir = /var/lib/openstack/lib
1414
need-plugins = shortmsecs
1515

16+
# For ML2/OVN hash register initialization
17+
start-time = %t
18+
1619
# Connection tuning
1720
vacuum = true
1821
lazy-apps = true

openstack/neutron/values.yaml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pod:
3838
replicas:
3939
server: 3
4040
rpc_server: 2
41-
ovn_db: 3
41+
ovn_northd: 2
4242
lifecycle:
4343
upgrades:
4444
deployments:
@@ -252,26 +252,42 @@ ovn:
252252
enableSsl: false
253253

254254
ovsdb-sb:
255+
service:
256+
# requirements to be accessible from outside with Calico
257+
type: LoadBalancer
258+
external_traffic_policy: Local
259+
replicaCount: 3
255260
RAFT_PORT: 6644
256261
DB_TYPE: sb
257262
DB_PORT: 6442
258263
OVN_LOG_LEVEL: "info"
259264
OVN_ELECTION_TIMER: "10000"
260265
OVN_INACTIVITY_PROBE: "60000"
261266
OVN_PROBE_INTERVAL_TO_ACTIVE: "60000"
262-
service:
263-
# requirements to be accessible from outside with Calico
264-
type: LoadBalancer
265-
external_traffic_policy: Local
267+
resources:
268+
limits:
269+
cpu: 500m
270+
memory: 256Mi
271+
requests:
272+
cpu: 100m
273+
memory: 128Mi
266274

267275
ovsdb-nb:
276+
replicaCount: 3
268277
RAFT_PORT: 6643
269278
DB_TYPE: nb
270279
DB_PORT: 6441
271280
OVN_LOG_LEVEL: "info"
272281
OVN_ELECTION_TIMER: "10000"
273282
OVN_INACTIVITY_PROBE: "60000"
274283
OVN_PROBE_INTERVAL_TO_ACTIVE: "60000"
284+
resources:
285+
limits:
286+
cpu: 500m
287+
memory: 256Mi
288+
requests:
289+
cpu: 100m
290+
memory: 128Mi
275291

276292
asr:
277293
config_agents: []
@@ -465,6 +481,9 @@ logging_sapccsentry:
465481
networking_arista:
466482
handlers: stdout, sentry_events, sentry_breadcrumbs
467483
level: DEBUG
484+
neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.ovsdb_monitor:
485+
handlers: stdout, sentry_events, sentry_breadcrumbs
486+
level: INFO
468487

469488

470489
pgmetrics:

0 commit comments

Comments
 (0)