Merge lp:~james-page/ceilometer/fixup-dbsync into lp:~ubuntu-server-dev/ceilometer/icehouse

Proposed by James Page on 2014-04-01
Status: Merged
Approved by: Chuck Short on 2014-04-01
Approved revision: 95
Merged at revision: 95
Proposed branch: lp:~james-page/ceilometer/fixup-dbsync
Merge into: lp:~ubuntu-server-dev/ceilometer/icehouse
Diff against target: 63 lines (+28/-18)
2 files modified
debian/ceilometer-common.postinst (+21/-18)
debian/changelog (+7/-0)
To merge this branch: bzr merge lp:~james-page/ceilometer/fixup-dbsync
Reviewer Review Type Date Requested Status
Ubuntu Server Developers 2014-04-01 Pending
Review via email: mp+213686@code.launchpad.net
To post a comment you must log in.

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-03-12 15:01:59 +0000
3+++ debian/ceilometer-common.postinst 2014-04-01 16:33:23 +0000
4@@ -1,23 +1,26 @@
5 #!/bin/sh -e
6
7 if [ "$1" = "configure" ]; then
8- if ! getent group ceilometer > /dev/null 2>&1; then
9- addgroup --system ceilometer >/dev/null
10- fi
11-
12- if ! getent passwd ceilometer > /dev/null 2>&1; then
13- adduser --system --home /var/lib/ceilometer --ingroup ceilometer --no-create-home --shell /bin/false ceilometer
14- fi
15-
16- chown -R ceilometer:adm /var/log/ceilometer
17- chmod 0750 /var/log/ceilometer
18- chown -R ceilometer:ceilometer /var/lib/ceilometer /etc/ceilometer
19-
20- su -s /bin/sh -c '/usr/bin/ceilometer-dbsync' ceilometer
21-
22- if [ -e /var/lib/ceilometer/ceilometer.sqlite ]; then
23- chown ceilometer:ceilometer /var/lib/ceilometer/ceilometer.sqlite
24- chmod 0600 /var/lib/ceilometer/ceilometer.sqlite
25- fi
26+ if ! getent group ceilometer > /dev/null 2>&1; then
27+ addgroup --system ceilometer >/dev/null
28+ fi
29+
30+ if ! getent passwd ceilometer > /dev/null 2>&1; then
31+ adduser --system --home /var/lib/ceilometer --ingroup ceilometer --no-create-home --shell /bin/false ceilometer
32+ fi
33+
34+ chown -R ceilometer:adm /var/log/ceilometer
35+ chmod 0750 /var/log/ceilometer
36+ chown -R ceilometer:ceilometer /var/lib/ceilometer /etc/ceilometer
37+
38+ if grep -qE "^(sql_)?connection.*sqlite.*" /etc/ceilometer/ceilometer.conf
39+ then
40+ su -s /bin/sh -c '/usr/bin/ceilometer-dbsync' ceilometer
41+ fi
42+
43+ if [ -e /var/lib/ceilometer/ceilometer.sqlite ]; then
44+ chown ceilometer:ceilometer /var/lib/ceilometer/ceilometer.sqlite
45+ chmod 0600 /var/lib/ceilometer/ceilometer.sqlite
46+ fi
47 fi
48 #DEBHELPER#
49
50=== modified file 'debian/changelog'
51--- debian/changelog 2014-03-31 19:11:35 +0000
52+++ debian/changelog 2014-04-01 16:33:23 +0000
53@@ -1,3 +1,10 @@
54+ceilometer (2014.1~rc1-0ubuntu2) UNRELEASED; urgency=medium
55+
56+ * d/ceilometer-common.postinst: Only run db sync process if default sqlite
57+ connection is configured in /etc/ceilometer/ceilometer.conf (LP: #1182964).
58+
59+ -- James Page <james.page@ubuntu.com> Tue, 01 Apr 2014 17:23:52 +0100
60+
61 ceilometer (2014.1~rc1-0ubuntu1) trusty; urgency=medium
62
63 * New upstream release.

Subscribers

People subscribed via source and target branches