Bug 1063466
| Summary: | mariadb fails to start due to permissions issue on /var/log/mariadb/mariadb.log | |||
|---|---|---|---|---|
| Product: | [Community] RDO | Reporter: | Lars Kellogg-Stedman <lars> | |
| Component: | openstack-selinux | Assignee: | RHOS Maint <rhos-maint> | |
| Status: | CLOSED DUPLICATE | QA Contact: | Ofer Blaut <oblaut> | |
| Severity: | unspecified | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | unspecified | CC: | aortega, derekh, yeylon | |
| Target Milestone: | --- | |||
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Bug Fix | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1063499 (view as bug list) | Environment: | ||
| Last Closed: | 2014-02-10 21:28:55 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: | 1063499 | |||
Hmm, this may actually be an selinux issue:
# audit2allow -a
#============= mysqld_safe_t ==============
allow mysqld_safe_t var_log_t:lnk_file { read getattr };
Actually a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1063499 *** This bug has been marked as a duplicate of bug 1063499 *** |
Description of problem: Using openstack-packstack-2013.2.1-0.29.dev956.fc20.noarch: When trying to install RDO on Fedora 20 via "packstack --allinone", the install fails with: ERROR : Error appeared during Puppet run: 172.16.0.4_mysql.pp Error: Could not start Service[mysqld]: Execution of '/sbin/service mariadb start' returned 1: You will find full trace in log /var/tmp/packstack/20140210-191647-DfRatq/manifests/172.16.0.4_mysql.pp.log Please check log file /var/tmp/packstack/20140210-191647-DfRatq/openstack-setup.log for more information Version-Release number of selected component (if applicable): /var/tmp/packstack/20140210-191647-DfRatq/manifests/172.16.0.4_mysql.pp.log has: Error: Could not start Service[mysqld]: Execution of '/sbin/service mariadb start' returned 1: Error: /Stage[main]/Mysql::Server/Service[mysqld]/ensure: change from stopped to running failed: Could not start Service[mysqld]: Execution of '/sbin/service mariadb start' returned 1: Error: Could not start Service[mysqld]: Execution of '/sbin/service mariadb start' returned 1: Error: /Stage[main]/Mysql::Server/Service[mysqld]/ensure: change from stopped to running failed: Could not start Service[mysqld]: Execution of '/sbin/service mariadb start' returned 1: And the journal shows: # journalctl -u mariadb --full --no-pager -n10 -- Logs begin at Mon 2014-02-10 18:51:02 UTC, end at Mon 2014-02-10 19:23:09 UTC. -- Feb 10 19:18:17 lars-f20-0 mysqld_safe[11501]: 140210 19:18:17 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'. Feb 10 19:18:17 lars-f20-0 mysqld_safe[11501]: 140210 19:18:17 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql Feb 10 19:18:17 lars-f20-0 mysqld_safe[11501]: /usr/bin/mysqld_safe: line 138: /var/log/mariadb/mariadb.log: Permission denied Feb 10 19:18:17 lars-f20-0 mysqld_safe[11501]: /usr/bin/mysqld_safe: line 182: /var/log/mariadb/mariadb.log: Permission denied Feb 10 19:18:17 lars-f20-0 mysqld_safe[11501]: 140210 19:18:17 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended Feb 10 19:18:17 lars-f20-0 mysqld_safe[11501]: /usr/bin/mysqld_safe: line 138: /var/log/mariadb/mariadb.log: Permission denied Feb 10 19:18:17 lars-f20-0 systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE This is because the log file is owned by root: # ls -ld /var/log/mariadb/ drwxr-x---. 2 mysql mysql 4096 Feb 10 19:18 /var/log/mariadb/ # ls -l /var/log/mariadb/mariadb.log -rw-r--r--. 1 root root 0 Feb 10 19:18 /var/log/mariadb/mariadb.log Fixing the permissions on that file allows mariadb to start up correctly. # chown mysql:mysql /var/log/mariadb/mariadb.log # service mariadb start # service mariadb status Redirecting to /bin/systemctl status mariadb.service mariadb.service - MariaDB database server Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled) Active: active (running) since Mon 2014-02-10 19:26:53 UTC; 41s ago