[common] Regression on default socket dir value

Bug #1779934 reported by Seb-Solon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack + Chef
New
Undecided
Unassigned

Bug Description

Hi there,

Changing the default mysql to mariadb on ubuntu was the right call, however a small change in a default related value introduced some inconsistency.

In the common cookbook, file attributes/database.rb we have now :

  default['openstack']['db']['socket'] = '/var/run/mysqld/mysqld.sock'

However the cookbook openstack-ops-database specifically have a dep on mysql:

  depends 'mysql', '~> 8.2'

Looking at the mysql 8.2 cookbook (https://github.com/sous-chefs/mysql/blob/v8.2.0/libraries/helpers.rb) we have the default value of socket :

  "(/var)/run/mysql-#{instance}/mysqld.sock" (/var/run is usually a symlink to /run so no issue)

expanding the value with :

* https://github.com/sous-chefs/mysql/blob/v8.2.0/libraries/helpers.rb#L122
* https://github.com/sous-chefs/mysql/blob/v8.2.0/libraries/helpers.rb#L154
* https://github.com/sous-chefs/mysql/blob/v8.2.0/libraries/helpers.rb#L118

So with the openstack attribute ["db"]["service_type"] == "mysql", we mysql cookbook still setup the mysql with the instance in path. A quick workaround for that is to override the openstack attribute ["db"]["socket"] to the old value : "/run/mysql-default/mysqld.sock"

However, the current master version of the mysql cookbook introduced a small change that will align to your change : https://github.com/sous-chefs/mysql/blob/master/libraries/helpers.rb#L82

The default value changes to :

  "/run/mysql/mysqld.sock"

The day they tag the master branch with a new version the fix could be to simply update the dependency on the openstack-ops-database cookbook.

Any opinion? We could revert the change or just live wit hthe workaround the time the new version is out. Mysql is no more default so the impact is low.

Regards,

-----

TLDR :

Bug introduced in : b2881c3a808a263a152f7fe33983a6b98e9ebe99 , Change-Id: I143e0ed0a2bdd76269fc0c402052696426d96d81

diff :

- default['openstack']['db']['socket'] = '/run/mysql-default/mysqld.sock'
+ default['openstack']['db']['socket'] = '/var/run/mysqld/mysqld.sock'

Tags: mysql
Revision history for this message
Lance Albertson (lance-osuosl) wrote :

Can you please let us know if this is still happening with the current release? It's been a few years since you submitted this. Sorry for not replying sooner!

Seb-Solon (openid-3)
description: updated
Revision history for this message
Seb-Solon (openid-3) wrote :

Hi,

Sorry I am not using the cookbooks anymore. I am not really in the context anymore but reading the ticket again seems to be easy to check.

The version of mysql pointed by openstack-ops-database cookbook was not integrating the introduced change by the commit.

I guess if you are able to check the status of that (whether the version of the mysql cookbook is appropriate) you will be able to fix / close the ticket. I guess version have changed in 2 years, wondering if mysql is still even supported as the default was Maria.

Regards,

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.