Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 692949 Details for
Bug 887811
a comprehensive glance-*.conf files should be included
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh92 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Reworked to limit distribution config to non-default values, with comment'd user-editable config under /etc/glance.
0001-Move-distribution-glance-api-registry-config-to-usr-.patch (text/plain), 13.49 KB, created by
Eoghan Glynn
on 2013-02-04 18:37:48 UTC
(
hide
)
Description:
Reworked to limit distribution config to non-default values, with comment'd user-editable config under /etc/glance.
Filename:
MIME Type:
Creator:
Eoghan Glynn
Created:
2013-02-04 18:37:48 UTC
Size:
13.49 KB
patch
obsolete
>From 7383741fd8e2a164c3345e7fdb339b509d1548e0 Mon Sep 17 00:00:00 2001 >From: Eoghan Glynn <eglynn@redhat.com> >Date: Fri, 1 Feb 2013 12:12:04 -0500 >Subject: [PATCH] Move distribution glance-{api|registry} config to /usr/share. > >Instead of placing the distribution glance-{api|registry}.conf >and correspoding paste.ini files under /etc/glance, we now >create "-dist" versions of these files in /usr/share, containing >non-default initial config values. > >Then the old default config location under /etc/glance is now >reserved for user-overridable config, initially all comment'd out. > >The %config(noreplace) macro is set on the user-editable files >(so that user edits are not lost when the package is removed), >but not on the distribution config (which is not expected to be >modified post-install). > >This is a work-in-progress patch, intended to elicit feedback on >the approach taken. A subsequent version will move the remaining >boilerplate config to /usr/share. >--- > glance-api-dist.conf | 5 +++ > glance-registry-dist.conf | 1 + > openstack-glance-api.init | 8 +++-- > openstack-glance-api.upstart | 2 +- > openstack-glance-registry.init | 9 ++++-- > openstack-glance-registry.upstart | 2 +- > openstack-glance.spec | 61 +++++++++++++++++++++++------------- > 7 files changed, 58 insertions(+), 30 deletions(-) > create mode 100644 glance-api-dist.conf > create mode 100644 glance-registry-dist.conf > >diff --git a/glance-api-dist.conf b/glance-api-dist.conf >new file mode 100644 >index 0000000..c079ff0 >--- /dev/null >+++ b/glance-api-dist.conf >@@ -0,0 +1,5 @@ >+[DEFAULT] >+ >+verbose = True >+qpid_heartbeat = 5 >+scrub_time = 43200 >diff --git a/glance-registry-dist.conf b/glance-registry-dist.conf >new file mode 100644 >index 0000000..db4574b >--- /dev/null >+++ b/glance-registry-dist.conf >@@ -0,0 +1 @@ >+[DEFAULT] >diff --git a/openstack-glance-api.init b/openstack-glance-api.init >index 549b63d..d95ab2d 100644 >--- a/openstack-glance-api.init >+++ b/openstack-glance-api.init >@@ -19,7 +19,8 @@ > suffix=api > prog=openstack-glance-$suffix > exec="/usr/bin/glance-$suffix" >-config="/etc/glance/glance-$suffix.conf" >+dist_config="/usr/share/glance/glance-$suffix-dist.conf" >+user_config="/etc/glance/glance-$suffix.conf" > pidfile="/var/run/glance/glance-$suffix.pid" > > [ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog >@@ -28,9 +29,10 @@ lockfile=/var/lock/subsys/$prog > > start() { > [ -x $exec ] || exit 5 >- [ -f $config ] || exit 6 >+ [ -f $dist_config ] || exit 6 >+ [ -f $user_config ] || exit 7 > echo -n $"Starting $prog: " >- daemon --user glance --pidfile $pidfile "$exec --config-file $config --debug --verbose &>/dev/null & echo \$! > $pidfile" >+ daemon --user glance --pidfile $pidfile "$exec --config-file $dist_config --config-file $user_config --debug --verbose &>/dev/null & echo \$! > $pidfile" > retval=$? > echo > [ $retval -eq 0 ] && touch $lockfile >diff --git a/openstack-glance-api.upstart b/openstack-glance-api.upstart >index 1539397..d6fdd4f 100644 >--- a/openstack-glance-api.upstart >+++ b/openstack-glance-api.upstart >@@ -5,4 +5,4 @@ stop on runlevel [S016] > > respawn > >-exec su -s /bin/sh -c "exec /usr/bin/glance-api --config-file /etc/glance/glance-api.conf" glance >+exec su -s /bin/sh -c "exec /usr/bin/glance-api --config-file /usr/share/lib/glance/glance-api-dist.conf --config-file /etc/glance/glance-api.conf" glance >diff --git a/openstack-glance-registry.init b/openstack-glance-registry.init >index 48bab47..6f6c200 100644 >--- a/openstack-glance-registry.init >+++ b/openstack-glance-registry.init >@@ -19,7 +19,9 @@ > suffix=registry > prog=openstack-glance-$suffix > exec="/usr/bin/glance-$suffix" >-config="/etc/glance/glance-$suffix.conf" >+dist_config="/usr/share/glance/glance-$suffix-dist.conf" >+user_config="/etc/glance/glance-$suffix.conf" >+ > pidfile="/var/run/glance/glance-$suffix.pid" > > [ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog >@@ -28,9 +30,10 @@ lockfile=/var/lock/subsys/$prog > > start() { > [ -x $exec ] || exit 5 >- [ -f $config ] || exit 6 >+ [ -f $dist_config ] || exit 6 >+ [ -f $user_config ] || exit 7 > echo -n $"Starting $prog: " >- daemon --user glance --pidfile $pidfile "$exec --config-file $config --debug --verbose &>/dev/null & echo \$! > $pidfile" >+ daemon --user glance --pidfile $pidfile "$exec --config-file $dist_config --config-file $user_config --debug --verbose &>/dev/null & echo \$! > $pidfile" > retval=$? > echo > [ $retval -eq 0 ] && touch $lockfile >diff --git a/openstack-glance-registry.upstart b/openstack-glance-registry.upstart >index eccae41..b0bdecb 100644 >--- a/openstack-glance-registry.upstart >+++ b/openstack-glance-registry.upstart >@@ -5,4 +5,4 @@ stop on runlevel [S016] > > respawn > >-exec su -s /bin/sh -c "exec /usr/bin/glance-registry --config-file /etc/glance/glance-registry.conf" glance >+exec su -s /bin/sh -c "exec /usr/bin/glance-registry --config-file /usr/share/glance/glance-registry-dist.conf --config-file /etc/glance/glance-registry.conf" glance >diff --git a/openstack-glance.spec b/openstack-glance.spec >index 40ba0f1..8f1da40 100644 >--- a/openstack-glance.spec >+++ b/openstack-glance.spec >@@ -3,7 +3,7 @@ > # > Name: openstack-glance > Version: 2012.2.1 >-Release: 5%{?dist} >+Release: 6%{?dist} > Summary: OpenStack Image Service > > Group: Applications/System >@@ -15,6 +15,8 @@ Source100: openstack-glance-api.upstart > Source2: openstack-glance-registry.init > Source200: openstack-glance-registry.upstart > Source3: openstack-glance.logrotate >+Source4: glance-api-dist.conf >+Source5: glance-registry-dist.conf > > # > # patches_base=2012.2.1_rhos >@@ -134,35 +136,24 @@ echo %{version} > glance/versioninfo > %build > > # Change the default config >-openstack-config --set etc/glance-registry.conf DEFAULT sql_connection mysql://glance:glance@localhost/glance >-openstack-config --set etc/glance-api.conf DEFAULT sql_connection mysql://glance:glance@localhost/glance >-# Move authtoken configuration out of paste.ini >+ > openstack-config --del etc/glance-api-paste.ini filter:authtoken admin_tenant_name > openstack-config --del etc/glance-api-paste.ini filter:authtoken admin_user > openstack-config --del etc/glance-api-paste.ini filter:authtoken admin_password > openstack-config --del etc/glance-api-paste.ini filter:authtoken auth_host > openstack-config --del etc/glance-api-paste.ini filter:authtoken auth_port > openstack-config --del etc/glance-api-paste.ini filter:authtoken auth_protocol >-#openstack-config --set etc/glance-api.conf paste_deploy flavor keystone >-openstack-config --set etc/glance-api.conf keystone_authtoken admin_tenant_name %%SERVICE_TENANT_NAME%% >-openstack-config --set etc/glance-api.conf keystone_authtoken admin_user %SERVICE_USER% >-openstack-config --set etc/glance-api.conf keystone_authtoken admin_password %SERVICE_PASSWORD% >-openstack-config --set etc/glance-api.conf keystone_authtoken auth_host 127.0.0.1 >-openstack-config --set etc/glance-api.conf keystone_authtoken auth_port 35357 >-openstack-config --set etc/glance-api.conf keystone_authtoken auth_protocol http >+ >+sed -i '/^[^#\[]/s/^/#/' etc/glance-api.conf >+ > openstack-config --del etc/glance-registry-paste.ini filter:authtoken admin_tenant_name > openstack-config --del etc/glance-registry-paste.ini filter:authtoken admin_user > openstack-config --del etc/glance-registry-paste.ini filter:authtoken admin_password > openstack-config --del etc/glance-registry-paste.ini filter:authtoken auth_host > openstack-config --del etc/glance-registry-paste.ini filter:authtoken auth_port > openstack-config --del etc/glance-registry-paste.ini filter:authtoken auth_protocol >-#openstack-config --set etc/glance-registry.conf paste_deploy flavor keystone >-openstack-config --set etc/glance-registry.conf keystone_authtoken admin_tenant_name %%SERVICE_TENANT_NAME%% >-openstack-config --set etc/glance-registry.conf keystone_authtoken admin_user %SERVICE_USER% >-openstack-config --set etc/glance-registry.conf keystone_authtoken admin_password %SERVICE_PASSWORD% >-openstack-config --set etc/glance-registry.conf keystone_authtoken auth_host 127.0.0.1 >-openstack-config --set etc/glance-registry.conf keystone_authtoken auth_port 35357 >-openstack-config --set etc/glance-registry.conf keystone_authtoken auth_protocol http >+ >+sed -i '/^[^#\[]/s/^/#/' etc/glance-registry.conf > > %{__python} setup.py build > >@@ -200,14 +191,38 @@ install -d -m 755 %{buildroot}%{_sharedstatedir}/glance/images > > # Config file > install -p -D -m 640 etc/glance-api.conf %{buildroot}%{_sysconfdir}/glance/glance-api.conf >-install -p -D -m 640 etc/glance-api-paste.ini %{buildroot}%{_sysconfdir}/glance/glance-api-paste.ini >+install -p -D -m 640 %{SOURCE4} %{buildroot}%{_datadir}/glance/glance-api-dist.conf >+install -p -D -m 640 etc/glance-api-paste.ini %{buildroot}%{_datadir}/glance/glance-api-dist-paste.ini > install -p -D -m 640 etc/glance-registry.conf %{buildroot}%{_sysconfdir}/glance/glance-registry.conf >-install -p -D -m 640 etc/glance-registry-paste.ini %{buildroot}%{_sysconfdir}/glance/glance-registry-paste.ini >+install -p -D -m 640 %{SOURCE5} %{buildroot}%{_datadir}/glance/glance-registry-dist.conf >+install -p -D -m 640 etc/glance-registry-paste.ini %{buildroot}%{_datadir}/glance/glance-registry-dist-paste.ini > install -p -D -m 640 etc/glance-cache.conf %{buildroot}%{_sysconfdir}/glance/glance-cache.conf > install -p -D -m 640 etc/glance-scrubber.conf %{buildroot}%{_sysconfdir}/glance/glance-scrubber.conf > install -p -D -m 640 etc/policy.json %{buildroot}%{_sysconfdir}/glance/policy.json > install -p -D -m 640 etc/schema-image.json %{buildroot}%{_sysconfdir}/glance/schema-image.json > >+openstack-config --set %{buildroot}%{_datadir}/glance/glance-api-dist.conf DEFAULT sql_connection mysql://glance:glance@localhost/glance >+openstack-config --set %{buildroot}%{_datadir}/glance/glance-api-dist.conf DEFAULT log_file %{_localstatedir}/log/glance/api.log >+openstack-config --set %{buildroot}%{_datadir}/glance/glance-api-dist.conf DEFAULT filesystem_store_datadir %{_localstatedir}/lib/glance/images/ >+openstack-config --set %{buildroot}%{_datadir}/glance/glance-api-dist.conf DEFAULT scrubber_datadir %{_localstatedir}/lib/glance/scrubber >+openstack-config --set %{buildroot}%{_datadir}/glance/glance-api-dist.conf DEFAULT image_cache_dir %{_localstatedir}/lib/glance/image-cache/ >+openstack-config --set %{buildroot}%{_datadir}/glance/glance-api-dist.conf auth_token admin_tenant_name %%SERVICE_TENANT_NAME%% >+openstack-config --set %{buildroot}%{_datadir}/glance/glance-api-dist.conf auth_token admin_user %SERVICE_USER% >+openstack-config --set %{buildroot}%{_datadir}/glance/glance-api-dist.conf auth_token admin_password %SERVICE_PASSWORD% >+openstack-config --set %{buildroot}%{_datadir}/glance/glance-api-dist.conf auth_token auth_host 127.0.0.1 >+openstack-config --set %{buildroot}%{_datadir}/glance/glance-api-dist.conf auth_token auth_port 35357 >+openstack-config --set %{buildroot}%{_datadir}/glance/glance-api-dist.conf auth_token auth_protocol http >+openstack-config --set %{buildroot}%{_datadir}/glance/glance-api-dist.conf paste_deploy config_file %{_datadir}/glance/glance-api-dist-paste.ini >+ >+openstack-config --set %{buildroot}%{_datadir}/glance/glance-registry-dist.conf DEFAULT sql_connection mysql://glance:glance@localhost/glance >+openstack-config --set %{buildroot}%{_datadir}/glance/glance-registry-dist.conf auth_token admin_tenant_name %%SERVICE_TENANT_NAME%% >+openstack-config --set %{buildroot}%{_datadir}/glance/glance-registry-dist.conf auth_token admin_user %SERVICE_USER% >+openstack-config --set %{buildroot}%{_datadir}/glance/glance-registry-dist.conf auth_token admin_password %SERVICE_PASSWORD% >+openstack-config --set %{buildroot}%{_datadir}/glance/glance-registry-dist.conf auth_token auth_host 127.0.0.1 >+openstack-config --set %{buildroot}%{_datadir}/glance/glance-registry-dist.conf auth_token auth_port 35357 >+openstack-config --set %{buildroot}%{_datadir}/glance/glance-registry-dist.conf auth_token auth_protocol http >+openstack-config --set %{buildroot}%{_datadir}/glance/glance-registry-dist.conf paste_deploy config_file %{_datadir}/glance/glance-registry-dist-paste.ini >+ > # Initscripts > install -p -D -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/openstack-glance-api > install -p -D -m 755 %{SOURCE2} %{buildroot}%{_initrddir}/openstack-glance-registry >@@ -264,14 +279,16 @@ fi > %{_mandir}/man1/glance*.1.gz > %dir %{_sysconfdir}/glance > %config(noreplace) %attr(-, root, glance) %{_sysconfdir}/glance/glance-api.conf >-%config(noreplace) %attr(-, root, glance) %{_sysconfdir}/glance/glance-api-paste.ini > %config(noreplace) %attr(-, root, glance) %{_sysconfdir}/glance/glance-registry.conf >-%config(noreplace) %attr(-, root, glance) %{_sysconfdir}/glance/glance-registry-paste.ini > %config(noreplace) %attr(-, root, glance) %{_sysconfdir}/glance/glance-cache.conf > %config(noreplace) %attr(-, root, glance) %{_sysconfdir}/glance/glance-scrubber.conf > %config(noreplace) %attr(-, root, glance) %{_sysconfdir}/glance/policy.json > %config(noreplace) %attr(-, root, glance) %{_sysconfdir}/glance/schema-image.json > %config(noreplace) %attr(-, root, glance) %{_sysconfdir}/logrotate.d/openstack-glance >+%attr(-, root, glance) %{_datadir}/glance/glance-api-dist.conf >+%attr(-, root, glance) %{_datadir}/glance/glance-api-dist-paste.ini >+%attr(-, root, glance) %{_datadir}/glance/glance-registry-dist.conf >+%attr(-, root, glance) %{_datadir}/glance/glance-registry-dist-paste.ini > %dir %attr(0755, glance, glance) %{_sharedstatedir}/glance > %dir %attr(0755, glance, glance) %{_localstatedir}/log/glance > %dir %attr(0755, glance, glance) %{_localstatedir}/run/glance >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
pbrady
: review+
Actions:
View
|
Diff
Attachments on
bug 887811
:
691642
|
692949
|
693472
|
695133
|
695136