[MXS-310] MaxScale 1.2 does not completely cleanly change to the maxscale user Created: 2015-08-14 Updated: 2015-08-16 Resolved: 2015-08-16 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | Core |
| Affects Version/s: | 1.2.0 |
| Fix Version/s: | 1.3.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Simon J Mudd | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
MaxScale 1.2 provides a new option to avoid running as the root user. In linux I have monitoring scripts which check /proc/<maxscale_pid>/fd/ for the number of descriptors being used. (There was a bug where there was a file descriptor leak some time ago.) and now this fails as the file descriptors and /proc/<maxscale_pid>/fd directory is not owned by maxscale and neither are the descriptor files under /proc/<maxscale_pid>/fd/. My guess is that the complete process of changing user has not been followed and this needs tidying up so it's probably reasonably straight forward to do. i'll include some information on how to reproduce this in a further comment. |
| Comments |
| Comment by Simon J Mudd [ 2015-08-14 ] | ||||||||||||||||||||||||||||||||||||
|
On CentOS 6 install the maxscale rpm:
Start maxscale, just use the existing initial config even if it doesn't really work: that's irrelevant for this.
Confirm that MaxScale is running and as which user:
Now check the /proc/<maxscale_pid> directory ownerships and the fd directory underneath it and its files:
You'll notice the fd directory is owned by root as are the files under it. So please check that this is done. | ||||||||||||||||||||||||||||||||||||
| Comment by markus makela [ 2015-08-16 ] | ||||||||||||||||||||||||||||||||||||
|
The fix to this seems to be to reset the dumpable flag of the process back on after changing the user-id of the process. With this change ownership of all the files under /proc/<pid>/ were changed to the right owner. |