Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[percona] update percona-server version #5871

Merged
merged 1 commit into from
May 8, 2019
Merged

[percona] update percona-server version #5871

merged 1 commit into from
May 8, 2019

Conversation

EvgeniyPatlan
Copy link
Contributor

No description provided.

@yosifkit
Copy link
Member

yosifkit commented May 7, 2019

Diff:
diff --git a/_bashbrew-list b/_bashbrew-list
index 1a3eb69..8a6592c 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -12,8 +12,8 @@ percona:8
 percona:8-centos
 percona:8.0
 percona:8.0-centos
-percona:8.0.15-5
-percona:8.0.15-5-centos
+percona:8.0.15-6
+percona:8.0.15-6-centos
 percona:centos
 percona:latest
 percona:psmdb-3.6
@@ -27,4 +27,4 @@ percona:ps-5.7
 percona:ps-5.7.25
 percona:ps-8
 percona:ps-8.0
-percona:ps-8.0.15-5
+percona:ps-8.0.15-6
diff --git a/percona_ps-8/Dockerfile b/percona_ps-8/Dockerfile
index 2af389b..4cc3be4 100644
--- a/percona_ps-8/Dockerfile
+++ b/percona_ps-8/Dockerfile
@@ -19,7 +19,7 @@ RUN export GNUPGHOME="$(mktemp -d)" \
 	&& percona-release enable ps-80 release
 
 # install exact version of PS for repeatability
-ENV PERCONA_VERSION 8.0.15-5.1.el7
+ENV PERCONA_VERSION 8.0.15-6.1.el7
 
 RUN yum install -y \
 		percona-server-server-${PERCONA_VERSION} \
diff --git a/percona_ps-8/ps-entry.sh b/percona_ps-8/ps-entry.sh
index 1923905..6b7afa4 100755
--- a/percona_ps-8/ps-entry.sh
+++ b/percona_ps-8/ps-entry.sh
@@ -117,7 +117,7 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
 		"$@" --skip-networking --socket="${SOCKET}" &
 		pid="$!"
 
-		mysql=( mysql --protocol=socket -uroot -hlocalhost --socket="${SOCKET}" )
+		mysql=( mysql --protocol=socket -uroot -hlocalhost --socket="${SOCKET}" --password="" )
 
 		for i in {120..0}; do
 			if echo 'SELECT 1' | "${mysql[@]}" &> /dev/null; then
@@ -216,6 +216,12 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
 		echo 'MySQL init process done. Ready for start up.'
 		echo
 	fi
+
+  # exit when MYSQL_INIT_ONLY environment variable is set to avoid starting mysqld
+  if [ ! -z "$MYSQL_INIT_ONLY" ]; then
+      echo 'Initialization complete, now exiting!'
+      exit 0
+  fi
 fi
 
 exec "$@"

@yosifkit
Copy link
Member

yosifkit commented May 7, 2019

We've been very hesitant to add extra options like MYSQL_INIT_ONLY for MariaDB and MySQL (see MariaDB/mariadb-docker#192, docker-library/mysql#357, and docker-library/mysql#423) since each knob provided to users increases the maintenance burden of the image and makes it harder to reject further configuration knobs.

We've been discussing a full rework of the entrypoint scripts for MySQL, MariaDB, and PostgreSQL to allow broader user customization if you would like to include Percona in that discussion, we would welcome input on docker-library/mysql#471. This comment links to the spreadsheet of proposed bash functions that users would be able to utilize. Example customized usage is in docker-library/postgres#496 though the function names will be out of sync with the spreadsheet.

You are welcome to keep the MYSQL_INIT_ONLY variable, I'm only trying to provide a wider perspective of the implications that this would have on the other SQL images since they would be unlikely to add this variable.

@delgod
Copy link
Contributor

delgod commented May 8, 2019

@yosifkit thank you!

I will rebase percona-specific changes after docker-entrypoint.sh refactoring in docker-library/mysql#471
So percona docker will be compatible and similar to mysql one.

Percona definitely ok support percona-specific changes (like INIT_TOKUDB, INIT_ROCKSDB or MYSQL_INIT_ONLY) in our own image.

@yosifkit
Copy link
Member

yosifkit commented May 8, 2019

Build test of #5871; 47ea847; amd64 (percona):

$ bashbrew build percona:8.0.15-6-centos
Building bashbrew/cache:87b8af0bb9b0267d1e2b20957cc70ee14d9bc8a5c2192dae126241677d07b14a (percona:8.0.15-6-centos)
Tagging percona:8.0.15-6-centos
Tagging percona:8.0-centos
Tagging percona:8-centos
Tagging percona:8.0.15-6
Tagging percona:8.0
Tagging percona:8
Tagging percona:ps-8.0.15-6
Tagging percona:ps-8.0
Tagging percona:ps-8

$ test/run.sh percona:8.0.15-6-centos
testing percona:8.0.15-6-centos
	'utc' [1/9]...passed
	'cve-2014--shellshock' [2/9]...passed
	'no-hard-coded-passwords' [3/9]...warning: garbage password detected for 'root': 'locked'
passed
	'override-cmd' [4/9]...passed
	'mysql-basics' [5/9].......passed
	'mysql-initdb' [6/9].......passed
	'mysql-log-bin' [7/9].......passed
	'percona-tokudb' [8/9]........passed
	'percona-rocksdb' [9/9]........passed


$ bashbrew build percona:5.7.25-centos
Using bashbrew/cache:77e5c9971537b374ef96cf14eb165d0db693b41a6f5dd130ec7dce9d365fb87a (percona:5.7.25-centos)
Tagging percona:5.7.25-centos
Tagging percona:5.7-centos
Tagging percona:5-centos
Tagging percona:centos
Tagging percona:5.7.25
Tagging percona:5.7
Tagging percona:5
Tagging percona:ps-5.7.25
Tagging percona:ps-5.7
Tagging percona:ps-5
Tagging percona:latest

$ test/run.sh percona:5.7.25-centos
testing percona:5.7.25-centos
	'utc' [1/9]...passed
	'cve-2014--shellshock' [2/9]...passed
	'no-hard-coded-passwords' [3/9]...warning: garbage password detected for 'root': 'locked'
passed
	'override-cmd' [4/9]...passed
	'mysql-basics' [5/9].......passed
	'mysql-initdb' [6/9]......passed
	'mysql-log-bin' [7/9]......passed
	'percona-tokudb' [8/9]......passed
	'percona-rocksdb' [9/9]......passed


$ bashbrew build percona:5.6.43-centos
Using bashbrew/cache:f7bb369f74c9f4b28b655b8a331df352be2f5606b3da5ed55336ac5bb1533cd2 (percona:5.6.43-centos)
Tagging percona:5.6.43-centos
Tagging percona:5.6-centos
Tagging percona:5.6.43
Tagging percona:5.6
Tagging percona:ps-5.6.43
Tagging percona:ps-5.6

$ test/run.sh percona:5.6.43-centos
testing percona:5.6.43-centos
	'utc' [1/9]...passed
	'cve-2014--shellshock' [2/9]...passed
	'no-hard-coded-passwords' [3/9]...warning: garbage password detected for 'root': 'locked'
passed
	'override-cmd' [4/9]...passed
	'mysql-basics' [5/9]......passed
	'mysql-initdb' [6/9]......passed
	'mysql-log-bin' [7/9].......passed
	'percona-tokudb' [8/9]......passed
	'percona-rocksdb' [9/9]...passed


$ bashbrew build percona:psmdb-4.0.9
Using bashbrew/cache:c81b33ee0d7cbf8e05fa2bdea20f14325dbce355cc991b0ca4c2bbb92076d059 (percona:psmdb-4.0.9)
Tagging percona:psmdb-4.0.9
Tagging percona:psmdb-4.0

$ test/run.sh percona:psmdb-4.0.9
testing percona:psmdb-4.0.9
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...warning: garbage password detected for 'root': 'locked'
passed
	'override-cmd' [4/6]...passed
	'mongo-basics' [5/6]...passed
	'mongo-auth-basics' [6/6]....passed


$ bashbrew build percona:psmdb-3.6.12
Using bashbrew/cache:50fe48b40e7f2c99fb26f5e3627a4fe4717d3da7569a5df358904386e2430013 (percona:psmdb-3.6.12)
Tagging percona:psmdb-3.6.12
Tagging percona:psmdb-3.6

$ test/run.sh percona:psmdb-3.6.12
testing percona:psmdb-3.6.12
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...warning: garbage password detected for 'root': 'locked'
passed
	'override-cmd' [4/6]...passed
	'mongo-basics' [5/6]....passed
	'mongo-auth-basics' [6/6]....passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants