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 1689300 - mysqld_safe --dry-run doesn't work as expected
Summary: mysqld_safe --dry-run doesn't work as expected
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: mariadb
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Michal Schorm
QA Contact: Lukáš Zachar
URL:
Whiteboard:
Depends On:
Blocks: 1856699
TreeView+ depends on / blocked
 
Reported: 2019-03-15 15:56 UTC by Karel Volný
Modified: 2021-01-15 15:57 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1691288 1691290 1691294 (view as bug list)
Environment:
Last Closed: 2021-01-15 15:58:12 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Karel Volný 2019-03-15 15:56:07 UTC
Description of problem:
mysqld_safe --dry-run doesn't work as expected

Version-Release number of selected component (if applicable):
mariadb-server-10.3.11-1.module+el8+2765+cfa4f87b

How reproducible:
always

Steps to Reproduce:
1. dnf install -y mariadb-server
2. systemctl start mariadb
3. systemctl stop mariadb
4. mysqld_safe --dry-run

Actual results:
[root@host-8-250-109 ~]# mysqld_safe --dry-run
/usr/bin/mysqld_safe: line 932: return: can only `return' from a function or sourced script
^C^C^C^C^C^Z
[1]+  Stopped                 mysqld_safe --dry-run
[root@host-8-250-109 ~]# ps -ef | grep mysql
root      7196  6107  0 11:52 pts/0    00:00:00 /bin/sh /usr/bin/mysqld_safe --dry-run
mysql     7280  7196  0 11:52 pts/0    00:00:00 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mariadb/plugin --user=mysql --log-error=/var/log/mariadb/mariadb.log --pid-file=/run/mariadb/mariadb.pid --socket=/var/lib/mysql/mysql.sock


Expected results:
it returns to shell without mysqld running

Additional info:
# mysqld_safe --help | grep dry
  --dry-run                  Simulate the start to detect errors but don't start

Comment 2 Michal Schorm 2019-07-18 23:42:05 UTC
CURRENT STATUS:
* As the intention of this script argument was different than we thought, we shouldn't deploy a fix for it in RHEL8.

Comment 3 Michal Schorm 2020-04-14 13:58:34 UTC
The "--dry-run" has been fixed by upstream.
It ends with exit code 1 now and does NOT start the server.

IMHO it is now fixed sufficiently (because the main issue was that it started the server despite expicitly described as an option that does NOT start the server).

The --dry-run isn't expected to be used either by us or by the end-users.
https://github.com/MariaDB/server/pull/1238#issuecomment-475494807
> The original purpose of --dry-run was https://github.com/MariaDB/server/blob/10.4/scripts/mariadb-service-convert as a script to take [mysqld_safe] params and create a systemd service file override.

Comment 5 Michal Schorm 2020-07-14 09:16:52 UTC
MAINTAINER NOTE:

I reached upstream with this issue.
The script was never meant to be called by an user, instead, that particual part of script was intended to be ran by other scripts.

The upstream solved the issue in:
  MariaDB 10.1.42
  MariaDB 10.2.28
  MariaDB 10.3.19
with:
  https://github.com/MariaDB/server/commit/6a7d51b1cb


Note You need to log in before you can comment on or make changes to this bug.