Merge lp:~yolanda.robla/ceilometer/grizzly into lp:~openstack-ubuntu-testing/ceilometer/grizzly

Proposed by Yolanda Robla
Status: Merged
Merged at revision: 22
Proposed branch: lp:~yolanda.robla/ceilometer/grizzly
Merge into: lp:~openstack-ubuntu-testing/ceilometer/grizzly
Diff against target: 97 lines (+25/-16)
5 files modified
debian/ceilometer-common.postinst (+5/-9)
debian/changelog (+4/-5)
debian/control (+2/-2)
debian/patches/default-dbconnection-sqlite.patch (+13/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~yolanda.robla/ceilometer/grizzly
Reviewer Review Type Date Requested Status
James Page Approve
Review via email: mp+152916@code.launchpad.net

Description of the change

Default to sqlite

To post a comment you must log in.
Revision history for this message
James Page (james-page) wrote :

Yolanda

1) modifying configuration files in postinst

Please don't do it this way; instead patch the database_connection into the configuration file in the source tree and ship it as the default configuration file. That way dpkg takes care of maintaining end-user changes to this file.

2) run dbsync as ceilometer user

- su -s /bin/sh -c '/usr/bin/ceilometer-dbsync --os-username ceilometer'
+ su -s /bin/sh -c '/usr/bin/ceilometer-dbsync' ceilometer

review: Needs Fixing
lp:~yolanda.robla/ceilometer/grizzly updated
23. By Yolanda Robla

d/patches/default-dbconnection-sqlite.patch: default db to sqlite

24. By Yolanda Robla

added patch for configuring sqlite

Revision history for this message
James Page (james-page) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/ceilometer-common.postinst'
2--- debian/ceilometer-common.postinst 2013-02-05 14:11:42 +0000
3+++ debian/ceilometer-common.postinst 2013-03-12 15:05:32 +0000
4@@ -13,15 +13,11 @@
5 chmod 0750 /var/log/ceilometer
6 chown -R ceilometer:ceilometer /var/lib/ceilometer /etc/ceilometer
7
8- # check if mongo exists and auto configure the database
9- if [ -n "`ps aux | grep mongo | grep -v grep`" ]; then
10- # check if the config file hasn't been modified
11- if [ ! -n "`grep "^database_connection\s*\=.*" /etc/ceilometer/ceilometer.conf`" ]; then
12- # modify config file and setup mongo
13- _DATABASE_CONNECTION="mongodb://localhost:27017/ceilometer"
14- echo "database_connection = ${_DATABASE_CONNECTION}" >> /etc/ceilometer/ceilometer.conf
15- su -s /bin/sh -c '/usr/bin/ceilometer-dbsync --os-username ceilometer'
16- fi
17+ su -s /bin/sh -c '/usr/bin/ceilometer-dbsync' ceilometer
18+
19+ if [ -e /var/lib/ceilometer/ceilometer.sqlite ]; then
20+ chown ceilometer:ceilometer /var/lib/ceilometer/ceilometer.sqlite
21+ chmod 0600 /var/lib/ceilometer/ceilometer.sqlite
22 fi
23 fi
24 #DEBHELPER#
25
26=== modified file 'debian/changelog'
27--- debian/changelog 2013-03-11 22:42:51 +0000
28+++ debian/changelog 2013-03-12 15:05:32 +0000
29@@ -29,16 +29,15 @@
30 [ Yolanda Robla ]
31 * d/rules: Copy ceilometer.conf.sample to ceilometer.conf.
32 * d/ceilometer-common.install: Install ceilometer.conf and ceilometer-dbsync.
33- * d/ceilometer-common.postinst: Configure mongo connection by default,
34- fixing user/group creation.
35+ * d/ceilometer-common.postinst: fixing user/group creation.
36 * d/*.upstart: Fix upstart jobs.
37 * d/pydist-overrides: Correct pymongo and wsme package names.
38- * d/control: moved mongodb recommends to api and collector
39- packages (LP: #1131627).
40+ * d/control: modified mongodb recommends to suggests (LP: #1131627).
41 * d/files: copying pipeline.yaml.
42 * d/control: fixed typo (LP: #1140309).
43+ * d/patches/default-dbconnection-sqlite.patch: default db to sqlite
44
45- -- Yolanda Robla <yolanda.robla@canonical.com> Mon, 11 Mar 2013 14:23:00 +0100
46+ -- Yolanda Robla <yolanda.robla@canonical.com> Mon, 12 Mar 2013 15:41:00 +0100
47
48 ceilometer (0.1-0ubuntu1) quantal; urgency=low
49
50
51=== modified file 'debian/control'
52--- debian/control 2013-03-11 22:42:51 +0000
53+++ debian/control 2013-03-12 15:05:32 +0000
54@@ -84,7 +84,7 @@
55 ceilometer-common (= ${binary:Version}),
56 ${misc:Depends},
57 ${python:Depends}
58-Recommends: mongodb
59+Suggests: mongodb
60 Description: ceilometer collector service
61 Ceilometer aims to deliver a unique point of contact for billing systems to
62 aquire all counters they need to establish customer billing, accross all
63@@ -103,7 +103,7 @@
64 ceilometer-common (= ${binary:Version}),
65 ${misc:Depends},
66 ${python:Depends}
67-Recommends: mongodb
68+Suggests: mongodb
69 Description: ceilometer api service
70 Ceilometer aims to deliver a unique point of contact for billing systems to
71 aquire all counters they need to establish customer billing, accross all
72
73=== added file 'debian/patches/default-dbconnection-sqlite.patch'
74--- debian/patches/default-dbconnection-sqlite.patch 1970-01-01 00:00:00 +0000
75+++ debian/patches/default-dbconnection-sqlite.patch 2013-03-12 15:05:32 +0000
76@@ -0,0 +1,13 @@
77+Index: etc/ceilometer/ceilometer.conf.sample
78+===================================================================
79+--- a/etc/ceilometer/ceilometer.conf.sample
80++++ b/etc/ceilometer/ceilometer.conf.sample
81+@@ -262,7 +262,7 @@
82+
83+ ######## defined in ceilometer.storage ########
84+
85+-# database_connection=mongodb://localhost:27017/ceilometer
86++database_connection=sqlite:////var/lib/ceilometer/ceilometer.sqlite
87+ #### (StrOpt) Database connection string
88+
89+
90
91=== modified file 'debian/patches/series'
92--- debian/patches/series 2013-03-11 22:42:51 +0000
93+++ debian/patches/series 2013-03-12 15:05:32 +0000
94@@ -1,2 +1,3 @@
95 remove-hbase-support.patch
96 requests-dep.patch
97+default-dbconnection-sqlite.patch

Subscribers

People subscribed via source and target branches