Skip to content

Commit

Permalink
Add a prestart line to change ownership of openvswitch dirs
Browse files Browse the repository at this point in the history
The openvswitch dirs should be owned by the user running the
openvswitch and ovsdb-server processes. This is controller
either by contents of default.conf or /etc/config/openvswitch file.

Signed-off-by: Aniket Bhat <anbhat@redhat.com>
  • Loading branch information
abhat committed Jan 6, 2021
1 parent ca283c2 commit c6b48e4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions templates/common/_base/units/ovs-vswitchd.service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ dropins:
contents: |
[Service]
Restart=always
ExecStartPre=-/bin/sh -c '/usr/bin/chown -R :$${OVS_USER_ID##*:} /var/lib/openvswitch'
ExecStartPre=-/bin/sh -c '/usr/bin/chown -R :$${OVS_USER_ID##*:} /etc/openvswitch'
ExecStartPre=-/bin/sh -c '/usr/bin/chown -R :$${OVS_USER_ID##*:} /run/openvswitch'

0 comments on commit c6b48e4

Please sign in to comment.