Whats up with Mysql

I think we asked this before, and I think for a while it got fixed, but maybe it didn’t.

The MySQL charm, which my gut tells me probably gets smoke tested a lot by people wondering how Juju works, tried to launch a Zesty instance by default, but there’s no Zesty images on AWS or something cause it never starts.

Can someone(Marco?) either switch the default to Xenial or better yet Bionic? Its a bit sad when MySQL fails when you try and deploy it when infact the charm is fine.

2 Likes

This happened to me to a while ago. I don’t know where Zesty is coming from.

My guess is the charm declares “series: zesty, xenial, trusty”
which means it defaults to Zesty unless otherwise specified with --series.

I would agree that the default should certainly be an LTS, either Xenial or Bionic at this point.

I don’t think the mysql charm is particularly well maintained, as the most active one is probably percona-cluster used by the openstack charms. Its owned by “mysql-charmers” which is a aggregated group of Openstack charmers and Canonical Charm Leads, so there should be a few people with rights to update the series: and then publish a new version.

@james-page @beisner ^^

It shows zesty as a series now. It didn’t before.

To confirm, the mysql charm repo [1] appears to be ahead of the charm store charm [2].

[1] https://github.com/juju-solutions/charm-mysql/blob/master/metadata.yaml
[2] https://api.jujucharms.com/charmstore/v5/mysql/archive/metadata.yaml

From an OpenStack perspective, we use the Percona Cluster charm (not the MySQL charm).

I’ll check into the ETA of getting that updated in the charm store.

FYI, the updated mysql charm is currently in ‘candidate’:

Related to this, I filed Bug #1807241 “Juju shouldn't pick an EOL ubuntu release if a val...” : Bugs : juju against juju for consideration

@rick_h, regarding the charm store community engagement/curation approach you mentioned in the bug above, I already have https://github.com/CanonicalLtd/jujucharms.com/issues/473. Hope to see some more action towards curation tools to help folks clean up things and make informed decisions in the store.

The mysql charm (for bionic) is still broken which is a bummer since it will cause also tutorials to fail.

Any chance an update to also include “bionic” could be available soon per default?

@pmatulis also got hit by this problem, as will everyone trying to take on any beginner level tutorial for any charm development source.

In other words, no “new” developer will find juju usable when trying to learn how to do juju on bionic.

We’re working to get mysql pulled from tutorials/demos since it’s known to not be the best example to start with. I’m also meeting with the charmstore folks Monday to work on getting the pattern setup for removing promulgated stuff that needs to be pulled down as it’s not maintained.

This is definitely a bummer and we need to get it cleaned out.

1 Like

Thanx for the update @rick_h I’m sure you will figure it out.

I could swap it out in my tutorials if there are better database charms to use for reference. Its unfortunate that mysql is such a common database used by many.

https://www.eversql.com/most-popular-databases-in-2018-according-to-stackoverflow-survey/

PostgreSQL is a good candidate (above) if ruling out SQL Server.

Postgresql and percona-cluster (maintained by the openstack team) are great examples to use.

I also think some cool examples might be etcd and parts from the K8s cluster setup.

I know I do a lot of QA/testing with percona-cluster and keystone since it’s two things that relate cleanly and demo a web UX well. I’ll bet most folks have their ‘go to’ examples for things.

1 Like

@pmatulis could also consider changing some mainline/canonical docs to fix this. But its perhaps good to have more than one example… not sure.

I just hit this by following the tutorial on https://docs.jujucharms.com/2.5/en/authors-charm-writing

The first issue I hit was my vanilla charm trying to use a bionic image but failing because packages like libapache2-mod-php5, php5-mysql, php5-gd and php5-cgi were not available.

I then tried to deploy vanilla with --series precise (since the tutorial mentions precise) but Juju couldn’t find the precise LXD image. So I tried with trusty and that went through fine.

Then I tried replacing mysql with percona-cluster:

juju deploy percona-cluster
juju add-relation percona-cluster vanilla

This gave me a successful Juju status but when I try creating the admin user in vanilla, I got the following error:

Percona-XtraDB-Cluster prohibits use of DML command on a table (vanilla.GDN_Discussion) that resides in non-transactional storage engine with pxc_strict_mode = ENFORCING or MASTER|Gdn_Database|Query|update GDN_Discussion d inner join GDN_Comment c on c.DiscussionID = d.DiscussionID inner join ( select max(c2.CommentID) as CommentID from GDN_Comment c2 group by c2.DiscussionID ) c2 on c.CommentID = c2.CommentID set d.LastCommentID = c.CommentID, d.LastCommentUserID = c.InsertUserID where d.LastCommentUserID is null

I then ran juju config percona-cluster pxc-strict-mode=permissive to overcome that error (even though it’s not recommended to run in permissive mode).

I could then get past the admin creation screen, but I couldn’t really use vanilla, or find the admin panel. I don’t know if the problem is vanilla or the database at this point.