puppet-glance/examples/site.pp
Eoghan Glynn b08af59f34 site.pp overrides sql_connection for glance-api.conf also
Previously, the sql_connection config was overridden for the
glance-registry.conf only, whereas in the glance-api.conf this
is left to default to a non-existent sqlite DB.

This causes an issue with the v2 API is used - in this case,
the glance-api service accesses the DB directly instead of
delegating to the registry service. Since the sqlite DB is
non-existent, such v2 API calls fail with 500 ServerError.

This is especially problematic with cinder, as it tries the
glance v2 API by default when creating a bootable volume from
an image, see:

  https://bugzilla.redhat.com/888241
2012-12-18 15:22:45 +00:00

64 lines
1.5 KiB
Puppet

# uses the keystone packages
# to ensure that we use the latest precise packages
Exec { logoutput => 'on_failure' }
node glance_keystone_mysql {
class { 'mysql::server': }
class { 'keystone':
verbose => true,
debug => true,
catalog_type => 'sql',
admin_token => 'admin_token',
}
class { 'keystone::db::mysql':
password => 'keystone',
}
class { 'keystone::roles::admin':
email => 'test@puppetlabs.com',
password => 'ChangeMe',
}
class { 'role_glance_mysql': }
class { 'glance::keystone::auth':
password => 'glance_pass',
}
}
node default {
fail("could not find a matching node entry for ${clientcert}")
}
class role_glance_mysql {
class { 'glance::api':
verbose => 'True',
debug => 'True',
auth_type => 'keystone',
keystone_tenant => 'services',
keystone_user => 'glance',
keystone_password => 'glance_password',
sql_connection => 'mysql://glance:glance@127.0.0.1/glance',
}
class { 'glance::backend::file': }
class { 'glance::db::mysql':
password => 'glance',
dbname => 'glance',
user => 'glance',
host => '127.0.0.1',
# allowed_hosts = undef,
# $cluster_id = 'localzone'
}
class { 'glance::registry':
verbose => 'True',
debug => 'True',
auth_type => 'keystone',
keystone_tenant => 'services',
keystone_user => 'glance',
keystone_password => 'glance_password',
sql_connection => 'mysql://glance:glance@127.0.0.1/glance',
}
}