The db-sync command fails with MySQL 8

Bug #1915734 reported by Ionut-Madalin Balutoiu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
Fix Released
High
Unassigned
Ussuri
Fix Released
High
Unassigned
Victoria
Fix Released
High
Unassigned
magnum (Ubuntu)
Fix Released
High
Unassigned
Focal
Fix Released
High
Unassigned
Groovy
Won't Fix
High
Unassigned

Bug Description

[Impact]

New installations of OpenStack Magnum with Mysql8 fail with a traceback when trying to initialize the database

[Test Case]

Use the OpenStack charms to deploy Mggnum on Ubuntu Focal. Using Focal is expected to have a traceback and with this change is expected to setup successfully.

[Regression Potential]

The regression potential for this is minimal as the package currently does not work at all with mysql8 which ships with Ubuntu Focal and above. This change has already landed into the upstream project, both on Master and in their stable branches.

The proposed change is a cherry-pick from upstream that resolves this issue by updating the old migrations to not set constraints that break on Mysql8. This only affects new deploys that would normally step through all of the old migrations so shouldn't affect running deploys.

----------------------------------------------

The command to do the Magnum DB sync ('magnum-db-manage upgrade') fails when using MySQL 8 releases.

This issue is tracked in the upstream Magnum project at: https://storyboard.openstack.org/#!/story/2008488.

There is a fix already merged on Magnum master branch to fix this: https://review.opendev.org/c/openstack/magnum/+/774142

We need to have this fix included with Magnum distro packages that are expected to use MySQL 8. For example, deployments on Ubuntu Focal (or higher) are expected to be using MySQL 8 already.

Revision history for this message
Ionut-Madalin Balutoiu (ionutbalutoiu) wrote :

Quick update on this one.

Corey did separate PPAs for Ussuri and Victoria Magnum packages with builds from latest upstream stable branch:
https://launchpad.net/~openstack-charmers/+archive/ubuntu/magnum-ussuri
https://launchpad.net/~openstack-charmers/+archive/ubuntu/magnum-victoria

Both Ussuri and Victoria Magnum packages from Corey's PPAs include the fix for this MySQL 8 DB migration issue.

Changed in magnum (Ubuntu Focal):
status: New → Triaged
Changed in magnum (Ubuntu Groovy):
status: New → Triaged
importance: Undecided → High
Changed in magnum (Ubuntu Focal):
importance: Undecided → High
Changed in magnum (Ubuntu):
status: New → Fix Released
Changed in cloud-archive:
status: New → Fix Released
importance: Undecided → High
Changed in magnum (Ubuntu):
importance: Undecided → High
description: updated
description: updated
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Ionut-Madalin, or anyone else affected,

Accepted magnum into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/magnum/11.0.0-0ubuntu1.1 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, what testing has been performed on the package and change the tag from verification-needed-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. 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 magnum (Ubuntu Groovy):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-groovy
Changed in magnum (Ubuntu Focal):
status: Triaged → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Ionut-Madalin, or anyone else affected,

Accepted magnum into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/magnum/10.0.0-0ubuntu0.20.04.2 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, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. 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.

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

Hello Ionut-Madalin, or anyone else affected,

Accepted magnum into victoria-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:victoria-proposed
  sudo apt-get update

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-victoria-needed to verification-victoria-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-victoria-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-victoria-needed
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hello Ionut-Madalin, or anyone else affected,

Accepted magnum into ussuri-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:ussuri-proposed
  sudo apt-get update

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-ussuri-needed to verification-ussuri-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-ussuri-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-ussuri-needed
Revision history for this message
Brian Murray (brian-murray) wrote :

The Groovy Gorilla has reached end of life, so this bug will not be fixed for that release

Changed in magnum (Ubuntu Groovy):
status: Fix Committed → Won't Fix
Revision history for this message
Brian Murray (brian-murray) wrote : [magnum/focal] verification still needed

The fix for this bug has been awaiting testing feedback in the -proposed repository for focal for more than 90 days. Please test this fix and update the bug appropriately with the results. In the event that the fix for this bug is still not verified 15 days from now, the package will be removed from the -proposed repository.

tags: added: removal-candidate
Revision history for this message
Chris MacNaughton (chris.macnaughton) wrote :

I have deployed Magnum from Focal-proposed and confirmed that it can run it's db-manage successfully on mysql8.

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Chris MacNaughton (chris.macnaughton) wrote :

I have deployed magnum on bionic with the proposed Ussuri cloud archive and confirmed that it can setup on percona-cluster as well

tags: added: verification-ussuri-done
removed: verification-ussuri-needed
Revision history for this message
Chris MacNaughton (chris.macnaughton) wrote :

I have deployed magnum on focal with the proposed Victoria cloud archive and confirmed that it can setup successfully on mysql8.

tags: added: verification-victoria-done
removed: verification-victoria-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package magnum - 10.0.0-0ubuntu0.20.04.2

---------------
magnum (10.0.0-0ubuntu0.20.04.2) focal; urgency=medium

  * d/control: Update VCS paths for move to lp:~ubuntu-openstack-dev.
  * d/p/mysql8-support.patch: Picked from upstream stable/ussuri review
    https://review.opendev.org/c/openstack/magnum/+/781510 for mysql 8
    support (LP: #1915734).
  * d/rules: Add OS_STDOUT_CAPTURE/OS_STDERR_CAPTURE to test execution
    inline with upstream.

 -- Chris MacNaughton <email address hidden> Mon, 26 Apr 2021 14:13:36 +0000

Changed in magnum (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for magnum has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Chris MacNaughton (chris.macnaughton) wrote :

The verification of the Stable Release Update for magnum has completed successfully and the package has now been released to -updates. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Chris MacNaughton (chris.macnaughton) wrote :

This bug was fixed in the package magnum - 11.0.0-0ubuntu1.1~cloud0
---------------

 magnum (11.0.0-0ubuntu1.1~cloud0) focal-victoria; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 magnum (11.0.0-0ubuntu1.1) groovy; urgency=medium
 .
   [ Corey Bryant ]
   * d/gbp.conf: Create stable/victoria branch.
 .
   [ Chris MacNaughton ]
   * d/p/mysql8-support.patch: Picked from upstream stable/victoria
     review https://review.opendev.org/c/openstack/magnum/+/777910 for
     mysql 8 support (LP: #1915734).

Revision history for this message
Chris MacNaughton (chris.macnaughton) wrote :

The verification of the Stable Release Update for magnum has completed successfully and the package has now been released to -updates. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Chris MacNaughton (chris.macnaughton) wrote :

This bug was fixed in the package magnum - 10.0.0-0ubuntu0.20.04.2~cloud0
---------------

 magnum (10.0.0-0ubuntu0.20.04.2~cloud0) bionic-ussuri; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 magnum (10.0.0-0ubuntu0.20.04.2) focal; urgency=medium
 .
   * d/control: Update VCS paths for move to lp:~ubuntu-openstack-dev.
   * d/p/mysql8-support.patch: Picked from upstream stable/ussuri review
     https://review.opendev.org/c/openstack/magnum/+/781510 for mysql 8
     support (LP: #1915734).
   * d/rules: Add OS_STDOUT_CAPTURE/OS_STDERR_CAPTURE to test execution
     inline with upstream.

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.