Set sql_connection in glance-api.conf.

Add copyright.
This commit is contained in:
Adam Gandelman 2012-06-19 16:09:07 -07:00
parent 5b360936aa
commit 34d000806a
2 changed files with 18 additions and 0 deletions

17
copyright Normal file
View File

@ -0,0 +1,17 @@
Format: http://dep.debian.net/deps/dep5/
Files: *
Copyright: Copyright 2012, Canonical Ltd., All Rights Reserved.
License: GPL-3
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

View File

@ -53,6 +53,7 @@ function db_changed {
juju-log "glance: db_changed: Configuring registry for access to $GLANCE_DB@$DB_HOST"
glance_ctl all stop
set_or_update sql_connection "mysql://$DB_USER:$DB_PASSWORD@$DB_HOST/$GLANCE_DB" registry
set_or_update sql_connection "mysql://$DB_USER:$DB_PASSWORD@$DB_HOST/$GLANCE_DB" api
# Set the db version to 0 if its not under version control. We assume that any existing
# database we are being related to was created WITH version control.
if ! glance-manage db_version ; then