1 |
commit: 6531bd29d8fb66db11fde079b15583dc74f59fc8 |
2 |
Author: Michael Weber <michael <AT> xmw <DOT> de> |
3 |
AuthorDate: Mon Mar 2 22:46:59 2015 +0000 |
4 |
Commit: Michael Weber <xmw <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Mar 2 22:46:59 2015 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=dev/xmw.git;a=commit;h=6531bd29 |
7 |
|
8 |
Drop USE=rocksdb and USE=kinetic for now. |
9 |
|
10 |
Package-Manager: portage-2.2.17 |
11 |
Manifest-Sign-Key: 62EEF090 |
12 |
|
13 |
--- |
14 |
sys-cluster/ceph/ChangeLog | 5 +++ |
15 |
sys-cluster/ceph/ceph-0.87.1.ebuild | 13 ++++--- |
16 |
sys-cluster/ceph/files/README.gentoo | 18 ++++++++++ |
17 |
sys-cluster/ceph/files/ceph-0.87.1-stdint.patch | 40 +++++++++++++++++++++ |
18 |
sys-cluster/ceph/files/ceph.confd-r1 | 4 +++ |
19 |
sys-cluster/ceph/files/ceph.initd-r1 | 48 +++++++++++++++++++++++++ |
20 |
sys-cluster/ceph/files/ceph.logrotate | 22 ++++++++++++ |
21 |
sys-cluster/ceph/metadata.xml | 2 -- |
22 |
8 files changed, 146 insertions(+), 6 deletions(-) |
23 |
|
24 |
diff --git a/sys-cluster/ceph/ChangeLog b/sys-cluster/ceph/ChangeLog |
25 |
index 06f1009..2bedbcb 100644 |
26 |
--- a/sys-cluster/ceph/ChangeLog |
27 |
+++ b/sys-cluster/ceph/ChangeLog |
28 |
@@ -1,3 +1,8 @@ |
29 |
+ 02 Mar 2015; Michael Weber <xmw@g.o> +files/README.gentoo, |
30 |
+ +files/ceph-0.87.1-stdint.patch, +files/ceph.confd-r1, +files/ceph.initd-r1, |
31 |
+ +files/ceph.logrotate, ceph-0.87.1.ebuild, metadata.xml: |
32 |
+ Drop USE=rocksdb and USE=kinetic for now. |
33 |
+ |
34 |
*ceph-0.87.1 (02 Mar 2015) |
35 |
|
36 |
02 Mar 2015; Michael Weber <xmw@g.o> +ceph-0.87.1.ebuild, |
37 |
|
38 |
diff --git a/sys-cluster/ceph/ceph-0.87.1.ebuild b/sys-cluster/ceph/ceph-0.87.1.ebuild |
39 |
index 4399c34..c009cb1 100644 |
40 |
--- a/sys-cluster/ceph/ceph-0.87.1.ebuild |
41 |
+++ b/sys-cluster/ceph/ceph-0.87.1.ebuild |
42 |
@@ -24,7 +24,7 @@ HOMEPAGE="http://ceph.com/" |
43 |
|
44 |
LICENSE="LGPL-2.1" |
45 |
SLOT="0" |
46 |
-IUSE="babeltrace cryptopp debug fuse gtk kinetic libatomic +libaio lttng +nss radosgw rocksdb static-libs tcmalloc xfs zfs" |
47 |
+IUSE="babeltrace cryptopp debug fuse gtk libatomic +libaio lttng +nss radosgw static-libs tcmalloc xfs zfs" |
48 |
|
49 |
CDEPEND=" |
50 |
app-arch/snappy |
51 |
@@ -74,7 +74,6 @@ REQUIRED_USE=" |
52 |
STRIP_MASK="/usr/lib*/rados-classes/*" |
53 |
|
54 |
PATCHES=( |
55 |
- "${FILESDIR}"/${PN}-fix-gnustack.patch |
56 |
"${FILESDIR}"/${PN}-0.79-libzfs.patch |
57 |
) |
58 |
|
59 |
@@ -85,6 +84,9 @@ pkg_setup() { |
60 |
src_prepare() { |
61 |
[[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}" |
62 |
|
63 |
+ sed -e '1i#include <stdint.h>' \ |
64 |
+ -i src/tracing/{objectstore,oprequest,osd,pg}.tp || die |
65 |
+ |
66 |
epatch_user |
67 |
eautoreconf |
68 |
} |
69 |
@@ -106,10 +108,13 @@ src_configure() { |
70 |
$(use_with tcmalloc) \ |
71 |
$(use_with xfs libxfs) \ |
72 |
$(use_with zfs libzfs) \ |
73 |
- $(use_with kinetic) \ |
74 |
- $(use_with rocksdb librocksdb ) \ |
75 |
+ --without-kinetic \ |
76 |
+ --without-librocksdb \ |
77 |
$(use_with lttng ) \ |
78 |
$(use_with babeltrace) |
79 |
+ |
80 |
+ # patch files generated by lttng-gen-lp |
81 |
+ #epatch "${FILESDIR}"/${P}-stdint.patch |
82 |
} |
83 |
|
84 |
src_install() { |
85 |
|
86 |
diff --git a/sys-cluster/ceph/files/README.gentoo b/sys-cluster/ceph/files/README.gentoo |
87 |
new file mode 100644 |
88 |
index 0000000..b049515 |
89 |
--- /dev/null |
90 |
+++ b/sys-cluster/ceph/files/README.gentoo |
91 |
@@ -0,0 +1,18 @@ |
92 |
+1) We'd suggest you to install following packages |
93 |
+ sys-block/parted to manage disk partions |
94 |
+ sys-fs/btrfs-progs to use btrfs filesytem |
95 |
+ sys-fs/cryptsetup to use encrypted devices with dm-crypt |
96 |
+ |
97 |
+2) To start several daemons of one specific type, create your own scripts |
98 |
+ cd /etc/init.d |
99 |
+ for dmn in mds.a mon.a osd.0 osd.1 osd.2; do |
100 |
+ ln -s ceph ceph-${dmn}; |
101 |
+ rc-update add ceph-${dmn} default; |
102 |
+ done |
103 |
+ |
104 |
+3) If you spread ceph daemons over several different machines, |
105 |
+ We'd highly recommend you to start ntp-client to keep the system time sync. |
106 |
+ Try to choose one of following ntp client to install and add into runlevel. |
107 |
+ net-misc/ntp |
108 |
+ net-misc/openntpd |
109 |
+ net-misc/chrony |
110 |
|
111 |
diff --git a/sys-cluster/ceph/files/ceph-0.87.1-stdint.patch b/sys-cluster/ceph/files/ceph-0.87.1-stdint.patch |
112 |
new file mode 100644 |
113 |
index 0000000..6697940 |
114 |
--- /dev/null |
115 |
+++ b/sys-cluster/ceph/files/ceph-0.87.1-stdint.patch |
116 |
@@ -0,0 +1,40 @@ |
117 |
+--- ceph-0.87.1/src/tracing/objectstore.h |
118 |
++++ ceph-0.87.1/src/tracing/objectstore.h |
119 |
+@@ -9,6 +9,7 @@ |
120 |
+ #define OBJECTSTORE_H |
121 |
+ |
122 |
+ #include <lttng/tracepoint.h> |
123 |
++#include <stdint.h> |
124 |
+ |
125 |
+ TRACEPOINT_EVENT(objectstore, exists_enter, |
126 |
+ TP_ARGS( |
127 |
+--- ceph-0.87.1/src/tracing/oprequest.h |
128 |
++++ ceph-0.87.1/src/tracing/oprequest.h |
129 |
+@@ -9,6 +9,7 @@ |
130 |
+ #define OPREQUEST_H |
131 |
+ |
132 |
+ #include <lttng/tracepoint.h> |
133 |
++#include <stdint.h> |
134 |
+ |
135 |
+ TRACEPOINT_EVENT(oprequest, set_rmw_flags, |
136 |
+ TP_ARGS( |
137 |
+--- ceph-0.87.1/src/tracing/osd.h |
138 |
++++ ceph-0.87.1/src/tracing/osd.h |
139 |
+@@ -9,6 +8,7 @@ |
140 |
+ #define OSD_H |
141 |
+ |
142 |
+ #include <lttng/tracepoint.h> |
143 |
++#include <stdint.h> |
144 |
+ |
145 |
+ TRACEPOINT_EVENT(osd, prepare_tx_enter, |
146 |
+ TP_ARGS( |
147 |
+--- ceph-0.87.1/src/tracing/pg.h |
148 |
++++ ceph-0.87.1/src/tracing/pg.h |
149 |
+@@ -9,6 +9,7 @@ |
150 |
+ #define PG_H |
151 |
+ |
152 |
+ #include <lttng/tracepoint.h> |
153 |
++#include <stdint.h> |
154 |
+ |
155 |
+ TRACEPOINT_EVENT(pg, queue_op, |
156 |
+ TP_ARGS( |
157 |
|
158 |
diff --git a/sys-cluster/ceph/files/ceph.confd-r1 b/sys-cluster/ceph/files/ceph.confd-r1 |
159 |
new file mode 100644 |
160 |
index 0000000..3bdb8b4 |
161 |
--- /dev/null |
162 |
+++ b/sys-cluster/ceph/files/ceph.confd-r1 |
163 |
@@ -0,0 +1,4 @@ |
164 |
+# Example |
165 |
+ |
166 |
+# default ceph conf file |
167 |
+#ceph_conf="/etc/ceph/ceph.conf" |
168 |
|
169 |
diff --git a/sys-cluster/ceph/files/ceph.initd-r1 b/sys-cluster/ceph/files/ceph.initd-r1 |
170 |
new file mode 100644 |
171 |
index 0000000..ca5ab60 |
172 |
--- /dev/null |
173 |
+++ b/sys-cluster/ceph/files/ceph.initd-r1 |
174 |
@@ -0,0 +1,48 @@ |
175 |
+#!/sbin/runscript |
176 |
+ |
177 |
+ceph_conf="${ceph_conf:-/etc/ceph/ceph.conf}" |
178 |
+extra_commands="reload" |
179 |
+type=${RC_SVCNAME:5:3} |
180 |
+id=${RC_SVCNAME:9} |
181 |
+id=${id:-"0"} |
182 |
+command="/usr/bin/ceph-${type}" |
183 |
+pidfile="/run/ceph/${type}.${id}.pid" |
184 |
+command_args="-i ${id} --pid-file ${pidfile} -c ${ceph_conf}" |
185 |
+ |
186 |
+depend() { |
187 |
+ after net ntpd ntp-client chronyd |
188 |
+ before netmount |
189 |
+} |
190 |
+ |
191 |
+is_type_valid() { |
192 |
+ case ${type} in |
193 |
+ mon|mds|osd) return 0;; |
194 |
+ *) return 1;; |
195 |
+ esac |
196 |
+} |
197 |
+ |
198 |
+start_pre() { |
199 |
+ checkpath -d -q $(dirname ${pidfile}) |
200 |
+} |
201 |
+ |
202 |
+start() { |
203 |
+ ebegin "Starting Ceph ${type}.${id}" |
204 |
+ if ! is_type_valid ;then |
205 |
+ eerror "Please give valid Ceph Server Type: mds, mon, osd" |
206 |
+ return 1 |
207 |
+ fi |
208 |
+ ${command} ${command_args} |
209 |
+ eend $? |
210 |
+} |
211 |
+ |
212 |
+stop() { |
213 |
+ ebegin "Stopping Ceph ${type}.${id}" |
214 |
+ start-stop-daemon --stop --pidfile ${pidfile} |
215 |
+ eend $? |
216 |
+} |
217 |
+ |
218 |
+reload() { |
219 |
+ ebegin "Reloading Ceph ${type}.${id}" |
220 |
+ start-stop-daemon --signal 1 --pidfile ${pidfile} |
221 |
+ eend $? |
222 |
+} |
223 |
|
224 |
diff --git a/sys-cluster/ceph/files/ceph.logrotate b/sys-cluster/ceph/files/ceph.logrotate |
225 |
new file mode 100644 |
226 |
index 0000000..ff50cd9 |
227 |
--- /dev/null |
228 |
+++ b/sys-cluster/ceph/files/ceph.logrotate |
229 |
@@ -0,0 +1,22 @@ |
230 |
+/var/log/ceph/admin.log |
231 |
+/var/log/ceph/ceph.log |
232 |
+/var/log/ceph/ceph-mon.* |
233 |
+/var/log/ceph/ceph-mds.* |
234 |
+/var/log/ceph/ceph-osd.* |
235 |
+{ |
236 |
+ rotate 7 |
237 |
+ daily |
238 |
+ compress |
239 |
+ sharedscripts |
240 |
+ prerotate |
241 |
+ for dmn in $(cd /run/ceph && ls *.asok 2>/dev/null); do |
242 |
+ ceph --admin-daemon /run/ceph/${dmn} log flush 2>/dev/null >/dev/null |
243 |
+ done |
244 |
+ endscript |
245 |
+ postrotate |
246 |
+ for dmn in $(cd /run/ceph && ls *.asok 2>/dev/null); do |
247 |
+ ceph --admin-daemon /run/ceph/${dmn} log reopen 2>/dev/null >/dev/null |
248 |
+ done |
249 |
+ endscript |
250 |
+ missingok |
251 |
+} |
252 |
|
253 |
diff --git a/sys-cluster/ceph/metadata.xml b/sys-cluster/ceph/metadata.xml |
254 |
index bba8e8a..8e46f85 100644 |
255 |
--- a/sys-cluster/ceph/metadata.xml |
256 |
+++ b/sys-cluster/ceph/metadata.xml |
257 |
@@ -17,8 +17,6 @@ Ceph is a distributed network file system designed to provide excellent performa |
258 |
<flag name='libaio'>Use libaio as asynchronous input/output library</flag> |
259 |
<flag name='lttng'>Add support for LTTng</flag> |
260 |
<flag name='babeltrace'>Add support for LTTng babeltrace</flag> |
261 |
- <flag name='kinetic'>Add support for kinetic</flag> |
262 |
- <flag name='rocksdb'>Add support for rocksdb</flag> |
263 |
<flag name='nss'>Use <pkg>dev-libs/nss</pkg> for cryptography</flag> |
264 |
<flag name='radosgw'>Add radosgw support</flag> |
265 |
<flag name='xfs'>Add xfs support</flag> |