dpkg: percona-server-server-5.7.postinst fail to find the right MYSQLDATA
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.5 |
Fix Released
|
High
|
EvgeniyPatlan | |||
5.6 |
Fix Released
|
High
|
EvgeniyPatlan | |||
5.7 |
Fix Released
|
High
|
EvgeniyPatlan |
Bug Description
On debian jessie, I have :
root@test:~# grep -v '^#' /etc/mysql/my.cnf
!includedir /etc/mysql/
!includedir /etc/mysql/conf.d/
root@test:~# grep datadir /etc/mysql/
/etc/mysql/
root@test:~# grep datadir /etc/mysql/conf.d/*
datadir = /space/mysql
so the right datadir is /space/mysql.
From https:/
If multiple instances of a given option are found, the last instance takes precedence, with one
exception: For mysqld, the first instance of the --user option is used as a security precaution, to
prevent a user specified in an option file from being overridden on the command line.
In /var/lib/
MYSQLDATA=
root@test:~# my_print_defaults mysqld | grep datadir | cut -d= -f2
/var/lib/mysql
/space/mysql
In /var/lib/
[ ! "$(ls -A ${MYSQLDATA})" ]
but :
root@test:~# ls -A /space/mysql
root@test:~# ls -A /var/lib/mysql /space/mysql
/space/mysql:
/var/lib/mysql:
So the test fail even if the datadir is empty.
What I propose :
MYSQLDATA=
root@test:~# my_print_defaults mysqld | grep -- '--datadir=' | tail -n 1 | cut -d= -f2
/space/mysql
--
Regards
Changed in percona-server: | |
assignee: | nobody → Sveta Smirnova (svetasmirnova) |
root@test:~# cat /etc/apt/ sources. list.d/ percona. list repo.percona. com/apt jessie main
deb http://
root@test:~# dpkg -l percona- server- server- 5.7 Unknown/ Install/ Remove/ Purge/Hold Not/Inst/ Conf-files/ Unpacked/ halF-conf/ Half-inst/ trig-aWait/ Trig-pend /Reinst- required (Status,Err: uppercase=bad) ======= ======= ======= ======= ======= ======= ==-==== ======= ======= ======= ===-=== ======= ======= ======= ====-== ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ====== server- server- 5.7 5.7.18-15-1.jessie amd64 Percona Server database server binaries
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Architecture Description
+++-===
ii percona-