1 |
commit: 7a2b0429aab9a5acff50e49ee17b9f73a1da5642 |
2 |
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Dec 5 20:09:53 2017 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 5 20:09:53 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a2b0429 |
7 |
|
8 |
sys-cluster/ceph: Version bump to 12.2.2 |
9 |
|
10 |
This also pulls in a patch for 639734 and adds some minor changes to the |
11 |
defaults in the init script. |
12 |
|
13 |
Closes: https://bugs.gentoo.org/639734 |
14 |
Package-Manager: Portage-2.3.16, Repoman-2.3.6 |
15 |
|
16 |
sys-cluster/ceph/Manifest | 1 + |
17 |
sys-cluster/ceph/ceph-12.2.2.ebuild | 288 +++++++++++++++++++++ |
18 |
.../files/ceph-12.2.2-build-without-radosgw.patch | 34 +++ |
19 |
sys-cluster/ceph/files/ceph.confd-r4 | 70 +++++ |
20 |
sys-cluster/ceph/files/ceph.initd-r6 | 87 +++++++ |
21 |
5 files changed, 480 insertions(+) |
22 |
|
23 |
diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest |
24 |
index e37ff62073c..be06ffb54e4 100644 |
25 |
--- a/sys-cluster/ceph/Manifest |
26 |
+++ b/sys-cluster/ceph/Manifest |
27 |
@@ -3,3 +3,4 @@ DIST ceph-10.2.3.tar.gz 11596171 SHA256 dca933aa14db67b404d836ef510bd418091978ed |
28 |
DIST ceph-10.2.7.tar.gz 14518491 SHA256 2cdfeaa9a08e94c2d35f540b450bbf64b2a694bd537679834185e98fc59d8ba2 SHA512 7e0686e9efa4ddd9d548f4145b448f8232f1ca29b08428daa5cd60a74ce26f1176a1f2ebbf2ac1761d9e6c1d364a5ffa194d2b3a18a8111f59b7c27f7a1d7734 WHIRLPOOL b6b6902230401b5f4c6f27801f315678bdc7b99aab4e50b54d941fc3a425b4f0fa9390484f2e12d6b4f962253fb8772fb706dad35d490b4542b06db166fab59b |
29 |
DIST ceph-10.2.9.tar.gz 14550219 SHA256 3d93f4fc4a66b1d9f9ce43f65868dc18287cea32fbb2c7421faca6aed2b52a80 SHA512 1d59146614aa87ca551b05b795a684071a3cfb4ce6013e978ba650403c6732b2aa13f3c3cc191e6a1ea34b4631c82e97700593c24e200c41ec2f2b43b3ef5547 WHIRLPOOL 42215d33c4f617087e1b0ef81cd41b42330c3605acf625b0668d44eba9e982239683b466a1cc1a6f926fc1d439dfd6be4ce220f783da7d2214d36a2a6cc9181f |
30 |
DIST ceph-12.2.1.tar.gz 148738778 SHA256 512666ee88610640d66b261f9307c96ccd70eb25cd3349acd083fb1220c8a32e SHA512 ec2623c1f6ab563c6fd0bb5fd046c78528fdbedca7cde347c92a9b15005d2ab2b1a46d7294e93f56933386462f1066750285109aafb6bf94f7d5bcdb7214d8a8 WHIRLPOOL 6a22bc7080483b3fe161bfc441b9fdf1a85d2bd9a394e89db2005a229397d206614d3e7a0d84cf7521822688faf4b92ca75ad4ce586de0d262fdda5c94b4f904 |
31 |
+DIST ceph-12.2.2.tar.gz 148763718 BLAKE2B 5c9a56bc536b723ca3a6a0aa68c7f456032c892716167dfa213cda4964e3a45e970efe6dd67e5c43ef6f6018bd9367e0c890de270acccf3217b848b58cb98488 SHA512 89b166dc4b58e0110ebe0147eef9f47e1090ccee01702b3f72cfbdca856d02bf03b2663de9e88c84b21a2a61f8f92211e217a05b8bdcf7d5de3158adbe49db88 |
32 |
|
33 |
diff --git a/sys-cluster/ceph/ceph-12.2.2.ebuild b/sys-cluster/ceph/ceph-12.2.2.ebuild |
34 |
new file mode 100644 |
35 |
index 00000000000..7040667f300 |
36 |
--- /dev/null |
37 |
+++ b/sys-cluster/ceph/ceph-12.2.2.ebuild |
38 |
@@ -0,0 +1,288 @@ |
39 |
+# Copyright 1999-2017 Gentoo Foundation |
40 |
+# Distributed under the terms of the GNU General Public License v2 |
41 |
+ |
42 |
+EAPI=6 |
43 |
+PYTHON_COMPAT=( python{2_7,3_{4,5,6}} ) |
44 |
+DISTUTILS_OPTIONAL=1 |
45 |
+ |
46 |
+inherit check-reqs cmake-utils distutils-r1 python-r1 udev user systemd \ |
47 |
+ readme.gentoo-r1 flag-o-matic |
48 |
+ |
49 |
+if [[ ${PV} == *9999* ]]; then |
50 |
+ inherit git-r3 |
51 |
+ EGIT_REPO_URI="https://github.com/ceph/ceph.git" |
52 |
+ SRC_URI="" |
53 |
+else |
54 |
+ SRC_URI="https://download.ceph.com/tarballs/${P}.tar.gz" |
55 |
+ KEYWORDS="~amd64 ~arm64 ~x86" |
56 |
+fi |
57 |
+ |
58 |
+DESCRIPTION="Ceph distributed filesystem" |
59 |
+HOMEPAGE="https://ceph.com/" |
60 |
+ |
61 |
+LICENSE="LGPL-2.1 CC-BY-SA-1.0 GPL-2 BSD Boost-1.0 MIT" |
62 |
+SLOT="0" |
63 |
+ |
64 |
+CPU_FLAGS_X86=(sse{,2,3,4_1,4_2} ssse3) |
65 |
+ |
66 |
+IUSE="babeltrace cephfs fuse jemalloc ldap lttng +mgr nss +radosgw +ssl" |
67 |
+IUSE+=" static-libs systemd +tcmalloc test xfs zfs" |
68 |
+IUSE+=" $(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})" |
69 |
+ |
70 |
+# unbundling code commented out pending bugs 584056 and 584058 |
71 |
+#>=dev-libs/jerasure-2.0.0-r1 |
72 |
+#>=dev-libs/gf-complete-2.0.0 |
73 |
+COMMON_DEPEND=" |
74 |
+ virtual/libudev |
75 |
+ app-arch/bzip2:=[static-libs?] |
76 |
+ app-arch/lz4:=[static-libs?] |
77 |
+ app-arch/snappy:=[static-libs?] |
78 |
+ app-arch/zstd:=[static-libs?] |
79 |
+ app-misc/jq:=[static-libs?] |
80 |
+ dev-libs/boost:=[threads,context,python,static-libs?,${PYTHON_USEDEP}] |
81 |
+ dev-libs/crypto++:=[static-libs?] |
82 |
+ dev-libs/leveldb:=[snappy,static-libs?] |
83 |
+ dev-libs/libaio:=[static-libs?] |
84 |
+ dev-libs/libxml2:=[static-libs?] |
85 |
+ sys-apps/keyutils:=[static-libs?] |
86 |
+ sys-apps/util-linux:=[static-libs?] |
87 |
+ sys-libs/zlib:=[static-libs?] |
88 |
+ babeltrace? ( dev-util/babeltrace ) |
89 |
+ ldap? ( net-nds/openldap:=[static-libs?] ) |
90 |
+ lttng? ( dev-util/lttng-ust:= ) |
91 |
+ nss? ( dev-libs/nss:= ) |
92 |
+ fuse? ( sys-fs/fuse:0=[static-libs?] ) |
93 |
+ ssl? ( dev-libs/openssl:=[static-libs?] ) |
94 |
+ xfs? ( sys-fs/xfsprogs:=[static-libs?] ) |
95 |
+ zfs? ( sys-fs/zfs:=[static-libs?] ) |
96 |
+ radosgw? ( |
97 |
+ dev-libs/expat:=[static-libs?] |
98 |
+ dev-libs/openssl:=[static-libs?] |
99 |
+ net-misc/curl:=[static-libs?] |
100 |
+ ) |
101 |
+ jemalloc? ( dev-libs/jemalloc:=[static-libs?] ) |
102 |
+ !jemalloc? ( >=dev-util/google-perftools-2.4:=[static-libs?] ) |
103 |
+ ${PYTHON_DEPS} |
104 |
+ " |
105 |
+DEPEND="${COMMON_DEPEND} |
106 |
+ app-arch/cpio |
107 |
+ dev-lang/yasm |
108 |
+ dev-python/cython[${PYTHON_USEDEP}] |
109 |
+ dev-python/sphinx |
110 |
+ dev-util/gperf |
111 |
+ dev-util/valgrind |
112 |
+ sys-apps/which |
113 |
+ sys-devel/bc |
114 |
+ virtual/pkgconfig |
115 |
+ test? ( |
116 |
+ dev-python/tox[${PYTHON_USEDEP}] |
117 |
+ dev-python/virtualenv[${PYTHON_USEDEP}] |
118 |
+ sys-apps/grep[pcre] |
119 |
+ sys-fs/btrfs-progs |
120 |
+ )" |
121 |
+RDEPEND="${COMMON_DEPEND} |
122 |
+ net-misc/socat |
123 |
+ sys-apps/gptfdisk |
124 |
+ sys-block/parted |
125 |
+ sys-fs/cryptsetup |
126 |
+ !<sys-apps/openrc-0.26.3 |
127 |
+ dev-python/cherrypy[${PYTHON_USEDEP}] |
128 |
+ dev-python/flask[${PYTHON_USEDEP}] |
129 |
+ dev-python/pecan[${PYTHON_USEDEP}] |
130 |
+ dev-python/prettytable[${PYTHON_USEDEP}] |
131 |
+ dev-python/pyopenssl[${PYTHON_USEDEP}] |
132 |
+ dev-python/requests[${PYTHON_USEDEP}] |
133 |
+ dev-python/werkzeug[${PYTHON_USEDEP}] |
134 |
+ " |
135 |
+REQUIRED_USE=" |
136 |
+ $(python_gen_useflags 'python2*') |
137 |
+ ${PYTHON_REQUIRED_USE} |
138 |
+ ?? ( ssl nss ) |
139 |
+ ?? ( jemalloc tcmalloc ) |
140 |
+ " |
141 |
+ |
142 |
+RESTRICT="test? ( userpriv )" |
143 |
+ |
144 |
+# distribution tarball does not include everything needed for tests |
145 |
+RESTRICT+=" test" |
146 |
+ |
147 |
+STRIP_MASK="/usr/lib*/rados-classes/*" |
148 |
+ |
149 |
+UNBUNDLE_LIBS=( |
150 |
+ src/erasure-code/jerasure/jerasure |
151 |
+ src/erasure-code/jerasure/gf-complete |
152 |
+) |
153 |
+ |
154 |
+PATCHES=( |
155 |
+ "${FILESDIR}/ceph-12.2.0-use-provided-cpu-flag-values.patch" |
156 |
+ "${FILESDIR}/ceph-12.2.0-cflags.patch" |
157 |
+ "${FILESDIR}/ceph-12.2.1-systemd-unitdir.patch" |
158 |
+ "${FILESDIR}/ceph-12.2.2-build-without-radosgw.patch" |
159 |
+) |
160 |
+ |
161 |
+check-reqs_export_vars() { |
162 |
+ if use amd64; then |
163 |
+ CHECKREQS_DISK_BUILD="12G" |
164 |
+ CHECKREQS_DISK_USR="460M" |
165 |
+ else |
166 |
+ CHECKREQS_DISK_BUILD="1400M" |
167 |
+ CHECKREQS_DISK_USR="450M" |
168 |
+ fi |
169 |
+ |
170 |
+ export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR |
171 |
+} |
172 |
+ |
173 |
+user_setup() { |
174 |
+ enewgroup ceph ${CEPH_GID} |
175 |
+ enewuser ceph "${CEPH_UID:--1}" -1 /var/lib/ceph ceph |
176 |
+} |
177 |
+ |
178 |
+pkg_pretend() { |
179 |
+ check-reqs_export_vars |
180 |
+ check-reqs_pkg_pretend |
181 |
+} |
182 |
+ |
183 |
+pkg_setup() { |
184 |
+ python_setup 'python2*' |
185 |
+ check-reqs_export_vars |
186 |
+ check-reqs_pkg_setup |
187 |
+ user_setup |
188 |
+} |
189 |
+ |
190 |
+src_prepare() { |
191 |
+ default |
192 |
+ |
193 |
+ # remove tests that need root access |
194 |
+ rm src/test/cli/ceph-authtool/cap*.t |
195 |
+ |
196 |
+ #rm -rf "${UNBUNDLE_LIBS[@]}" |
197 |
+} |
198 |
+ |
199 |
+ceph_src_configure() { |
200 |
+ local flag |
201 |
+ local mycmakeargs=( |
202 |
+ -DWITH_BABELTRACE=$(usex babeltrace) |
203 |
+ -DWITH_CEPHFS=$(usex cephfs) |
204 |
+ -DWITH_FUSE=$(usex fuse) |
205 |
+ -DWITH_LTTNG=$(usex lttng) |
206 |
+ -DWITH_MGR=$(usex mgr) |
207 |
+ -DWITH_NSS=$(usex nss) |
208 |
+ -DWITH_OPENLDAP=$(usex ldap) |
209 |
+ -DWITH_RADOSGW=$(usex radosgw) |
210 |
+ -DWITH_SSL=$(usex ssl) |
211 |
+ -DWITH_SYSTEMD=$(usex systemd) |
212 |
+ -DWITH_TESTS=$(usex test) |
213 |
+ -DWITH_XFS=$(usex xfs) |
214 |
+ -DWITH_ZFS=$(usex zfs) |
215 |
+ -DENABLE_SHARED=$(usex static-libs '' 'yes' 'no') |
216 |
+ -DALLOCATOR=$(usex tcmalloc 'tcmalloc' '' "$(usex jemalloc 'jemalloc' '' 'libc' '')" '') |
217 |
+ -DWITH_SYSTEM_BOOST=yes |
218 |
+ -DWITH_RDMA=no |
219 |
+ -DSYSTEMD_UNITDIR=$(systemd_get_systemunitdir) |
220 |
+ ) |
221 |
+ if use amd64 || use x86; then |
222 |
+ for flag in ${CPU_FLAGS_X86[@]}; do |
223 |
+ mycmakeargs+=("$(usex cpu_flags_x86_${flag} "-DHAVE_INTEL_${flag^^}=1")") |
224 |
+ done |
225 |
+ fi |
226 |
+ |
227 |
+ rm -f "${BUILD_DIR:-${S}}/CMakeCache.txt" |
228 |
+ cmake-utils_src_configure |
229 |
+ |
230 |
+ # bug #630232 |
231 |
+ sed -i "s:\"${T//:\\:}/${EPYTHON}/bin/python\":\"${PYTHON}\":" \ |
232 |
+ "${BUILD_DIR:-${CMAKE_BUILD_DIR:-${S}}}"/include/acconfig.h \ |
233 |
+ || die "sed failed" |
234 |
+} |
235 |
+ |
236 |
+src_configure() { |
237 |
+ ceph_src_configure |
238 |
+} |
239 |
+ |
240 |
+python_compile() { |
241 |
+ local CMAKE_USE_DIR="${S}" |
242 |
+ |
243 |
+ ceph_src_configure |
244 |
+ pushd "${BUILD_DIR}/src/pybind" >/dev/null || die |
245 |
+ emake VERBOSE=1 all |
246 |
+ |
247 |
+ # python modules are only compiled with "make install" so we need to do this to |
248 |
+ # prevent doing a bunch of compilation in src_install |
249 |
+ DESTDIR="${T}" emake VERBOSE=1 install |
250 |
+ popd >/dev/null || die |
251 |
+} |
252 |
+ |
253 |
+src_compile() { |
254 |
+ cmake-utils_src_make all |
255 |
+ |
256 |
+ # we have to do this here to prevent from building everything multiple times |
257 |
+ BUILD_DIR="${CMAKE_BUILD_DIR}" python_copy_sources |
258 |
+ python_foreach_impl python_compile |
259 |
+} |
260 |
+ |
261 |
+src_test() { |
262 |
+ make check || die "make check failed" |
263 |
+} |
264 |
+ |
265 |
+python_install() { |
266 |
+ local CMAKE_USE_DIR="${S}" |
267 |
+ pushd "${BUILD_DIR}/src/pybind" >/dev/null || die |
268 |
+ DESTDIR="${D}" emake install |
269 |
+ popd >/dev/null || die |
270 |
+} |
271 |
+ |
272 |
+src_install() { |
273 |
+ cmake-utils_src_install |
274 |
+ python_foreach_impl python_install |
275 |
+ |
276 |
+ prune_libtool_files --all |
277 |
+ |
278 |
+ exeinto /usr/$(get_libdir)/ceph |
279 |
+ newexe "${CMAKE_BUILD_DIR}/bin/init-ceph" ceph_init.sh |
280 |
+ |
281 |
+ insinto /etc/logrotate.d/ |
282 |
+ newins "${FILESDIR}"/ceph.logrotate ${PN} |
283 |
+ |
284 |
+ keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat |
285 |
+ |
286 |
+ fowners -R ceph:ceph /var/lib/ceph /var/log/ceph |
287 |
+ |
288 |
+ newinitd "${FILESDIR}/rbdmap.initd" rbdmap |
289 |
+ newinitd "${FILESDIR}/${PN}.initd-r6" ${PN} |
290 |
+ newconfd "${FILESDIR}/${PN}.confd-r4" ${PN} |
291 |
+ |
292 |
+ insinto /etc/sysctl.d |
293 |
+ newins "${FILESDIR}"/sysctld 90-${PN}.conf |
294 |
+ |
295 |
+ use tcmalloc && newenvd "${FILESDIR}"/envd-tcmalloc 99${PN}-tcmalloc |
296 |
+ |
297 |
+ # units aren't installed by the build system unless systemd is enabled |
298 |
+ # so no point installing these with the USE flag disabled |
299 |
+ if use systemd; then |
300 |
+ systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" \ |
301 |
+ "ceph-mds@.service" |
302 |
+ |
303 |
+ systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" \ |
304 |
+ "ceph-osd@.service" |
305 |
+ fi |
306 |
+ |
307 |
+ udev_dorules udev/*.rules |
308 |
+ |
309 |
+ readme.gentoo_create_doc |
310 |
+ |
311 |
+ python_setup 'python2*' |
312 |
+ |
313 |
+ # bug #630232 |
314 |
+ sed -i -r "s:${T//:/\\:}/${EPYTHON}:/usr:" "${ED}"/usr/bin/ceph \ |
315 |
+ || die "sed failed" |
316 |
+ |
317 |
+ python_fix_shebang "${ED}"/usr/{,s}bin/ |
318 |
+ |
319 |
+ # python_fix_shebang apparently is not idempotent |
320 |
+ sed -i -r 's:(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]:\1:' \ |
321 |
+ "${ED}"/usr/{sbin/ceph-disk,bin/ceph-detect-init} || die "sed failed" |
322 |
+} |
323 |
+ |
324 |
+pkg_postinst() { |
325 |
+ readme.gentoo_print_elog |
326 |
+} |
327 |
|
328 |
diff --git a/sys-cluster/ceph/files/ceph-12.2.2-build-without-radosgw.patch b/sys-cluster/ceph/files/ceph-12.2.2-build-without-radosgw.patch |
329 |
new file mode 100644 |
330 |
index 00000000000..29257c4747d |
331 |
--- /dev/null |
332 |
+++ b/sys-cluster/ceph/files/ceph-12.2.2-build-without-radosgw.patch |
333 |
@@ -0,0 +1,34 @@ |
334 |
+From b00ac12f4045cd39ac9a436cf32d233d16bc3485 Mon Sep 17 00:00:00 2001 |
335 |
+From: Jason Dillaman <dillaman@××××××.com> |
336 |
+Date: Tue, 5 Dec 2017 09:58:04 -0500 |
337 |
+Subject: [PATCH] ceph-dencoder: moved RBD types outside of RGW preprocessor |
338 |
+ guard |
339 |
+ |
340 |
+Fixes: http://tracker.ceph.com/issues/22321 |
341 |
+Signed-off-by: Jason Dillaman <dillaman@××××××.com> |
342 |
+--- |
343 |
+ src/test/encoding/types.h | 4 ++-- |
344 |
+ 1 file changed, 2 insertions(+), 2 deletions(-) |
345 |
+ |
346 |
+diff --git a/src/test/encoding/types.h b/src/test/encoding/types.h |
347 |
+index c061e93bd58c..4cfcb15edff1 100644 |
348 |
+--- a/src/test/encoding/types.h |
349 |
++++ b/src/test/encoding/types.h |
350 |
+@@ -405,6 +405,8 @@ TYPE(rgw_data_sync_info) |
351 |
+ TYPE(rgw_data_sync_marker) |
352 |
+ TYPE(rgw_data_sync_status) |
353 |
+ |
354 |
++#endif |
355 |
++ |
356 |
+ #ifdef WITH_RBD |
357 |
+ #include "cls/rbd/cls_rbd.h" |
358 |
+ TYPE(cls_rbd_parent) |
359 |
+@@ -416,8 +418,6 @@ TYPE(cls::rbd::MirrorImage) |
360 |
+ TYPE(cls::rbd::MirrorImageMap) |
361 |
+ #endif |
362 |
+ |
363 |
+-#endif |
364 |
+- |
365 |
+ #include "cls/lock/cls_lock_types.h" |
366 |
+ TYPE(rados::cls::lock::locker_id_t) |
367 |
+ TYPE_FEATUREFUL(rados::cls::lock::locker_info_t) |
368 |
|
369 |
diff --git a/sys-cluster/ceph/files/ceph.confd-r4 b/sys-cluster/ceph/files/ceph.confd-r4 |
370 |
new file mode 100644 |
371 |
index 00000000000..b8a0c930a49 |
372 |
--- /dev/null |
373 |
+++ b/sys-cluster/ceph/files/ceph.confd-r4 |
374 |
@@ -0,0 +1,70 @@ |
375 |
+# /etc/conf.d/ceph: startup configurations for ceph |
376 |
+ |
377 |
+# default ceph conf file |
378 |
+#ceph_conf="/etc/ceph/ceph.conf" |
379 |
+ |
380 |
+# Set ulimits for Ceph services. |
381 |
+#rc_ulimit="-n 1048576 -u 1048576" |
382 |
+ |
383 |
+# the directory under /run to store runtime information in |
384 |
+#rundir=/run/ceph |
385 |
+ |
386 |
+# the user and group to run ceph as |
387 |
+#user="ceph" |
388 |
+#group="ceph" |
389 |
+ |
390 |
+# tell openrc to use control groups to make sure everything gets killed |
391 |
+# properly on stop. Highly reccommended to leave this enabled. |
392 |
+rc_cgroup_cleanup=1 |
393 |
+ |
394 |
+# settings for openrc supervisor for various ceph daemons |
395 |
+# |
396 |
+# defaults (can be overidden for each daemon) |
397 |
+# stderr and stdout values get .${id}-std{out,err}.log appended |
398 |
+# to the provided value |
399 |
+# |
400 |
+#respawn_delay=20 |
401 |
+#respawn_max=5 |
402 |
+#respawn_period=1800 |
403 |
+#stdout="/dev/null" |
404 |
+#stderr="/dev/null" |
405 |
+ |
406 |
+# radosgw |
407 |
+#radosgw_respawn_max |
408 |
+#radosgw_respawn_delay=20 |
409 |
+#radosgw_respawn_period=1800 |
410 |
+#radosgw_stdout="/dev/null" |
411 |
+#radosgw_stderr="/dev/null" |
412 |
+ |
413 |
+# mon |
414 |
+#mon_respawn_max=5 |
415 |
+#mon_respawn_delay=20 |
416 |
+#mon_respawn_period=1800 |
417 |
+#mon_stdout="/dev/null" |
418 |
+#mon_stderr="/dev/null" |
419 |
+ |
420 |
+# osd |
421 |
+#osd_respawn_max=5 |
422 |
+#osd_respawn_delay=30 |
423 |
+#osd_respawn_period=1800 |
424 |
+#osd_stdout="/dev/null" |
425 |
+#osd_stderr="/dev/null" |
426 |
+ |
427 |
+# mds |
428 |
+#mds_respawn_max=5 |
429 |
+#mds_respawn_delay=20 |
430 |
+#mds_respawn_period=1800 |
431 |
+#mds_stdout="/dev/null" |
432 |
+#mds_stderr="/dev/null" |
433 |
+ |
434 |
+# mgr |
435 |
+#mgr_respawn_max=5 |
436 |
+#mgr_respawn_delay=20 |
437 |
+#mgr_respawn_period=1800 |
438 |
+#mgr_stdout="/dev/null" |
439 |
+#mgr_stderr="/dev/null" |
440 |
+ |
441 |
+# initd stop timeout. |
442 |
+#CEPH_TERMTIMEOUT="TERM/120/KILL/5" |
443 |
+# |
444 |
+# vim:ft=gentoo-conf-d:ts=4:sts=4:sw=4:noet: |
445 |
|
446 |
diff --git a/sys-cluster/ceph/files/ceph.initd-r6 b/sys-cluster/ceph/files/ceph.initd-r6 |
447 |
new file mode 100644 |
448 |
index 00000000000..fd31b17eb5e |
449 |
--- /dev/null |
450 |
+++ b/sys-cluster/ceph/files/ceph.initd-r6 |
451 |
@@ -0,0 +1,87 @@ |
452 |
+#!/sbin/openrc-run |
453 |
+ |
454 |
+ceph_conf="${ceph_conf:-/etc/ceph/ceph.conf}" |
455 |
+extra_commands="reload" |
456 |
+daemon_type="${RC_SVCNAME#ceph-}" |
457 |
+daemon_type="${daemon_type%%.*}" |
458 |
+daemon_id="${RC_SVCNAME#ceph-*.}" |
459 |
+daemon_id="${daemon_id:-0}" |
460 |
+: ${rundir:=/run/ceph} |
461 |
+: ${user:=ceph} |
462 |
+: ${group:=ceph} |
463 |
+: ${rc_ulimit:=-n 1048576 -u 1048576} |
464 |
+ |
465 |
+pidfile="${rundir}/supervisor-${daemon_type}.${daemon_id}.pid" |
466 |
+daemon_pidfile="${rundir}/${daemon_type}.${daemon_id}.pid" |
467 |
+ |
468 |
+command="/usr/bin/${RC_SVCNAME%%.*}" |
469 |
+command_args="-i ${daemon_id} --pid-file ${daemon_pidfile} -c ${ceph_conf}" |
470 |
+command_args_foreground="--foreground" |
471 |
+ |
472 |
+retry="${CEPH_TERMTIMEOUT:-TERM/120/KILL/5}" |
473 |
+start_stop_daemon_args="--user ${user} --group ${group}" |
474 |
+supervise_daemon_args="--user ${user} --group ${group}" |
475 |
+ |
476 |
+: ${supervisor:=supervise-daemon} |
477 |
+: ${stdout:=/dev/null} |
478 |
+: ${stderr:=/dev/null} |
479 |
+: ${respawn_delay:=10} |
480 |
+: ${respawn_max:=5} |
481 |
+: ${respawn_period:=1800} |
482 |
+ |
483 |
+: ${osd_respawn_delay:=15} |
484 |
+: ${osd_respawn_max:=10} |
485 |
+ |
486 |
+: ${radosgw_respawn_max:=5} |
487 |
+: ${radosgw_respawn_period:=30} |
488 |
+ |
489 |
+depend() { |
490 |
+ use dns logger |
491 |
+ after net ntpd ntp-client chronyd |
492 |
+ before netmount |
493 |
+} |
494 |
+ |
495 |
+is_type_valid() { |
496 |
+ case ${daemon_type} in |
497 |
+ mon|mds|osd|mgr|radosgw) return 0;; |
498 |
+ *) return 1;; |
499 |
+ esac |
500 |
+} |
501 |
+ |
502 |
+start_pre() { |
503 |
+ export CEPH_CONF="${ceph_conf}" |
504 |
+ |
505 |
+ checkpath -d -q -o "${user}:${group}" "${rundir}" |
506 |
+ |
507 |
+ if ! is_type_valid ;then |
508 |
+ eerror "Please give valid Ceph Server Type: mds, mon, osd" |
509 |
+ return 1 |
510 |
+ |
511 |
+ elif pgrep -f "[c]eph-${daemon_type} -i ${daemon_id} "; then |
512 |
+ eerror "${daemon_type}.${daemon_id} is still running, refusing to start" |
513 |
+ return 1 |
514 |
+ fi |
515 |
+ |
516 |
+ local arg_name arg_val |
517 |
+ for arg_name in std{out,err} respawn_{delay,max,period}; do |
518 |
+ eval arg_val="\${${daemon_type}_${arg_name}}" |
519 |
+ |
520 |
+ if [ -z "${arg_val}" ]; then |
521 |
+ eval arg_val="\${${arg_name}}" |
522 |
+ else |
523 |
+ eval "${arg_name}=\"${arg_val}\"" |
524 |
+ fi |
525 |
+ |
526 |
+ if [ "${arg_name}" = "stderr" ] || [ "${arg_name}" = "stdout" ]; then |
527 |
+ supervise_daemon_args="${supervise_daemon_args} --${arg_name//_/-}=${arg_val}.${daemon_id}-${arg_name}.log" |
528 |
+ fi |
529 |
+ done |
530 |
+} |
531 |
+ |
532 |
+reload() { |
533 |
+ ebegin "Reloading Ceph ${daemon_type}.${daemon_id}" |
534 |
+ start-stop-daemon --signal 1 "${start_stop_daemon_args}" |
535 |
+ eend ${?} |
536 |
+} |
537 |
+ |
538 |
+# vim:ft=gentoo-init-d:ts=4:sts=4:sw=4:noet: |