[openvswitch] Make --user flag optional

Add the ability to run the OVS server as root
since the following change lacks backward compatibility:
https://review.opendev.org/c/openstack/openstack-helm-infra/+/939580

Change-Id: I071f77be0d329fbe98ce283324466bf129fe190d
This commit is contained in:
astebenkova 2025-01-31 13:10:09 +02:00
parent 117b08c6fc
commit 962333df31
3 changed files with 11 additions and 3 deletions

View File

@ -119,8 +119,10 @@ function start () {
-vconsole:err \
-vconsole:info \
--pidfile=${OVS_PID} \
--mlockall \
--user="{{ .Values.conf.ovs_user_name }}"
{{- if .Values.conf.ovs_user_name }}
--user="{{ .Values.conf.ovs_user_name }}" \
{{- end }}
--mlockall
}
function stop () {

View File

@ -243,6 +243,8 @@ conf:
# vhost_iommu_support: true
## OVS supports run in non-root for both OVS and OVS DPDK mode, the user
# for OVS need to be added to container image with user id 42424.
# useradd -u 42424 openvswitch, groupmod -g 42424 openvswitch
# useradd -u 42424 openvswitch; groupmod -g 42424 openvswitch
#
# Leave empty to run as user that invokes the command (default: root)
ovs_user_name: "openvswitch:openvswitch"
...

View File

@ -0,0 +1,4 @@
---
openvswitch:
- Make the --user flag for OVS server optional
...