openvswitch: Fix logs dir permission

Closes-Bug: #1795609

Change-Id: Iedfb2df027c0cefc45668a76d45ce62193aba9ef
(cherry picked from commit a9c94abf53)
This commit is contained in:
Michal Nasiadka
2025-01-13 09:54:25 +01:00
parent 5e94215406
commit 771272100b
3 changed files with 12 additions and 0 deletions

View File

@@ -7,4 +7,6 @@ if [[ $(stat -c %a /var/log/kolla/openvswitch) != "755" ]]; then
chmod 755 /var/log/kolla/openvswitch
fi
chown -R openvswitch:openvswitch /var/log/kolla/openvswitch
. /usr/local/bin/kolla_openvswitch_extend_start

View File

@@ -8,3 +8,8 @@ fi
if [[ $(ovsdb-tool needs-conversion /var/lib/openvswitch/conf.db) == yes ]]; then
ovsdb-tool convert "/var/lib/openvswitch/conf.db"
fi
if [[ ! -r "/var/log/kolla/openvswitch/ovsdb-server.log" ]]; then
touch /var/log/kolla/openvswitch/ovsdb-server.log
chown openvswitch:openvswitch /var/log/kolla/openvswitch/ovsdb-server.log
fi

View File

@@ -1,3 +1,8 @@
#!/bin/bash
if [[ ! -r "/var/log/kolla/openvswitch/ovs-vswitchd.log" ]]; then
touch /var/log/kolla/openvswitch/ovs-vswitchd.log
chown openvswitch:openvswitch /var/log/kolla/openvswitch/ovs-vswitchd.log
fi
modprobe openvswitch