/var/lib/mysql/mysql.passwd no longer exist
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | mysql (Juju Charms Collection) |
High
|
Edward Hope-Morley | ||
| | percona-cluster (Juju Charms Collection) |
High
|
Edward Hope-Morley | ||
Bug Description
The mysql charm changed the way root password is stored without providing backwards compatibility.
Up until recently we always had root password available in /var/lib/
I am pretty sure this problem was introduced in revision 137
There are 2 problems with this change
1. Many scripts, wiki pages and users (myself included) depended on /var/lib/
2. With peer relation there is no easy way to retrieve the password from the unit itself. One use case is a sysadmin who needs to check database structure. It used to be possible to run " mysql -uroot -p`cat /var/lib/
Related branches
- Jorge Niedbalski (community): Approve on 2015-02-25
-
Diff: 113 lines (+41/-11)1 file modifiedcharmhelpers/contrib/database/mysql.py (+41/-11)
- Jorge Niedbalski (community): Approve on 2015-02-25
-
Diff: 783 lines (+581/-31)9 files modifiedhooks/charmhelpers/contrib/database/mysql.py (+41/-11)
hooks/charmhelpers/core/fstab.py (+4/-4)
hooks/charmhelpers/core/host.py (+2/-2)
hooks/charmhelpers/core/strutils.py (+42/-0)
hooks/charmhelpers/core/sysctl.py (+2/-2)
hooks/charmhelpers/core/unitdata.py (+477/-0)
hooks/charmhelpers/fetch/archiveurl.py (+10/-10)
hooks/charmhelpers/fetch/giturl.py (+1/-1)
hooks/common.py (+2/-1)
- Liam Young: Approve on 2015-02-26
- Jorge Niedbalski (community): Approve on 2015-02-25
-
Diff: 793 lines (+584/-31)9 files modifiedhooks/charmhelpers/contrib/database/mysql.py (+41/-11)
hooks/charmhelpers/contrib/hahelpers/cluster.py (+5/-1)
hooks/charmhelpers/core/fstab.py (+4/-4)
hooks/charmhelpers/core/host.py (+2/-2)
hooks/charmhelpers/core/strutils.py (+42/-0)
hooks/charmhelpers/core/sysctl.py (+2/-2)
hooks/charmhelpers/core/unitdata.py (+477/-0)
hooks/charmhelpers/fetch/archiveurl.py (+10/-10)
hooks/charmhelpers/fetch/giturl.py (+1/-1)
- Liam Young: Approve on 2015-02-26
- Jorge Niedbalski (community): Approve on 2015-02-25
-
Diff: 793 lines (+584/-31)9 files modifiedhooks/charmhelpers/contrib/database/mysql.py (+41/-11)
hooks/charmhelpers/contrib/hahelpers/cluster.py (+5/-1)
hooks/charmhelpers/core/fstab.py (+4/-4)
hooks/charmhelpers/core/host.py (+2/-2)
hooks/charmhelpers/core/strutils.py (+42/-0)
hooks/charmhelpers/core/sysctl.py (+2/-2)
hooks/charmhelpers/core/unitdata.py (+477/-0)
hooks/charmhelpers/fetch/archiveurl.py (+10/-10)
hooks/charmhelpers/fetch/giturl.py (+1/-1)
| Marco Ceppi (marcoceppi) wrote : | #1 |
| Marco Ceppi (marcoceppi) wrote : | #2 |
Checking the diff, the mysql.passwd file should be getting created, I will deploy the latest trusty to validate this
| Jacek Nykis (jacekn) wrote : | #3 |
I noticed this in trusty charm: lp:charms/trusty/mysql
mysql.passwd is created fine but then it's wiped when db relations joins.
| Jacek Nykis (jacekn) wrote : | #4 |
Also see related LP1423187
| Marco Ceppi (marcoceppi) wrote : Re: [Bug 1423153] Re: /var/lib/mysql/mysql.passwd no longer exist | #5 |
Oh, bother that's a problem.
On Wed Feb 18 2015 at 10:20:47 AM Jacek Nykis <email address hidden>
wrote:
> Also see related LP1423187
>
> --
> You received this bug notification because you are subscribed to mysql
> in Juju Charms Collection.
> Matching subscriptions: MySQL-Charm
> https:/
>
> Title:
> /var/lib/
>
> Status in mysql package in Juju Charms Collection:
> New
>
> Bug description:
> The mysql charm changed the way root password is stored without
> providing backwards compatibility.
> Up until recently we always had root password available in
> /var/lib/
>
> I am pretty sure this problem was introduced in revision 137
>
> There are 2 problems with this change
> 1. Many scripts, wiki pages and users (myself included) depended on
> /var/lib/
> 2. With peer relation there is no easy way to retrieve the password from
> the unit itself. One use case is a sysadmin who needs to check database
> structure. It used to be possible to run " mysql -uroot -p`cat
> /var/lib/
> multiple juju run commands or by setting up environment on the unit and
> running relation-get but none of this methods are trivial
>
> To manage notifications about this bug go to:
> https:/
> 1423153/
>
| Changed in mysql (Juju Charms Collection): | |
| importance: | Undecided → High |
| importance: | High → Medium |
| importance: | Medium → High |
| James Page (james-page) wrote : | #6 |
The issue is that the MySQL Helper integrated a few commits ago switches to using peer storage as soon as the peer relation is up.
This results in the mysql.passwd file being removed from the filesystem - any subsequent config-changed hook execution fails as it tries to read the passwd file from disk.
| Jacek Nykis (jacekn) wrote : | #7 |
Agreed, this is what I mentioned in my original bug report as well.
Unless juju grows easy way to retrieve the password from the unit itself I think move to the peer relation should be reverted. This unannounced change already caused problems to us.
| Changed in mysql (Juju Charms Collection): | |
| assignee: | nobody → Edward Hope-Morley (hopem) |
| status: | New → In Progress |
| James Page (james-page) wrote : | #8 |
Jacek
I agree with most of your comments - but I would comment that the use of /var/lib/
| Changed in percona-cluster (Juju Charms Collection): | |
| status: | New → In Progress |
| importance: | Undecided → High |
| assignee: | nobody → Edward Hope-Morley (hopem) |
| Changed in mysql (Juju Charms Collection): | |
| status: | In Progress → Fix Released |
| Changed in percona-cluster (Juju Charms Collection): | |
| status: | In Progress → Fix Released |
| Seth Arnold (seth-arnold) wrote : | #9 |
I notice this is marked "Fix Released" but I can't determine the nature of the fix; when deploying mysql on the serverstack environment using the openstack-
What is the nature of the fix that was released? Where should this fix be available? (e.g., should I have expected the openstack-
Thanks
| Seth Arnold (seth-arnold) wrote : | #10 |
In case anyone else faces this, my issue was the juju-deployer local cached charms; removing the series/charm cached directory structure allowed juju-deployer to grab a new version with the fix, that uses /var/lib/
Thanks
| Felipe Reyes (freyes) wrote : | #11 |
According to the merge date this should have been shipped in 15.04
| Changed in mysql (Juju Charms Collection): | |
| milestone: | none → 15.04 |
| Changed in percona-cluster (Juju Charms Collection): | |
| milestone: | none → 15.04 |
| Leonardo Borda (lborda) wrote : | #12 |
Doesn't look like it's working. I've just deployed a mysql charm and mysql.passwd has been removed from /var/lib/

IS this with the trusty MySQL or precise or both?