[MDEV-18544] "missing required privilege PROCESS on *.*" using mariabackup for SST Created: 2019-02-11 Updated: 2019-05-02 Resolved: 2019-05-02 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Galera SST, mariabackup |
| Affects Version/s: | 10.3.12 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Konstantin Vasserman | Assignee: | Vladislav Vaintroub |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu 18.04 |
||
| Description |
|
We had a 10.2 Galera cluster that used mariabackup as SST method. Everything worked fine, until we've upgraded to 10.3. With 10.3, SST started failing on donor node with "missing required privilege PROCESS on ." error. When we checked the privileges on the account used for SST, it already had PROCESS privilege (and that didn't change since 10.2). We tried granting it again, just in case, that didn't help. We attempted mariabackup --backup with the same account and it worked fine. So the problem appears to be specific to mariabackup used as SST. Only after we've granted ALL privileges to the account, SST began to function. Here is an excerpt from syslog on the donor node that is related to this issue: ---------- |
| Comments |
| Comment by Konstantin Vasserman [ 2019-03-12 ] | ||||||||||||||||
|
I have since been able to replicate the problem on a stand-alone node without Galera and SST involved. After upgrading from 10.2 to 10.3, nightly mariabackup tool started throwing the same error about PROCESS privilege being missing from the user. Granting the user ALL privileges fixed the issue. | ||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2019-03-13 ] | ||||||||||||||||
|
Can you provide output from show grants for sst user and user executing the sst. | ||||||||||||||||
| Comment by Konstantin Vasserman [ 2019-03-13 ] | ||||||||||||||||
|
Unfortunately, I didn't snapshot the privileges before I set the user to GRANT ALL PRIVILEGES. However, I'm pretty certain that the original privileges were set as recommended by your documentation: GRANT RELOAD, PROCESS, LOCK TABLES, REPLICATION CLIENT ON . TO 'mariabackup'@'localhost'; Did this list of required privileges change between 10.2 and 10.3? | ||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2019-03-13 ] | ||||||||||||||||
|
In my understanding similar access rights should be granted for user used on sst i.e. on your case galeraSST | ||||||||||||||||
| Comment by Konstantin Vasserman [ 2019-03-13 ] | ||||||||||||||||
|
So it now happened to us on both a Galera SST AND a stand-alone node. In both cases it complained about PROCESS privilege not being set. But in both cases, the user had PROCESS privilege and only when we gave the user ALL privileges mariabackup started working. | ||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2019-03-13 ] | ||||||||||||||||
|
Hi kvasserman, What is your value of wsrep_sst_auth? https://mariadb.com/kb/en/library/mariabackup-sst-method/#authentication-and-privileges As jplindst pointed out, you've provided the privileges of the 'mariabackup'@'localhost' user, but your output suggests that the SST was using the galeraSST user instead:
| ||||||||||||||||
| Comment by Konstantin Vasserman [ 2019-03-13 ] | ||||||||||||||||
|
wsrep_sst_auth=galeraSST:<password reducted> as I have explained galeraSST user had PROCESS privilege, but mariabackup failed with the above error until I gave that user ALL privileges. It then happened on a completely different server that is not a Galera node and SST was not involved. The same issue, the user already had PROCESS privilege, but mariabackup failed complaining that the user doesn't have it, until I gave that user ALL privileges. | ||||||||||||||||
| Comment by Konstantin Vasserman [ 2019-03-13 ] | ||||||||||||||||
|
In both cases, problem happened after upgrade from 10.2 to 10.3 | ||||||||||||||||
| Comment by Vladislav Vaintroub [ 2019-03-13 ] | ||||||||||||||||
|
Can you , for diagnostic purposes, paste the output for following command, for the galeraSST user? | ||||||||||||||||
| Comment by Konstantin Vasserman [ 2019-03-13 ] | ||||||||||||||||
|
You don't believe me that it NOW has ALL privileges and is working with this configuration? GRANT ALL PRIVILEGES ON . TO 'galeraSST'@'localhost' IDENTIFIED BY PASSWORD '*XXXXXXXXXX' Since I had to give the user all privileges to make it work, I don't have the old privileges. But they were set as per your documentation. | ||||||||||||||||
| Comment by Vladislav Vaintroub [ 2019-03-13 ] | ||||||||||||||||
|
I believe you that all privileges work, however we do have a unit test that tests just required privileges. So either the parsing went somehow wrong, or something else was fishy in your case, but it is hard to tell what, without obtaining original GRANT, where mariabackup would fail. Here is the test, it succeeds if RELOAD and PROCESS are granted on all databases | ||||||||||||||||
| Comment by Konstantin Vasserman [ 2019-03-13 ] | ||||||||||||||||
|
I know, it's unfortunate that I didn't save the old GRANTs but I'm pretty sure they were: GRANT RELOAD, PROCESS, LOCK TABLES, REPLICATION CLIENT ON . TO 'galeraSST'@'localhost' ..... | ||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2019-03-13 ] | ||||||||||||||||
|
I just did a manual test with mariabackup and mysqld from 10.3.13 using the privileges in the documentation, and that worked:
| ||||||||||||||||
| Comment by Konstantin Vasserman [ 2019-03-13 ] | ||||||||||||||||
|
Did you create user in 10.2 and then upgraded to 10.3? Because this is when I got the error: after upgrading to 10.3. It worked well in 10.2. | ||||||||||||||||
| Comment by Vladislav Vaintroub [ 2019-05-02 ] | ||||||||||||||||
|
There is really not enough info to process it, thus I added some code to dump current grants in mariabackup output, in case it ends with "Insufficient privileges". If bug reappears, or will be reproducible somehow, this will make fixing it easy. |