Percona-Server-test-56 RPM package does NOT check /usr/share/percona-server directory and thus is unusable "as is"

Bug #1396035 reported by Valerii Kravchuk
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
Triaged
High
Unassigned
5.6
Triaged
High
Unassigned
5.7
Triaged
High
Unassigned

Bug Description

I've installed recent RPMs of 5.6.21-71.0 on CentOS 6.6:

[root@centos openxs]# rpm -qa | grep -i percona
Percona-Server-client-56-5.6.21-rel70.1.el6.x86_64
percona-toolkit-2.2.12-1.noarch
Percona-Server-shared-56-5.6.21-rel70.1.el6.x86_64
percona-release-0.1-3.noarch
percona-xtrabackup-2.2.6-5042.el6.x86_64
Percona-Server-devel-56-5.6.21-rel70.1.el6.x86_64
Percona-Server-shared-51-5.1.73-rel14.12.624.rhel6.x86_64
Percona-Server-server-56-5.6.21-rel70.1.el6.x86_64
Percona-Server-test-56-5.6.21-rel70.1.el6.x86_64
percona-nagios-plugins-1.1.4-1.noarch

and tried to use mysql-test suit from Percona-Server-test-56:

[root@centos openxs]# cd /usr/share/mysql-test/
[root@centos mysql-test]# ./mtr analyze
Logging: ./mtr analyze
mysql-test-run: *** ERROR: Could not find any of /usr/share/mysql/charsets /usr/sql/share/charsets /usr/share/charsets

So, it fails and it expects to find charsets directory in places that Percona packages just do not provide. There is a quick and dirty fix:

[root@centos mysql-test]# ln -s /usr/share/percona-server /usr/share/mysql

and then it works:

[root@centos mysql-test]# ./mtr analyze
Logging: ./mtr analyze
2014-11-25 11:08:52 2354 [Note] Plugin 'FEDERATED' is disabled.
2014-11-25 11:08:52 2354 [Note] Binlog end
2014-11-25 11:08:52 2354 [Note] Shutting down plugin 'CSV'
2014-11-25 11:08:52 2354 [Note] Shutting down plugin 'MyISAM'
MySQL Version 5.6.21
Checking supported features...
 - SSL connections supported
Collecting tests...
Checking leftover processes...
Removing old var directory...
Creating var directory '/usr/share/mysql-test/var'...
Installing system database...

==============================================================================

TEST RESULT TIME (ms) or COMMENT
--------------------------------------------------------------------------

worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
worker[1] mysql-test-run: WARNING: running this script as _root_ will cause some tests to be skipped
main.analyze [ pass ] 224
--------------------------------------------------------------------------
The servers were restarted 0 times
Spent 0.224 of 14 seconds executing testcases

Completed: All 1 tests were successful.

But package should work after installation without any kind of hacks.

Tags: pkg
tags: added: pkg
Revision history for this message
Nilnandan Joshi (nilnandan-joshi) wrote :

Able to reproduce the same with CentOS 6.5 and PS 5.6.21-70.1.

[root@centos65 ~]# cd /usr/share/mysql-test/
[root@centos65 mysql-test]# ./mtr analyze
Logging: ./mtr analyze
mysql-test-run: *** ERROR: Could not find any of /usr/share/mysql/charsets /usr/sql/share/charsets /usr/share/charsets
[root@centos65 mysql-test]#

Added this, ln -s /usr/share/percona-server/charsets /usr/share/mysql

and it works, but giving another error.

[root@centos65 mysql-test]# ./mtr analyze
Logging: ./mtr analyze
2014-11-26 12:33:25 2471 [ERROR] Can't find messagefile '/usr/share/mysql/errmsg.sys'
2014-11-26 12:33:25 2471 [Note] Plugin 'FEDERATED' is disabled.
2014-11-26 12:33:25 2471 [Note] Binlog end
2014-11-26 12:33:25 2471 [Note] Shutting down plugin 'CSV'
2014-11-26 12:33:25 2471 [Note] Shutting down plugin 'MyISAM'
MySQL Version 5.6.21
Checking supported features...
 - SSL connections supported
Collecting tests...
Removing old var directory...
Creating var directory '/usr/share/mysql-test/var'...
Installing system database...
 - from '/usr/mysql-test/lib/init_db.sql'
mysql-test-run: *** ERROR: Can't open '/usr/mysql-test/lib/init_db.sql': No such file or directory
[root@centos65 mysql-test]#

Dont know why its searching /usr/mysql-test where it is at /usr/share/mysql. I even can't able to find init_db.sql

[root@centos65 mysql-test]# find / -name init_db.sql
[root@centos65 mysql-test]#
[root@centos65 mysql-test]# pwd
/usr/share/mysql-test
[root@centos65 mysql-test]# find . -name init_db.sql
[root@centos65 mysql-test]#

Revision history for this message
Nilnandan Joshi (nilnandan-joshi) wrote :

Reproduce same with PS 5.5.40

[root@centos65 mysql-test]# ./mtr analyze
Logging: ./mtr analyze
mysql-test-run: *** ERROR: Could not find any of /usr/share/mysql/charsets /usr/sql/share/charsets /usr/share/charsets
[root@centos65 mysql-test]#
[root@centos65 mysql-test]# ln -s /usr/share/percona-server/charsets /usr/share/mysql
[root@centos65 mysql-test]#
[root@centos65 mysql-test]# ./mtr analyze
Logging: ./mtr analyze
141126 13:05:13 [ERROR] Can't find messagefile '/usr/share/mysql/errmsg.sys'
141126 13:05:13 [Note] Plugin 'FEDERATED' is disabled.
MySQL Version 5.5.40
Checking supported features...
 - SSL connections supported
Collecting tests...
Removing old var directory...
Creating var directory '/usr/share/mysql-test/var'...
Installing system database...
 - from '/usr/mysql-test/lib/init_db.sql'
mysql-test-run: *** ERROR: Can't open '/usr/mysql-test/lib/init_db.sql': No such file or directory
[root@centos65 mysql-test]#
[root@centos65 mysql-test]# rpm -qa | -i percona
-bash: -i: command not found
[root@centos65 mysql-test]# rpm -qa | grep -i percona
Percona-Server-server-55-5.5.40-rel36.1.el6.x86_64
Percona-Server-shared-55-5.5.40-rel36.1.el6.x86_64
percona-xtrabackup-2.2.3-4982.el6.x86_64
Percona-Server-client-55-5.5.40-rel36.1.el6.x86_64
percona-testing-0.0-1.noarch
percona-toolkit-2.2.9-1.noarch
Percona-Server-test-55-5.5.40-rel36.1.el6.x86_64
percona-release-0.0-1.x86_64
[root@centos65 mysql-test]#

Revision history for this message
Tomislav Plavcic (tplavcic) wrote :

This one is related (not duplicate) to this: https://bugs.launchpad.net/percona-server/+bug/1296187
and there's an explanation in the comments for why the directory name was changed from mysql to percona-server - so that mysql-libs can be installed along side PS packages.
Need to check if it makes sense to do changes in mtr code and also is it possible to rename directory back - I don't think that's an option right now because we don't replace mysql-libs, for that to change and work (because of issue with multiple obsoletes) we need yum repository per product/version.

Revision history for this message
monty solomon (monty+launchpad) wrote :

Nilnandan,

You used a different link than was provided in the original description.

Valerii used

ln -s /usr/share/percona-server /usr/share/mysql

and you used

ln -s /usr/share/percona-server/charsets /usr/share/mysql

Revision history for this message
monty solomon (monty+launchpad) wrote :

Tomislav,

mysql-libs can't be installed in parallel with the PS packages ...

Transaction Check Error:
  file /usr/lib64/mysql/libmysqlclient.so.20.2.0 from install of mysql-community-libs-5.7.11-1.el6.x86_64 conflicts with file from package Percona-Server-shared-57-5.7.11-4.1.el6.x86_64

Revision history for this message
Valerii Kravchuk (valerii-kravchuk) wrote :

From what I see it's fixed in 5.7.18 at least:

[root@centos mysql-test]# ls -l ./mtr
lrwxrwxrwx. 1 root root 19 Jun 7 18:20 ./mtr -> ./mysql-test-run.pl
[root@centos mysql-test]# perl ./mtr analyze
Logging: ./mtr analyze
MySQL Version 5.7.18
Checking supported features...
 - SSL connections supported
Collecting tests...
Checking leftover processes...
Removing old var directory...
Creating var directory '/usr/share/mysql-test/var'...
Installing system database...
Using parallel: 1

==============================================================================

TEST RESULT TIME (ms) or COMMENT
--------------------------------------------------------------------------

worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
worker[1] mysql-test-run: WARNING: running this script as _root_ will cause some tests to be skipped
main.analyze [ pass ] 10920
--------------------------------------------------------------------------
The servers were restarted 0 times
Spent 10.920 of 58 seconds executing testcases

Completed: All 1 tests were successful.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-852

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.