cinder-daemons autopkgtest must override driver to use pymysql

Bug #1845321 reported by Corey Bryant on 2019-09-25
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cinder (Ubuntu)
High
Unassigned
Disco
High
Unassigned
Eoan
High
Unassigned
qemu (Ubuntu)
Undecided
Unassigned
Disco
Undecided
Unassigned
Eoan
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.

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] 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

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.

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

@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/

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: https://launchpad.net/ubuntu/disco/+queue?queue_state=1&queue_text=cinder

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers