Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1598095

Summary: problem with fuser usage during init
Product: Red Hat Enterprise Linux 7 Reporter: Karel Volný <kvolny>
Component: mariadbAssignee: Michal Schorm <mschorm>
Status: CLOSED ERRATA QA Contact: Anna Khaitovich <akhaitov>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: akhaitov, databases-maint, hhorak, mmuzila
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-06 13:18:16 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:

Description Karel Volný 2018-07-04 10:37:59 UTC
Description of problem:
the script
/usr/libexec/mariadb-prepare-db-dir
makes use of the 'fuser' command

there are two problems with that:

a) the package doesn't depend on psmisc, so fuser command doesn't need to be installed
b) the script runs with mysql user privileges, which prevents fuser from functioning correctly

Version-Release number of selected component (if applicable):
mariadb-server-5.5.60-1.el7_5.x86_64

Comment 2 Honza Horak 2018-07-04 10:51:01 UTC
We probably should use a similar check as we're doing in Fedora:

  # some process uses the socket file
  response=`@bindir@/mysqladmin --no-defaults --socket="$socketfile" --user=UNKNOWN_MYSQL_USER --connect-timeout="${CHECKSOCKETTIMEOUT:-10}" ping 2>&1`
  if [ $? -qe 0 ] || echo "$response" | grep -q "Access denied for user" ; then
    echo "Is another MySQL daemon already running with the same unix socket?" >&2
    echo "Please, stop the process using the socket $socketfile or remove the file manually to start the service." >&2
    exit 1
  fi

Taken from https://src.fedoraproject.org/cgit/rpms/mariadb.git/tree/mysql-check-socket.sh#n28

Comment 9 Anna Khaitovich 2019-06-10 07:55:00 UTC
OLD:
$ rpm -qa mariadb-server
mariadb-server-5.5.60-1.el7_5.x86_64
$ grep fuser /usr/libexec/mariadb-prepare-db-dir
if fuser "$socketfile" &>/dev/null ; then

NEW:
$ rpm -qa mariadb-server
mariadb-server-5.5.64-1.el7.x86_64
$ grep fuser /usr/libexec/mariadb-prepare-db-dir
$ echo $?
1

old FAIL. new PASS => FIXED

Comment 11 errata-xmlrpc 2019-08-06 13:18:16 UTC
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-2019:2327