puppetlabs/keystone can't find mysql::python

Bug #1306734 reported by Hugh Esco
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet-openstack
New
Undecided
Unassigned

Bug Description

Even after upgrading puppetlabs-keystone to v3.1.1, at:
http://www.puppetforge.com/puppetlabs/keystone/3.1.1

I still get errors like:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class mysql::python for dessalines-003.yourmessagedelivered.com on node dessalines-003.yourmessagedelivered.com

inspecting my puppet manifests, I see:

git:/etc/puppet/modules/dessalines# grep -R 'mysql::python' .
./test.rb: require 'mysql::python'
grep: ./mediawiki/spec/fixtures/modules/mediawiki/templates: No such file or directory
./keystone/spec/classes/keystone_db_mysql_spec.rb: it { should contain_class('mysql::python') }
./keystone/manifests/db/mysql.pp: require mysql::python
./keystone/manifests/init.pp: require 'mysql::python'

I was able to move past these errors by correcting those
references to use mysql::bindings::python, instead.

Revision history for this message
Hugh Esco (hesco) wrote :

I recreated this bug as: Bug #1306745 in the keystone queue.
I suspect this bug can be closed. But will leave that to others to determine.

Revision history for this message
Rushi Agrawal (rushiagr) wrote :

Any idea if this will be fixed? I'm hitting the same issue? Or should I use something else for the same (e.g. stackforge version of puppet-keystone)?

Revision history for this message
Radoslaw Smigielski (radoslaw-smigielski) wrote :

So in the keystone/manifests/init.pp there is a fragment of the code which detects type of the database [mysql|posgresql|sqlite] by looking at the connection sting. And according to the database type "requiers" dedicated db modules.

For MySQL support default value for mysql_module is 0.9 plus below fragment of keystone/manifests/init.pp is responsible for the include logic:

  if($database_connection_real =~ /mysql:\/\/\S+:\S+@\S+\/\S+/) {
    if ($mysql_module >= 2.2) {
      require 'mysql::bindings'
      require 'mysql::bindings::python'
    } else {
      require 'mysql::python'
    }

The bottom line is that:
1. mysql_module use to be >= 2.2 nowadays
2. by default mysql_module version 0.9 is assumed and the error about missing 'mysql::python' is thrown
3. by specifying your real mysql_module version in your keystone class, you can resolve this problem

IMHO we should not assume 0.9 as a default as it's very old or make "mysql_module" option mandatory?

Revision history for this message
cooldharma06 (cooldharma06) wrote :

Yeah i faced this error.

but you can resolve by 'overriding the mysql' version in your nova.pp(configuration) file

For ex: Currently puppetlabs-mysql version is 2.3.1

So in your configuration specify mysql_module => '2.3', this will make override the existing specified configuration and it will use the current mysql module.

i verified and its working.

Enjoy Puppet and Openstack. :)

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.