Skip to content

Instantly share code, notes, and snippets.

@hesco
Last active August 29, 2015 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hesco/de12ec313436db956784 to your computer and use it in GitHub Desktop.
Save hesco/de12ec313436db956784 to your computer and use it in GitHub Desktop.
Starting over after updating these two modules to the latest available off the forge:
git:/etc/puppet/modules/dessalines# grep version openstack/Modulefile
version '2.2.0'
git:/etc/puppet/modules/dessalines# grep version keystone/Modulefile
version '3.1.1'
I resolved a number of errors related to duplicate resources
but found myself back at the same errors.
-----
Now I am getting:
root@dessalines-003:~# puppet agent -t
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid db connection mysql://keystone:@127.0.0.1/keystone at /etc/puppet/modules/ymd_ng/keystone/manifests/init.pp:254 on node dessalines-003.yourmessagedelivered.com
-----
This default exists in the keystone module:
class keystone(
$sql_connection = 'sqlite:////var/lib/keystone/keystone.db',
-----
I see nothing which would redefine it prior to its use here:
if($sql_connection =~ /mysql:\/\/\S+:\S+@\S+\/\S+/) {
require 'mysql::bindings::python'
} elsif($sql_connection =~ /postgresql:\/\/\S+:\S+@\S+\/\S+/) {
} elsif($sql_connection =~ /sqlite:\/\//) {
} else {
fail("Invalid db connection ${sql_connection}")
}
-----
That connection string seems to be defined here:
openstack/manifests/keystone.pp:
class openstack::keystone (
$db_password,
) {
if $db_type == 'mysql' {
$sql_conn = "mysql://${db_user}:${db_password}@${db_host}/${db_name}"
} else {
fail("db_type ${db_type} is not supported")
}
-----
And I seem to be stuck right where I was before the upgraded modules.
-----
This ugly hack seems to work:
openstack/manifests/keystone.pp --
if $db_type == 'mysql' {
# an ugly hack
+ $db_password = 'secret'
$sql_conn = "mysql://${db_user}:${db_password}@${db_host}/${db_name}"
} else {
fail("db_type ${db_type} is not supported")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment