diff -Nru cinder-15.0.0~b3~git2019092509.cea6e823c/debian/changelog cinder-15.0.0~b3~git2019092509.cea6e823c/debian/changelog --- cinder-15.0.0~b3~git2019092509.cea6e823c/debian/changelog 2019-09-25 14:48:14.000000000 +0200 +++ cinder-15.0.0~b3~git2019092509.cea6e823c/debian/changelog 2019-09-26 09:07:05.000000000 +0200 @@ -1,3 +1,11 @@ +cinder (2:15.0.0~b3~git2019092509.cea6e823c-0ubuntu2) eoan; urgency=medium + + * Fix test issues triggered by mysql8 + - d/p/fix-test-setup-mysql8.patch: use explicit create user in CI setup + - debian/tests/cinder-daemons: use explicit create user in autopkgtest + + -- Christian Ehrhardt Thu, 26 Sep 2019 09:07:05 +0200 + cinder (2:15.0.0~b3~git2019092509.cea6e823c-0ubuntu1) eoan; urgency=medium [ Sahid Orentino Ferdjaoui ] diff -Nru cinder-15.0.0~b3~git2019092509.cea6e823c/debian/patches/fix-test-setup-mysql8.patch cinder-15.0.0~b3~git2019092509.cea6e823c/debian/patches/fix-test-setup-mysql8.patch --- cinder-15.0.0~b3~git2019092509.cea6e823c/debian/patches/fix-test-setup-mysql8.patch 1970-01-01 01:00:00.000000000 +0100 +++ cinder-15.0.0~b3~git2019092509.cea6e823c/debian/patches/fix-test-setup-mysql8.patch 2019-09-26 09:07:05.000000000 +0200 @@ -0,0 +1,22 @@ +Description: fix tests with mysql8 + mysql 8 no more supports implicit user creation in GRANT statements. + Add explicit CREATE USER statements to work. +Forwarded: no +X-Not-Forwarded-Reason: up to the openstack Team +Author: Christian Ehrhardt +Origin: https://dev.mysql.com/doc/refman/8.0/en/grant.html +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1845321 +Last-Update: 2019-09-26 +--- a/tools/test-setup.sh ++++ b/tools/test-setup.sh +@@ -23,8 +23,9 @@ sudo -H mysqladmin -u root password $DB_ + sudo -H mysql -u root -p$DB_ROOT_PW -h localhost -e " + DELETE FROM mysql.user WHERE User=''; + FLUSH PRIVILEGES; ++ CREATE USER '$DB_USER'@'%' identified by '$DB_PW'; + GRANT ALL PRIVILEGES ON *.* +- TO '$DB_USER'@'%' identified by '$DB_PW' WITH GRANT OPTION;" ++ TO '$DB_USER'@'%' WITH GRANT OPTION;" + + # Now create our database. + mysql -u $DB_USER -p$DB_PW -h 127.0.0.1 -e " diff -Nru cinder-15.0.0~b3~git2019092509.cea6e823c/debian/patches/series cinder-15.0.0~b3~git2019092509.cea6e823c/debian/patches/series --- cinder-15.0.0~b3~git2019092509.cea6e823c/debian/patches/series 2019-09-25 14:48:14.000000000 +0200 +++ cinder-15.0.0~b3~git2019092509.cea6e823c/debian/patches/series 2019-09-26 09:05:49.000000000 +0200 @@ -1 +1,2 @@ skip-taskflow-tests-py37.patch +fix-test-setup-mysql8.patch diff -Nru cinder-15.0.0~b3~git2019092509.cea6e823c/debian/tests/cinder-daemons cinder-15.0.0~b3~git2019092509.cea6e823c/debian/tests/cinder-daemons --- cinder-15.0.0~b3~git2019092509.cea6e823c/debian/tests/cinder-daemons 2019-09-25 14:48:14.000000000 +0200 +++ cinder-15.0.0~b3~git2019092509.cea6e823c/debian/tests/cinder-daemons 2019-09-26 09:03:26.000000000 +0200 @@ -8,10 +8,10 @@ mysql -u root << EOF CREATE DATABASE cinder; -GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' \ - IDENTIFIED BY 'changeme'; -GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' \ - IDENTIFIED BY 'changeme'; +CREATE USER 'cinder'@'localhost' IDENTIFIED BY 'changeme'; +GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost'; +CREATE USER 'cinder'@'%' IDENTIFIED BY 'changeme'; +GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%'; EOF sed -i -e 's!connection = sqlite.*cinder.sqlite!connection = mysql+pymysql://cinder:changeme@localhost/cinder!g' /etc/cinder/cinder.conf