Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
The FDP team is no longer accepting new bugs in Bugzilla. Please report your issues under FDP project in Jira. Thanks.

Bug 2113855

Summary: Ensure that the daemon log and run dir have correct permissions
Product: Red Hat Enterprise Linux Fast Datapath Reporter: Ales Musil <amusil>
Component: ovn-2021Assignee: Ales Musil <amusil>
Status: CLOSED CURRENTRELEASE QA Contact: Jianlin Shi <jishi>
Severity: medium Docs Contact:
Priority: unspecified    
Version: FDP 22.ECC: ctrautma, jiji, ralongi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovn-2021-21.12.0-86.el8fdp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-24 07:01:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ales Musil 2022-08-02 07:35:06 UTC
Description of problem:
When the log/run directory is created initially with wrong permission
ovn-ctl does not attempt to fix as the script only checks if the folder
exists. 

Version-Release number of selected component (if applicable):
ovn-2021-21.06.0-29.el8s.x86_64
ovn-2021-host-21.06.0-29.el8s.x86_64

How reproducible:
100%

Steps to Reproduce:
1. mkdir -p /var/log/ovn as root
2. /usr/share/ovn/scripts/ovn-ctl --ovn-user=openvswitch start_controller
3. ls -la /var/log/ | grep ovn

Actual results:
the directory is owned by root.

Expected results:
It should be owned by the --ovn-user.

Additional info:
This actually applies only to ovn-controller, the start of northd starts also
DB which already have:

chown -R $INSTALL_USER:$INSTALL_GROUP $ovn_dbdir
chown -R $INSTALL_USER:$INSTALL_GROUP $OVN_RUNDIR
chown -R $INSTALL_USER:$INSTALL_GROUP $ovn_logdir
chown -R $INSTALL_USER:$INSTALL_GROUP $ovn_etcdir

Comment 1 Ales Musil 2022-08-02 07:50:53 UTC
Patches posted: https://patchwork.ozlabs.org/project/ovn/list/?series=312210

Comment 2 OVN Bot 2022-08-08 04:07:38 UTC
ovn22.06 fast-datapath-rhel-8 clone created at https://bugzilla.redhat.com/show_bug.cgi?id=2116251
ovn22.06 fast-datapath-rhel-9 clone created at https://bugzilla.redhat.com/show_bug.cgi?id=2116252