Bug 1477575
Summary: | service start fails due to wrong selinux type of logfile | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Software Collections | Reporter: | Karel Volný <kvolny> | ||||
Component: | mysql | Assignee: | Michal Schorm <mschorm> | ||||
Status: | CLOSED ERRATA | QA Contact: | Karel Volný <kvolny> | ||||
Severity: | urgent | Docs Contact: | |||||
Priority: | urgent | ||||||
Version: | rh-mysql56 | CC: | databases-maint, hhorak, mmuzila | ||||
Target Milestone: | alpha | ||||||
Target Release: | 2.4 | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | No Doc Update | |||||
Doc Text: |
undefined
|
Story Points: | --- | ||||
Clone Of: | Environment: | ||||||
Last Closed: | 2017-09-21 07:42:41 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: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1445537 | ||||||
Attachments: |
|
Description
Karel Volný
2017-08-02 12:10:41 UTC
Created attachment 1308674 [details] proposed patch with restorecon call (In reply to Karel Volný from comment #0) > Additional info: > probably, this comes from 'install' usage (instead of older 'touch') within > prepare script The install section is not used, it should only be triggered when someone puts the log file into /var/log. The log file is created by /opt/rh/rh-mysql56/root/usr/bin/mysql_install_db, which does not fix content properly (does not have mysql SELinux context as mysqld has). > BTW, note also the writability by group while it should be just group > readable > > also, I'm a bit lost in the code paths, because if you keep the database > directory and remove just the logfile, on next server start the logfile gets > recreated with proper attributes, so probably the whole logfile creation > during database directory initialisation could be left out ... The log file is re-created with correct attributes, because this time the log file is created by mysqld daemon itself, which runs with proper SELinux context. So the issue you see is only visible when the log file is created by mysql_install_db (which is run only when the database directory is empty). So, I think the correct fix is to run restorecon on the log file directly after mysql_install_db call. Proposed patch attached. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2017:2787 |