[openstack-glance] don't auto create database on service start

Pádraig Brady pbrady at fedoraproject.org
Mon May 21 11:41:58 UTC 2012


commit 25812c08cee6cc3f8a7eb148bd9e78970786b26c
Author: Pádraig Brady <P at draigBrady.com>
Date:   Mon May 21 12:28:57 2012 +0100

    don't auto create database on service start

 glance-registry.conf  |   65 +++++++++++++++++++++++++++++++++++++++++++++++++
 openstack-glance.spec |    4 ++-
 2 files changed, 68 insertions(+), 1 deletions(-)
---
diff --git a/glance-registry.conf b/glance-registry.conf
new file mode 100644
index 0000000..57c2c5a
--- /dev/null
+++ b/glance-registry.conf
@@ -0,0 +1,65 @@
+[DEFAULT]
+# Show more verbose log output (sets INFO log level output)
+verbose = True
+
+# Show debugging output in logs (sets DEBUG log level output)
+debug = False
+
+# Address to bind the registry server
+bind_host = 0.0.0.0
+
+# Port the bind the registry server to
+bind_port = 9191
+
+# Log to this file. Make sure you do not set the same log
+# file for both the API and registry servers!
+log_file = /var/log/glance/registry.log
+
+# Backlog requests when creating socket
+backlog = 4096
+
+# SQLAlchemy connection string for the reference implementation
+# registry server. Any valid SQLAlchemy connection string is fine.
+# See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine
+sql_connection = mysql://glance:glance@localhost/glance
+
+# Period in seconds after which SQLAlchemy should reestablish its connection
+# to the database.
+#
+# MySQL uses a default `wait_timeout` of 8 hours, after which it will drop
+# idle connections. This can result in 'MySQL Gone Away' exceptions. If you
+# notice this, you can lower this value to ensure that SQLAlchemy reconnects
+# before MySQL can drop the connection.
+sql_idle_timeout = 3600
+
+# Require an explicit db_sync to create the database,
+# rather than relying on the service to create automatically.
+db_auto_create = False
+
+# Limit the api to return `param_limit_max` items in a call to a container. If
+# a larger `limit` query param is provided, it will be reduced to this value.
+api_limit_max = 1000
+
+# If a `limit` query param is not provided in an api request, it will
+# default to `limit_param_default`
+limit_param_default = 25
+
+# Role used to identify an authenticated user as administrator
+#admin_role = admin
+
+# ================= Syslog Options ============================
+
+# Send logs to syslog (/dev/log) instead of to file specified
+# by `log_file`
+use_syslog = False
+
+# Facility to use. If unset defaults to LOG_USER.
+# syslog_log_facility = LOG_LOCAL1
+
+# ================= SSL Options ===============================
+
+# Certificate file to use when starting registry server securely
+# cert_file = /path/to/certfile
+
+# Private key file to use when starting registry server securely
+# key_file = /path/to/keyfile
diff --git a/openstack-glance.spec b/openstack-glance.spec
index 01c73b7..2cc6400 100644
--- a/openstack-glance.spec
+++ b/openstack-glance.spec
@@ -11,6 +11,7 @@ Source1:          openstack-glance-api.service
 Source2:          openstack-glance-registry.service
 Source3:          openstack-glance.logrotate
 Source4:          openstack-glance-db-setup
+Source5:          glance-registry.conf
 
 #
 # patches_base=2012.1
@@ -141,7 +142,7 @@ install -d -m 755 %{buildroot}%{_sharedstatedir}/glance/images
 install -p -D -m 644 etc/glance-api.conf %{buildroot}%{_sysconfdir}/glance/glance-api.conf
 install -p -D -m 644 etc/glance-api-paste.ini %{buildroot}%{_sysconfdir}/glance/glance-api-paste.ini
 # glance-registry.conf contains a db password
-install -p -D -m 640 etc/glance-registry.conf %{buildroot}%{_sysconfdir}/glance/glance-registry.conf
+install -p -D -m 640 %{SOURCE5} %{buildroot}%{_sysconfdir}/glance/glance-registry.conf
 install -p -D -m 644 etc/glance-registry-paste.ini %{buildroot}%{_sysconfdir}/glance/glance-registry-paste.ini
 install -p -D -m 644 etc/glance-cache.conf %{buildroot}%{_sysconfdir}/glance/glance-cache.conf
 install -p -D -m 644 etc/glance-cache-paste.ini %{buildroot}%{_sysconfdir}/glance/glance-cache-paste.ini
@@ -238,6 +239,7 @@ fi
 %changelog
 * Mon May 21 2012 Pádraig Brady <P at draigBrady.com> - 2012.1-6
 - Sync with essex stable
+- Don't auto create database on service start
 
 * Fri May 18 2012 Alan Pevec <apevec at redhat.com> - 2012.1-5
 - Drop hard dep on python-kombu, notifications are configurable


More information about the scm-commits mailing list