cinder-daemons autopkgtest must override driver to use pymysql

Bug #1845321 reported by Corey Bryant on 2019-09-25
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cinder (Ubuntu)
qemu (Ubuntu)

Bug Description

debian/tests/cinder-daemons is failing due to the disco switch of sqlalchemy defaulting to mysqldb. We must override the driver to use pymysql. I'm not sure how this was not caught until now.

[Test Case]
Run autopkgtests.

[Regression Potential]
None, this is just updating an autopkgtest.

Corey Bryant (corey.bryant) wrote :

This is blocking a qemu SRU. I'm not sure how this hasn't been hit until now for disco.

Changed in cinder (Ubuntu Disco):
status: New → Triaged
Changed in cinder (Ubuntu Eoan):
status: New → Triaged
Changed in cinder (Ubuntu Disco):
importance: Undecided → High
Changed in cinder (Ubuntu Eoan):
importance: Undecided → High

Added qemu task and tags for tracking purpose

tags: added: update-excuse

Copy from IRC to remind myself about the expected timing:
[15:00] <coreycb> cpaelzer: i'll get it uploaded today to the disco queue but we are somewhat blocked by current SRUs in proposed
[15:01] <coreycb> sahid: we'll need to get bug 1837905 verified for disco-proposed
[15:01] <ubottu> bug 1837905 in horizon (Ubuntu Disco) " [SRU] stein stable releases " [High,Fix committed]
[15:08] <coreycb> cpaelzer: once that clears, i will combine the autopkgtest SRU with the SRU for bug 1834845
[15:08] <ubottu> bug 1834845 in cinder (Ubuntu Disco) "DetachedInstanceError: Parent instance <VolumeAttachment at > is not bound to a Session" [High,In progress]
[15:08] <cpaelzer> ok, thanks for the info coreycb
[15:09] <coreycb> cpaelzer: i'm working on it at

Corey Bryant (corey.bryant) wrote :

I've uploaded 2:14.0.1-0ubuntu3 to the disco unapproved queue which includes 2:14.0.1-0ubuntu2 and provides a fix for disco autopkgtest failure. Note that autopkgtests were successfully executed as this was uploaded via

Corey Bryant (corey.bryant) wrote :

This is also fixed in the latest upload to eoan.

Hello Corey, or anyone else affected,

Accepted cinder into eoan-proposed. The package will build now and be available at in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-eoan to verification-done-eoan. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-eoan. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in cinder (Ubuntu Eoan):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-eoan

@Corey: the Eoan upload has a different but still cross arch SQL error:

ERROR 1064 (42000) at line 2: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY 'changeme'' at line 1

This test does:
  9 mysql -u root << EOF
 11 GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' \
 12 IDENTIFIED BY 'changeme';
 13 GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' \
 14 IDENTIFIED BY 'changeme';
 15 EOF

That is a common mysql8 issue, read e.g. [1].
Users are no more "implicitly" created by Grant+identified.
Instead you'd need it to be like:

CREATE USER 'cinder'@'%' IDENTIFIED BY 'changeme';
GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%';
CREATE USER 'cinder'@'localhost' IDENTIFIED BY 'changeme';
GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost';

Here is a debdiff with a suggestion, and given that it is a mysql8-special you won't need it in Disco.


Corey Bryant (corey.bryant) wrote :

@Christian, thanks for the patch! I'll get that applied and uploaded.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cinder - 2:15.0.0~b3~git2019092509.cea6e823c-0ubuntu2

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 <email address hidden> Thu, 26 Sep 2019 09:07:05 +0200

Changed in cinder (Ubuntu Eoan):
status: Fix Committed → Fix Released

\o/ Eoan worked, now you can upload that for Disco to resolve it there as well (without the mysql8 changes) or are there other things gating this?

Corey Bryant (corey.bryant) wrote :

Thanks for checking! Disco fix is in the unapproved queue:

Corey Bryant (corey.bryant) wrote :

This is fixed in Disco (Stein) as of cinder 2:14.0.1-0ubuntu3

Changed in cinder (Ubuntu Disco):
status: Triaged → Fix Committed

But Disco only has:
 cinder | 2:14.0.1-0ubuntu1 | disco-updates | source
^^ pre fix
 cinder | 2:14.0.2-0ubuntu1 | disco-proposed | source
^^ not yet released

New uploads still fail on this.
I will trigger with the version in proposed which should make it work.

Hmm .. the bug also says only "fix committed" what is this waiting on?

I have retriggered cinder tests for a recent qemu upload with/without the new version of cinder in Disco. If it confirms the fix I'll mark this bug verified.

Ok, this does indeed reliable fail with the old and reliable work with the new version.
It is good (marking verified) but cinder uploads already superseded this.

@Coreycb it seems bug 1849192 is tested by you, but I saw nothing on bug 1838691.
Eventually with that version accepted we can then close this bug as well I guess?

tags: added: verification-done verification-done-eoan
removed: verification-needed verification-needed-eoan
Corey Bryant (corey.bryant) wrote :

@Christian, I've added a card for verification of bug 1838691 to our trello board.

Corey Bryant (corey.bryant) wrote :
tags: added: verification-done-disco
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers