Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 721252 - dev-db/mariadb-10.4.12: mysqld capabilities are not set after installation
Summary: dev-db/mariadb-10.4.12: mysqld capabilities are not set after installation
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-06 12:28 UTC by EK
Modified: 2021-01-04 02:07 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description EK 2020-05-06 12:28:00 UTC
Once mysqld starts, following message is logged int mysqld.err:

InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().

This message means that mysqld fails to set thread priority, but not just because mysql user has no capability set in /etc/security/capability.conf (that is not relevant for the case at all), but because /usr/sbin/mysqld capabilities aren't set after installation.

Fixed by using setcap: setcap cap_ipc_lock,cap_sys_nice=ep /usr/sbin/mysqld

but every reinstall (recompilation) of mysqld binary resets this to default, so have to manually set after each mysqld rebuild.

Reproducible: Always

Steps to Reproduce:
1. emerge dev-db/mariard
2. run getcap /usr/sbin/mysqld, this will print empty output (no capabilities)
3. start mysqld and check logs or check output of getpcaps $(pgrep mysql).
Actual Results:  
no mysqld capabilities set after reinstalling mariadb.

Expected Results:  
mysqld capabilities should be set by ebuild.
Comment 1 Larry the Git Cow gentoo-dev 2020-05-23 21:45:41 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb9b0c91d053b53363eb480cf2670990f6645d8c

commit eb9b0c91d053b53363eb480cf2670990f6645d8c
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2020-05-23 21:13:46 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-05-23 21:44:54 +0000

    sys-cluster/galera: bump to v26.4.4
    
    Closes: https://bugs.gentoo.org/721252
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 sys-cluster/galera/Manifest             |  1 +
 sys-cluster/galera/galera-26.4.4.ebuild | 81 +++++++++++++++++++++++++++++++++
 2 files changed, 82 insertions(+)
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2020-05-23 21:53:39 UTC
Wrong bug linked.
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2021-01-04 02:07:10 UTC
No, setcap would be the wrong solution. See https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_page_cleaners how to proper configure the system if you want to make use of this feature.