cinder-daemons autopkgtest must override driver to use pymysql

Bug #1845321 reported by Corey Bryant
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cinder (Ubuntu)
Fix Released
High
Unassigned
Disco
Won't Fix
High
Unassigned
Eoan
Fix Released
High
Unassigned
qemu (Ubuntu)
Invalid
Undecided
Unassigned
Disco
Invalid
Undecided
Unassigned
Eoan
Invalid
Undecided
Unassigned

Bug Description

[Impact]
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.

Revision history for this message
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
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Added qemu task and tags for tracking purpose

tags: added: update-excuse
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

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] https://launchpad.net/bugs/1837905
[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] https://launchpad.net/bugs/1834845
[15:08] <cpaelzer> ok, thanks for the info coreycb
[15:09] <coreycb> cpaelzer: i'm working on it at https://bileto.ubuntu.com/#/ticket/3813

Revision history for this message
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 https://bileto.ubuntu.com/#/ticket/3813.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

This is also fixed in the latest upload to eoan.

Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Corey, or anyone else affected,

Accepted cinder into eoan-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cinder/2:15.0.0~b3~git2019092509.cea6e823c-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed 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 https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . 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
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

@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
 10 CREATE DATABASE cinder;
 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.

[1]: https://lefred.be/content/how-to-grant-privileges-to-users-in-mysql-8-0/

Revision history for this message
Corey Bryant (corey.bryant) wrote :

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

Revision history for this message
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
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

\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?

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Thanks for checking! Disco fix is in the unapproved queue: https://launchpad.net/ubuntu/disco/+queue?queue_state=1&queue_text=cinder

Revision history for this message
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
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

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.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

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

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

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.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

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
Revision history for this message
Corey Bryant (corey.bryant) wrote :

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

Revision history for this message
Corey Bryant (corey.bryant) wrote :
tags: added: verification-done-disco
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Since it was only for tracking I'll set the qemu task to invalid now - some tools got confused and pulled in this bug as relevant :-)

Changed in qemu (Ubuntu):
status: New → Invalid
Changed in qemu (Ubuntu Disco):
status: New → Invalid
Changed in qemu (Ubuntu Eoan):
status: New → Invalid
Steve Langasek (vorlon)
Changed in cinder (Ubuntu Disco):
status: Fix Committed → Won't Fix
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.