old implementation of the exception approach

Bug #1905586 reported by Robert Gildein
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Charm Helpers
In Progress
Undecided
Facundo Ciccioli

Bug Description

The `create_user` function from the `MySQL8Helper` class used an old implementation of exception handling. This results in an "AttributeError: module" MySQLdb "has no attribute" _exceptions ", when trying to use this function.

This error was found during the review https://review.opendev.org/c/openstack/charm-percona-cluster/+/761449, where I want to use the function `create_user` to create a nagios user.

used bundle: https://pastebin.ubuntu.com/p/J8bhKkhXhX/
series: bionic
MySQLdb version: '1.3.10'
MySQLdb install via deb pkg `apt_install(filter_installed_packages(['python3-mysqldb']), fatal=True)`

Changed in charm-helpers:
status: New → In Progress
assignee: nobody → Facundo Ciccioli (fandanbango)
Revision history for this message
Facundo Ciccioli (fandanbango) wrote :

I am not sure why this issue was hit while working on the percona-cluster, since percona uses MySQLHelper class and the bug resides on MySQL8Helper.

Still, this *is* a bug and we're gonna hit it while working on the new mysql-innodb-cluster charm, which will need to use the affected class.

I've put up a PR to fix it [1].

[1] https://github.com/juju/charm-helpers/pull/653

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.