RPM installer fails in version 5.5.32-31.0

Bug #1201036 reported by monty solomon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
High
Ignacio Nin
5.1
Fix Released
High
Ignacio Nin
5.5
Fix Released
High
Ignacio Nin
5.6
Fix Released
High
Ignacio Nin

Bug Description

Changes made to the RPM scripts for version 5.5.32-31.0 break the installation.

# yum -y install Percona-Server-server-55 Percona-Server-client-55 Percona-Server-devel-55 Percona-Server-shared-55
Loaded plugins: downloadonly, fastestmirror, replace
Loading mirror speeds from cached hostfile
 * base: mirrors.seas.harvard.edu
 * epel: mirror.us.leaseweb.net
 * extras: mirror.clarkson.edu
 * ius: mirror.symnds.com
 * updates: mirror.atlanticmetro.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package Percona-Server-client-55.x86_64 0:5.5.32-rel31.0.549.rhel6 will be installed
---> Package Percona-Server-devel-55.x86_64 0:5.5.32-rel31.0.549.rhel6 will be installed
---> Package Percona-Server-server-55.x86_64 0:5.5.32-rel31.0.549.rhel6 will be installed
---> Package Percona-Server-shared-55.x86_64 0:5.5.32-rel31.0.549.rhel6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================
 Package Arch Version Repository Size
======================================================================================================
Installing:
 Percona-Server-client-55 x86_64 5.5.32-rel31.0.549.rhel6 percona 6.3 M
 Percona-Server-devel-55 x86_64 5.5.32-rel31.0.549.rhel6 percona 2.8 M
 Percona-Server-server-55 x86_64 5.5.32-rel31.0.549.rhel6 percona 15 M
 Percona-Server-shared-55 x86_64 5.5.32-rel31.0.549.rhel6 percona 647 k

Transaction Summary
======================================================================================================
Install 4 Package(s)

Total download size: 25 M
Installed size: 104 M
Downloading Packages:
(1/4): Percona-Server-client-55-5.5.32-rel31.0.549.rhel6.x86_64.rpm | 6.3 MB 00:00
(2/4): Percona-Server-devel-55-5.5.32-rel31.0.549.rhel6.x86_64.rpm | 2.8 MB 00:00
(3/4): Percona-Server-server-55-5.5.32-rel31.0.549.rhel6.x86_64.rpm | 15 MB 00:00
(4/4): Percona-Server-shared-55-5.5.32-rel31.0.549.rhel6.x86_64.rpm | 647 kB 00:00
------------------------------------------------------------------------------------------------------
Total 18 MB/s | 25 MB 00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : Percona-Server-shared-55-5.5.32-rel31.0.549.rhel6.x86_64 1/4
  Installing : Percona-Server-client-55-5.5.32-rel31.0.549.rhel6.x86_64 2/4
  Installing : Percona-Server-server-55-5.5.32-rel31.0.549.rhel6.x86_64 3/4
Non-fatal POSTIN scriptlet failure in rpm package Percona-Server-server-55-5.5.32-rel31.0.549.rhel6.x86_64
/var/tmp/rpm-tmp.WBqYRq: line 105: [: /opt/mysql/dbdata1/test: binary operator expected
/var/tmp/rpm-tmp.WBqYRq: line 124: [: /opt/mysql/dbdata1/test: binary operator expected
/var/tmp/rpm-tmp.xFq5FU: line 19: [: /opt/mysql/dbdata1/test: binary operator expected
/var/tmp/rpm-tmp.xFq5FU: line 29: [: /opt/mysql/dbdata1/test: binary operator expected
/var/tmp/rpm-tmp.xFq5FU: line 31: [: /opt/mysql/dbdata1/test: binary operator expected
/var/tmp/rpm-tmp.xFq5FU: line 35: /opt/mysql/dbdata1/test
/opt/mysql/dbdata1/test/RPM_UPGRADE_MARKER: No such file or directory
/var/tmp/rpm-tmp.xFq5FU: line 56: test: /opt/mysql/dbdata1/test: binary operator expected
chmod: cannot access `/opt/mysql/dbdata1/test/mysql': No such file or directory
Percona Server is distributed with several useful UDF (User Defined Function) from Maatkit.
Run the following commands to create these functions:
mysql -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'"
mysql -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'"
mysql -e "CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'"
See http://code.google.com/p/maatkit/source/browse/trunk/udf for more details
/var/tmp/rpm-tmp.xFq5FU: line 145: /opt/mysql/dbdata1/test
/opt/mysql/dbdata1/test/RPM_UPGRADE_MARKER: No such file or directory
/var/tmp/rpm-tmp.xFq5FU: line 146: /opt/mysql/dbdata1/test
/opt/mysql/dbdata1/test/RPM_UPGRADE_MARKER: No such file or directory
/var/tmp/rpm-tmp.xFq5FU: line 147: /opt/mysql/dbdata1/test
/opt/mysql/dbdata1/test/RPM_UPGRADE_MARKER: No such file or directory
/var/tmp/rpm-tmp.xFq5FU: line 149: /opt/mysql/dbdata1/test
/opt/mysql/dbdata1/test/RPM_UPGRADE_HISTORY: No such file or directory
mv: target `/opt/mysql/dbdata1/test/RPM_UPGRADE_MARKER-LAST' is not a directory
warning: %post(Percona-Server-server-55-5.5.32-rel31.0.549.rhel6.x86_64) scriptlet failed, exit status 1
  Installing : Percona-Server-devel-55-5.5.32-rel31.0.549.rhel6.x86_64 4/4
  Verifying : Percona-Server-server-55-5.5.32-rel31.0.549.rhel6.x86_64 1/4
  Verifying : Percona-Server-devel-55-5.5.32-rel31.0.549.rhel6.x86_64 2/4
  Verifying : Percona-Server-shared-55-5.5.32-rel31.0.549.rhel6.x86_64 3/4
  Verifying : Percona-Server-client-55-5.5.32-rel31.0.549.rhel6.x86_64 4/4

Installed:
  Percona-Server-client-55.x86_64 0:5.5.32-rel31.0.549.rhel6
  Percona-Server-devel-55.x86_64 0:5.5.32-rel31.0.549.rhel6
  Percona-Server-server-55.x86_64 0:5.5.32-rel31.0.549.rhel6
  Percona-Server-shared-55.x86_64 0:5.5.32-rel31.0.549.rhel6

Complete!

Tags: pkg

Related branches

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

Non-standard directories are used.

[mysqld]
user = mysql
pid-file = /opt/mysql/dbprod/test.pid
socket = /opt/mysql/dbprod/test.sock
datadir = /opt/mysql/dbdata1/test
log_error = /opt/mysql/dblogs1/test/gen/error.log

Revision history for this message
monty solomon (monty+launchpad) wrote :
Download full text (5.4 KiB)

The installation works using the 5.5.31 RPMs even though some junk is left in the /var/lib/msyql directory

# yum -y install Percona-Server-{server,client,devel,shared}-55*
Loaded plugins: downloadonly, fastestmirror, replace
Loading mirror speeds from cached hostfile
 * base: mirror.solarvps.com
 * epel: mirror.us.leaseweb.net
 * extras: mirror.ash.fastserv.com
 * ius: mirror.symnds.com
 * updates: mirror.atlanticmetro.net
Setting up Install Process
Examining Percona-Server-server-55-5.5.31-rel30.3.520.rhel6.x86_64.rpm: Percona-Server-server-55-5.5.31-rel30.3.520.rhel6.x86_64
Marking Percona-Server-server-55-5.5.31-rel30.3.520.rhel6.x86_64.rpm to be installed
Examining Percona-Server-client-55-5.5.31-rel30.3.520.rhel6.x86_64.rpm: Percona-Server-client-55-5.5.31-rel30.3.520.rhel6.x86_64
Marking Percona-Server-client-55-5.5.31-rel30.3.520.rhel6.x86_64.rpm to be installed
Examining Percona-Server-devel-55-5.5.31-rel30.3.520.rhel6.x86_64.rpm: Percona-Server-devel-55-5.5.31-rel30.3.520.rhel6.x86_64
Marking Percona-Server-devel-55-5.5.31-rel30.3.520.rhel6.x86_64.rpm to be installed
Examining Percona-Server-shared-55-5.5.31-rel30.3.520.rhel6.x86_64.rpm: Percona-Server-shared-55-5.5.31-rel30.3.520.rhel6.x86_64
Marking Percona-Server-shared-55-5.5.31-rel30.3.520.rhel6.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package Percona-Server-client-55.x86_64 0:5.5.31-rel30.3.520.rhel6 will be installed
---> Package Percona-Server-devel-55.x86_64 0:5.5.31-rel30.3.520.rhel6 will be installed
---> Package Percona-Server-server-55.x86_64 0:5.5.31-rel30.3.520.rhel6 will be installed
---> Package Percona-Server-shared-55.x86_64 0:5.5.31-rel30.3.520.rhel6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================
 Package
      Arch Version Repository Size
======================================================================================================
Installing:
 Percona-Server-client-55
      x86_64 5.5.31-rel30.3.520.rhel6 /Percona-Server-client-55-5.5.31-rel30.3.520.rhel6.x86_64 29 M
 Percona-Server-devel-55
      x86_64 5.5.31-rel30.3.520.rhel6 /Percona-Server-devel-55-5.5.31-rel30.3.520.rhel6.x86_64 7.3 M
 Percona-Server-server-55
      x86_64 5.5.31-rel30.3.520.rhel6 /Percona-Server-server-55-5.5.31-rel30.3.520.rhel6.x86_64 64 M
 Percona-Server-shared-55
      x86_64 5.5.31-rel30.3.520.rhel6 /Percona-Server-shared-55-5.5.31-rel30.3.520.rhel6.x86_64 3.0 M

Transaction Summary
======================================================================================================
Install 4 Package(s)

Total size: 104 M
Installed size: 104 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : Percona-Server-shared-55-5.5.31-rel30.3.520.rhel6.x86_64 1/4
  Installing : Percona-Server-client-55-5.5.31-rel30.3.520.rhel6.x86_64 2/4
  Installing : Percona-Server-server-55-5.5.31-rel30.3.520.rhel6....

Read more...

Revision history for this message
monty solomon (monty+launchpad) wrote :
Download full text (8.1 KiB)

Here is the install output with PERCONA_DEBUG set to 1

# yum -y install Percona-Server-client-55 Percona-Server-devel-55 Percona-Server-server-55 Percona-Server-shared-55
Loaded plugins: downloadonly, fastestmirror, replace
Loading mirror speeds from cached hostfile
 * base: mirror.solarvps.com
 * epel: mirror.us.leaseweb.net
 * extras: mirror.ash.fastserv.com
 * ius: mirror.symnds.com
 * updates: mirror.solarvps.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package Percona-Server-client-55.x86_64 0:5.5.32-rel31.0.549.rhel6 will be installed
---> Package Percona-Server-devel-55.x86_64 0:5.5.32-rel31.0.549.rhel6 will be installed
---> Package Percona-Server-server-55.x86_64 0:5.5.32-rel31.0.549.rhel6 will be installed
---> Package Percona-Server-shared-55.x86_64 0:5.5.32-rel31.0.549.rhel6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================
 Package Arch Version Repository Size
======================================================================================================
Installing:
 Percona-Server-client-55 x86_64 5.5.32-rel31.0.549.rhel6 percona 6.3 M
 Percona-Server-devel-55 x86_64 5.5.32-rel31.0.549.rhel6 percona 2.8 M
 Percona-Server-server-55 x86_64 5.5.32-rel31.0.549.rhel6 percona 15 M
 Percona-Server-shared-55 x86_64 5.5.32-rel31.0.549.rhel6 percona 647 k

Transaction Summary
======================================================================================================
Install 4 Package(s)

Total download size: 25 M
Installed size: 104 M
Downloading Packages:
(1/4): Percona-Server-client-55-5.5.32-rel31.0.549.rhel6.x86_64.rpm | 6.3 MB 00:00
(2/4): Percona-Server-devel-55-5.5.32-rel31.0.549.rhel6.x86_64.rpm | 2.8 MB 00:00
(3/4): Percona-Server-server-55-5.5.32-rel31.0.549.rhel6.x86_64.rpm | 15 MB 00:00
(4/4): Percona-Server-shared-55-5.5.32-rel31.0.549.rhel6.x86_64.rpm | 647 kB 00:00
------------------------------------------------------------------------------------------------------
Total 19 MB/s | 25 MB 00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : Percona-Server-shared-55-5.5.32-rel31.0.549.rhel6.x86_64 1/4
  Installing : Percona-Server-client-55-5.5.32-rel31.0.549.rhel6.x86_64 2/4
  Installing : Percona-Server-server-55-5.5.32-rel31.0.549.rhel6.x86_64 3/4
Non-fatal POSTIN scriptlet failure in rpm package Percona-Server-server-55-5.5.32-rel31.0.549.rhel6.x86_64
/var/tmp/rpm-tmp.pdaUUf: line 105: [: /opt/mysql/dbdata1/test: binary operator expected
/var/tmp/rpm-tmp.pdaUUf: line 124: [: /opt/mysql/dbdata1/test: binary operator expected
+ '[' -x /usr/bin/my_pr...

Read more...

Revision history for this message
monty solomon (monty+launchpad) wrote :
Download full text (56.4 KiB)

Here is the verbose output when running rpm

# rpm -ivvvf Percona-Server-{client,devel,server,shared}-55*
D: ============== Percona-Server-client-55-5.5.32-rel31.0.549.rhel6.x86_64.rpm
D: loading keyring from pubkeys in /var/lib/rpm/pubkeys/*.key
D: couldn't find any keys in /var/lib/rpm/pubkeys/*.key
D: loading keyring from rpmdb
D: opening db environment /var/lib/rpm cdb:mpool:joinenv
D: opening db index /var/lib/rpm/Packages rdonly mode=0x0
D: locked db index /var/lib/rpm/Packages
D: opening db index /var/lib/rpm/Name rdonly mode=0x0
D: read h# 426 Header sanity check: OK
D: added key gpg-pubkey-9cd4953f-4a9da118 to keyring
D: read h# 427 Header sanity check: OK
D: added key gpg-pubkey-c105b9de-4e0fd3a3 to keyring
D: read h# 428 Header sanity check: OK
D: added key gpg-pubkey-d0ff3d16-4e0fd442 to keyring
D: read h# 429 Header sanity check: OK
D: added key gpg-pubkey-fe837f6f-4e0fd77e to keyring
D: read h# 430 Header sanity check: OK
D: added key gpg-pubkey-ef1d6db8-4e0fd7f0 to keyring
D: read h# 431 Header sanity check: OK
D: added key gpg-pubkey-0608b895-4bd22942 to keyring
D: read h# 432 Header sanity check: OK
D: added key gpg-pubkey-4bd6ec30-4ff1e4fa to keyring
D: Using legacy gpg-pubkey(s) from rpmdb
D: Expected size: 6585508 = lead(96)+sigs(356)+pad(4)+data(6585052)
D: Actual size: 6585508
warning: Percona-Server-client-55-5.5.32-rel31.0.549.rhel6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY
D: ========== relocations
D: added binary package [0]
D: ============== Percona-Server-devel-55-5.5.32-rel31.0.549.rhel6.x86_64.rpm
D: Expected size: 2938288 = lead(96)+sigs(356)+pad(4)+data(2937832)
D: Actual size: 2938288
D: Percona-Server-devel-55-5.5.32-rel31.0.549.rhel6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY
D: added binary package [1]
D: ============== Percona-Server-server-55-5.5.32-rel31.0.549.rhel6.x86_64.rpm
D: Expected size: 15970672 = lead(96)+sigs(356)+pad(4)+data(15970216)
D: Actual size: 15970672
D: Percona-Server-server-55-5.5.32-rel31.0.549.rhel6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY
D: added binary package [2]
D: ============== Percona-Server-shared-55-5.5.32-rel31.0.549.rhel6.x86_64.rpm
D: Expected size: 662844 = lead(96)+sigs(356)+pad(4)+data(662388)
D: Actual size: 662844
D: Percona-Server-shared-55-5.5.32-rel31.0.549.rhel6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY
D: added binary package [3]
D: found 0 source and 4 binary packages
D: ========== +++ Percona-Server-client-55-5.5.32-rel31.0.549.rhel6 x86_64/linux 0x2
D: opening db index /var/lib/rpm/Basenames rdonly mode=0x0
D: read h# 19 Header V3 RSA/SHA1 Signature, key ID c105b9de: OK
D: Requires: /bin/sh YES (db files)
D: read h# 544 Header V3 RSA/SHA1 Signature, key ID c105b9de: OK
D: Requires: /usr/bin/perl YES (db files)
D: Requires: Percona-Server-shared-55 YES (added provide)
D: opening db index /var/lib/rpm/Providename rdonly mode=0x0
D: read h# ...

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

Please, send the output of:

uname -a
cat /etc/issue

from your system

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

$ uname -a
Linux 2.6.32-279.19.1.el6.x86_64 #1 SMP Wed Dec 19 07:05:20 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/issue
CentOS release 6.3 (Final)
Kernel \r on an \m

Revision history for this message
Valerii Kravchuk (valerii-kravchuk) wrote :
Download full text (4.8 KiB)

Please, send the output of:

/bin/sh --version
ls -l /bin | grep sh

I can not repeat on CentOS 6.4:

[root@centos openxs]# rpm -q -a | grep -i percona
Percona-Server-shared-compat-5.5.32-rel31.0.549.rhel6.x86_64
Percona-Server-55-debuginfo-5.5.32-rel31.0.549.rhel6.x86_64
percona-release-0.0-1.x86_64
[root@centos openxs]# yum -y install Percona-Server-server-55 Percona-Server-client-55 Percona-Server-devel-55 Percona-Server-shared-55
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: ftp.tlk-l.net
 * epel: ftp.tlk-l.net
 * extras: ftp.tlk-l.net
 * rpmforge: ftp.colocall.net
 * updates: ftp.tlk-l.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package Percona-Server-client-55.x86_64 0:5.5.32-rel31.0.549.rhel6 will be installed
---> Package Percona-Server-devel-55.x86_64 0:5.5.32-rel31.0.549.rhel6 will be installed
---> Package Percona-Server-server-55.x86_64 0:5.5.32-rel31.0.549.rhel6 will be installed
---> Package Percona-Server-shared-55.x86_64 0:5.5.32-rel31.0.549.rhel6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package Arch Version Repository
                                                                           Size
================================================================================
Installing:
 Percona-Server-client-55 x86_64 5.5.32-rel31.0.549.rhel6 percona 6.3 M
 Percona-Server-devel-55 x86_64 5.5.32-rel31.0.549.rhel6 percona 2.8 M
 Percona-Server-server-55 x86_64 5.5.32-rel31.0.549.rhel6 percona 15 M
 Percona-Server-shared-55 x86_64 5.5.32-rel31.0.549.rhel6 percona 647 k

Transaction Summary
================================================================================
Install 4 Package(s)

Total download size: 25 M
Installed size: 104 M
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 25 M
(1/4): Percona-Server-client-55-5.5.32-rel31.0.549.rhel6 | 6.3 MB 00:14
(2/4): Percona-Server-devel-55-5.5.32-rel31.0.549.rhel6. | 2.8 MB 00:05
(3/4): Percona-Server-server-55-5.5.32-rel31.0.549.rhel6 | 15 MB 00:29
(4/4): Percona-Server-shared-55-5.5.32-rel31.0.549.rhel6 | 647 kB 00:01
--------------------------------------------------------------------------------
Total 479 kB/s | 25 MB 00:53
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : Percona-Server-shared-55-5.5.32-rel31.0.549.rhel6.x86_64 1/4
  Installing : Percona-Server-client-55-5.5.32-rel31.0.549.rhel6.x86_64 2/4
  Installing : Percona-Server-server-55-5.5.32-rel31.0.549.rhel6.x86_64 3/4
ls: cannot access /var/lib/mysql/*.err: No such file or directory
ls: cannot access /var/lib/mysql/*.err: No such file or directory
Percona Server is distributed with several useful UDF (User Defined Function) from Maatkit.
Run the following commands to create these functions:
mysql -e "CREATE FUNC...

Read more...

Changed in percona-server:
status: New → Incomplete
Revision history for this message
monty solomon (monty+launchpad) wrote :

Did you use a non-standard datadir in your configuration?

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

# /bin/sh --version
GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

# ls -l /bin | grep sh
-rwxr-xr-x 1 root root 903240 May 10 2012 bash
lrwxrwxrwx 1 root root 4 Feb 4 04:28 csh -> tcsh
-rwxr-xr-x 1 root root 106440 Aug 18 2010 dash
lrwxrwxrwx 1 root root 4 Feb 4 04:24 sh -> bash
-rwxr-xr-x 1 root root 387080 May 23 2012 tcsh

Changed in percona-server:
status: Incomplete → New
Revision history for this message
Ignacio Nin (ignacio-nin) wrote :

Monty,

From the output I see that the script is getting a scrambled mysql_datadir:

mysql_datadir='/opt/mysql/dbdata1/test
/opt/mysql/dbdata1/test'

which is the source of the test commands failing. I tried with this my.cnf:

[mysqld]
user = mysql
pid-file= /opt/mysql/dbprod/test.pid
socket = /opt/mysql/dbprod/test.sock
datadir = /opt/mysql/dbdata1/test
log_error = /opt/mysql/dblogs1/test/gen/error.log

however my my_print_defaults works correctly:

# my_print_defaults server mysqld
--user=mysql
--pid-file=/opt/mysql/dbprod/test.pid
--socket=/opt/mysql/dbprod/test.sock
--datadir=/opt/mysql/dbdata1/test
--log_error=/opt/mysql/dblogs1/test/gen/error.log

producing the expected mysql_datadir:

# my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p'
/opt/mysql/dbdata1/test

Can you provide the output of the my_print_defaults for you? In case it's different than this and it's got the double output, please provide the full output of my_print_defaults and the relevant my.cnf parts so we can reproduce it.

Thanks!

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

I think I found the source of the problem - the RPM script is not following the rule that when multiple instances of a given option are found, the last instance takes precedence.

My /etc/my.cnf file ends with an include directive

<!includedir /etc/mysql/conf.d/>

and the /etc/mysql/conf.d/001-basic-config.cnf file contains a duplicate datadir entry

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

Do you have enough information to reproduce the problem?

Do you need anything more?

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

Please, send the output of:

grep datadir /etc/mysql/conf.d/001-basic-config.cnf

Revision history for this message
monty solomon (monty+launchpad) wrote :
Download full text (7.8 KiB)

# grep datadir /etc/my.cnf /etc/mysql/conf.d/001-basic-config.cnf
/etc/my.cnf:datadir = /opt/mysql/dbdata1/test-q0
/etc/mysql/conf.d/001-basic-config.cnf:datadir = /opt/mysql/dbdata1/test-q0

# my_print_defaults server mysqld | grep datadir
--datadir=/opt/mysql/dbdata1/test-q0
--datadir=/opt/mysql/dbdata1/test-q0

# yum -y install Percona-Server-server-55
Loaded plugins: downloadonly, fastestmirror, replace
Loading mirror speeds from cached hostfile
 * base: mirror.cogentco.com
 * epel: mirror.symnds.com
 * extras: centos.someimage.com
 * ius: mirror.symnds.com
 * updates: mirror.umd.edu
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package Percona-Server-server-55.x86_64 0:5.5.32-rel31.0.549.rhel6 will be installed
--> Processing Dependency: Percona-Server-shared-55 for package: Percona-Server-server-55-5.5.32-rel31.0.549.rhel6.x86_64
--> Processing Dependency: Percona-Server-client-55 for package: Percona-Server-server-55-5.5.32-rel31.0.549.rhel6.x86_64
--> Running transaction check
---> Package Percona-Server-client-55.x86_64 0:5.5.32-rel31.0.549.rhel6 will be installed
---> Package Percona-Server-shared-55.x86_64 0:5.5.32-rel31.0.549.rhel6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package Arch Version Repository
                                                                           Size
================================================================================
Installing:
 Percona-Server-server-55 x86_64 5.5.32-rel31.0.549.rhel6 percona 15 M
Installing for dependencies:
 Percona-Server-client-55 x86_64 5.5.32-rel31.0.549.rhel6 percona 6.3 M
 Percona-Server-shared-55 x86_64 5.5.32-rel31.0.549.rhel6 percona 647 k

Transaction Summary
================================================================================
Install 3 Package(s)

Total download size: 22 M
Installed size: 97 M
Downloading Packages:
(1/3): Percona-Server-client-55-5.5.32-rel31.0.549.rhel6 | 6.3 MB 00:00
(2/3): Percona-Server-server-55-5.5.32-rel31.0.549.rhel6 | 15 MB 00:00
(3/3): Percona-Server-shared-55-5.5.32-rel31.0.549.rhel6 | 647 kB 00:00
--------------------------------------------------------------------------------
Total 17 MB/s | 22 MB 00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : Percona-Server-shared-55-5.5.32-rel31.0.549.rhel6.x86_64 1/3
  Installing : Percona-Server-client-55-5.5.32-rel31.0.549.rhel6.x86_64 2/3
  Installing : Percona-Server-server-55-5.5.32-rel31.0.549.rhel6.x86_64 3/3
Non-fatal POSTIN scriptlet failure in rpm package Percona-Server-server-55-5.5.32-rel31.0.549.rhel6.x86_64
/var/tmp/rpm-tmp.gPgSse: line 105: [: /opt/mysql/dbdata1/test-q0: binary operator expected
/var/tmp/rpm-tmp.gPgSse: line 124: [: /opt/mysql/dbdata1/test-q0: binary operator expected
+ '[' -x /usr/bin/my_print_defaults ']'
++ grep '^--datadir='
++ /usr/bin/my_print_def...

Read more...

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

Tried to reproduce with CentOS 6.4 and Percona-Server-server-55-5.5.32

[root@dhcppc4 ~]# cat /etc/my.cnf
[mysqld]
#user = mysql
pid-file = /opt/mysql/dbprod/test.pid
socket = /opt/mysql/dbprod/test.sock
datadir = /opt/mysql/dbdata1/test
log_error = /opt/mysql/dblogs1/test/gen/error.log
!includedir /etc/mysql/
[root@dhcppc4 ~]#

[root@dhcppc4 ~]# ll /etc/mysql
total 4
-rw-r--r--. 1 root root 182 Jul 17 18:25 001-basic-config.cnf

[root@dhcppc4 ~]# cat /etc/mysql/001-basic-config.cnf
[mysqld]
#user = mysql
pid-file = /opt/mysql/dbprod/test.pid
socket = /opt/mysql/dbprod/test.sock
datadir = /opt/mysql/dbdata1/test
log_error = /opt/mysql/dblogs1/test/gen/error.log
[root@dhcppc4 ~]#

[root@dhcppc4 ~]# rpm -ivh Percona-Server-client-55-5.5.32-rel31.0.549.rhel6.x86_64.rpm Percona-Server-devel-55-5.5.32-rel31.0.549.rhel6.x86_64.rpm Percona-Server-server-55-5.5.32-rel31.0.549.rhel6.x86_64.rpm Percona-Server-shared-55-5.5.32-rel31.0.549.rhel6.x86_64.rpm
Preparing... ########################################### [100%]
   1:Percona-Server-shared-5########################################### [ 25%]
   2:Percona-Server-client-5########################################### [ 50%]
/var/tmp/rpm-tmp.AGK0tb: line 105: [: /opt/mysql/dbdata1/test: binary operator expected
Your MySQL directory '/opt/mysql/dbdata1/test
/opt/mysql/dbdata1/test' has more than one PID file:
ls: cannot access /opt/mysql/dbdata1/test/*.pid: No such file or directory
drwx------. 4 mysql mysql 4096 Jul 17 18:36 /opt/mysql/dbdata1/test
Please check which one (if any) corresponds to a running server
and delete all others before repeating the MySQL upgrade.
error: %pre(Percona-Server-server-55-5.5.32-rel31.0.549.rhel6.x86_64) scriptlet failed, exit status 1
error: install: %pre scriptlet failed (2), skipping Percona-Server-server-55-5.5.32-rel31.0.549.rhel6
   3:Percona-Server-devel-55########################################### [ 75%]
[root@dhcppc4 ~]#

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

Same with PS 5.6 but couldn't able to reproduce it with 5.1.70.

warning: %post(Percona-Server-server-56-5.6.12-rc60.4.393.rhel6.x86_64) scriptlet failed, exit status 1
  Installing : Percona-Server-devel-56-5.6.12-rc60.4.393.rhel6.x86_64 4/4
  Verifying : Percona-Server-client-56-5.6.12-rc60.4.393.rhel6.x86_64 1/4
  Verifying : Percona-Server-devel-56-5.6.12-rc60.4.393.rhel6.x86_64 2/4
  Verifying : Percona-Server-server-56-5.6.12-rc60.4.393.rhel6.x86_64 3/4
  Verifying : Percona-Server-shared-56-5.6.12-rc60.4.393.rhel6.x86_64 4/4

Installed:
  Percona-Server-client-56.x86_64 0:5.6.12-rc60.4.393.rhel6 Percona-Server-devel-56.x86_64 0:5.6.12-rc60.4.393.rhel6
  Percona-Server-server-56.x86_64 0:5.6.12-rc60.4.393.rhel6 Percona-Server-shared-56.x86_64 0:5.6.12-rc60.4.393.rhel6

Complete!

Revision history for this message
Ignacio Nin (ignacio-nin) wrote :

Confirmed for 5.1 (using PERCONA_DEBUG) even if installation doesn't fail.

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

There appears to still be a problem with the RPM script.

When yum upgrade is run the script is supposed to return the service to the state it was in before the upgrade.

Executing yum upgrade on a running Percona server does not restart the service.

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

I think this problem of no service restart should be a topic for a new bug report.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Which is bug 1311840.

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-690

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.