Skip to content

Commit a78108e

Browse files
drizztapconole
authored andcommitted
rhel/systemd: Change owner recursively and also on /etc/openvswitch.
Since we use a floating user (user with dynamic userid) and floating groups (groups with dynamic groupid), when you use bootc the uid/gid of the directory may change and so it's necessary to be sure that the uid/gid is updated each time you try to start the daemon. ovsdb-server.service is the correct place to do that, since ovs-vswitchd.service uses After=ovsdb-server.service and so it's always started after it. See bootc-dev/bootc#673 (comment) Acked-by: Aaron Conole <[email protected]> Signed-off-by: Timothy Redaelli <[email protected]> Signed-off-by: Aaron Conole <[email protected]>
1 parent 316b0ff commit a78108e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rhel/usr_lib_systemd_system_ovsdb-server.service

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ EnvironmentFile=-/run/openvswitch.useropts
1818
# OVS_USER_ID from default.conf or sysconfig.
1919
ExecStartPre=/usr/bin/rm -f /run/openvswitch.useropts
2020

21-
ExecStartPre=-/usr/bin/chown ${OVS_USER_ID} /run/openvswitch /var/log/openvswitch
21+
ExecStartPre=-/usr/bin/chown -R ${OVS_USER_ID} \
22+
/etc/openvswitch /run/openvswitch /var/log/openvswitch
2223
ExecStartPre=/bin/sh -c '/usr/bin/echo "OVS_USER_ID=${OVS_USER_ID}" > /run/openvswitch.useropts'
2324
ExecStartPre=/bin/sh -c 'if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /usr/bin/echo "OVS_USER_OPT=--ovs-user=${OVS_USER_ID}" >> /run/openvswitch.useropts; fi'
2425
ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \

0 commit comments

Comments
 (0)