commit: 6531bd29d8fb66db11fde079b15583dc74f59fc8 Author: Michael Weber <michael <AT> xmw <DOT> de> AuthorDate: Mon Mar 2 22:46:59 2015 +0000 Commit: Michael Weber <xmw <AT> gentoo <DOT> org> CommitDate: Mon Mar 2 22:46:59 2015 +0000 URL: http://sources.gentoo.org/gitweb/?p=dev/xmw.git;a=commit;h=6531bd29
Drop USE=rocksdb and USE=kinetic for now. Package-Manager: portage-2.2.17 Manifest-Sign-Key: 62EEF090 --- sys-cluster/ceph/ChangeLog | 5 +++ sys-cluster/ceph/ceph-0.87.1.ebuild | 13 ++++--- sys-cluster/ceph/files/README.gentoo | 18 ++++++++++ sys-cluster/ceph/files/ceph-0.87.1-stdint.patch | 40 +++++++++++++++++++++ sys-cluster/ceph/files/ceph.confd-r1 | 4 +++ sys-cluster/ceph/files/ceph.initd-r1 | 48 +++++++++++++++++++++++++ sys-cluster/ceph/files/ceph.logrotate | 22 ++++++++++++ sys-cluster/ceph/metadata.xml | 2 -- 8 files changed, 146 insertions(+), 6 deletions(-) diff --git a/sys-cluster/ceph/ChangeLog b/sys-cluster/ceph/ChangeLog index 06f1009..2bedbcb 100644 --- a/sys-cluster/ceph/ChangeLog +++ b/sys-cluster/ceph/ChangeLog @@ -1,3 +1,8 @@ + 02 Mar 2015; Michael Weber <x...@gentoo.org> +files/README.gentoo, + +files/ceph-0.87.1-stdint.patch, +files/ceph.confd-r1, +files/ceph.initd-r1, + +files/ceph.logrotate, ceph-0.87.1.ebuild, metadata.xml: + Drop USE=rocksdb and USE=kinetic for now. + *ceph-0.87.1 (02 Mar 2015) 02 Mar 2015; Michael Weber <x...@gentoo.org> +ceph-0.87.1.ebuild, diff --git a/sys-cluster/ceph/ceph-0.87.1.ebuild b/sys-cluster/ceph/ceph-0.87.1.ebuild index 4399c34..c009cb1 100644 --- a/sys-cluster/ceph/ceph-0.87.1.ebuild +++ b/sys-cluster/ceph/ceph-0.87.1.ebuild @@ -24,7 +24,7 @@ HOMEPAGE="http://ceph.com/" LICENSE="LGPL-2.1" SLOT="0" -IUSE="babeltrace cryptopp debug fuse gtk kinetic libatomic +libaio lttng +nss radosgw rocksdb static-libs tcmalloc xfs zfs" +IUSE="babeltrace cryptopp debug fuse gtk libatomic +libaio lttng +nss radosgw static-libs tcmalloc xfs zfs" CDEPEND=" app-arch/snappy @@ -74,7 +74,6 @@ REQUIRED_USE=" STRIP_MASK="/usr/lib*/rados-classes/*" PATCHES=( - "${FILESDIR}"/${PN}-fix-gnustack.patch "${FILESDIR}"/${PN}-0.79-libzfs.patch ) @@ -85,6 +84,9 @@ pkg_setup() { src_prepare() { [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}" + sed -e '1i#include <stdint.h>' \ + -i src/tracing/{objectstore,oprequest,osd,pg}.tp || die + epatch_user eautoreconf } @@ -106,10 +108,13 @@ src_configure() { $(use_with tcmalloc) \ $(use_with xfs libxfs) \ $(use_with zfs libzfs) \ - $(use_with kinetic) \ - $(use_with rocksdb librocksdb ) \ + --without-kinetic \ + --without-librocksdb \ $(use_with lttng ) \ $(use_with babeltrace) + + # patch files generated by lttng-gen-lp + #epatch "${FILESDIR}"/${P}-stdint.patch } src_install() { diff --git a/sys-cluster/ceph/files/README.gentoo b/sys-cluster/ceph/files/README.gentoo new file mode 100644 index 0000000..b049515 --- /dev/null +++ b/sys-cluster/ceph/files/README.gentoo @@ -0,0 +1,18 @@ +1) We'd suggest you to install following packages + sys-block/parted to manage disk partions + sys-fs/btrfs-progs to use btrfs filesytem + sys-fs/cryptsetup to use encrypted devices with dm-crypt + +2) To start several daemons of one specific type, create your own scripts + cd /etc/init.d + for dmn in mds.a mon.a osd.0 osd.1 osd.2; do + ln -s ceph ceph-${dmn}; + rc-update add ceph-${dmn} default; + done + +3) If you spread ceph daemons over several different machines, + We'd highly recommend you to start ntp-client to keep the system time sync. + Try to choose one of following ntp client to install and add into runlevel. + net-misc/ntp + net-misc/openntpd + net-misc/chrony diff --git a/sys-cluster/ceph/files/ceph-0.87.1-stdint.patch b/sys-cluster/ceph/files/ceph-0.87.1-stdint.patch new file mode 100644 index 0000000..6697940 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-0.87.1-stdint.patch @@ -0,0 +1,40 @@ +--- ceph-0.87.1/src/tracing/objectstore.h ++++ ceph-0.87.1/src/tracing/objectstore.h +@@ -9,6 +9,7 @@ + #define OBJECTSTORE_H + + #include <lttng/tracepoint.h> ++#include <stdint.h> + + TRACEPOINT_EVENT(objectstore, exists_enter, + TP_ARGS( +--- ceph-0.87.1/src/tracing/oprequest.h ++++ ceph-0.87.1/src/tracing/oprequest.h +@@ -9,6 +9,7 @@ + #define OPREQUEST_H + + #include <lttng/tracepoint.h> ++#include <stdint.h> + + TRACEPOINT_EVENT(oprequest, set_rmw_flags, + TP_ARGS( +--- ceph-0.87.1/src/tracing/osd.h ++++ ceph-0.87.1/src/tracing/osd.h +@@ -9,6 +8,7 @@ + #define OSD_H + + #include <lttng/tracepoint.h> ++#include <stdint.h> + + TRACEPOINT_EVENT(osd, prepare_tx_enter, + TP_ARGS( +--- ceph-0.87.1/src/tracing/pg.h ++++ ceph-0.87.1/src/tracing/pg.h +@@ -9,6 +9,7 @@ + #define PG_H + + #include <lttng/tracepoint.h> ++#include <stdint.h> + + TRACEPOINT_EVENT(pg, queue_op, + TP_ARGS( diff --git a/sys-cluster/ceph/files/ceph.confd-r1 b/sys-cluster/ceph/files/ceph.confd-r1 new file mode 100644 index 0000000..3bdb8b4 --- /dev/null +++ b/sys-cluster/ceph/files/ceph.confd-r1 @@ -0,0 +1,4 @@ +# Example + +# default ceph conf file +#ceph_conf="/etc/ceph/ceph.conf" diff --git a/sys-cluster/ceph/files/ceph.initd-r1 b/sys-cluster/ceph/files/ceph.initd-r1 new file mode 100644 index 0000000..ca5ab60 --- /dev/null +++ b/sys-cluster/ceph/files/ceph.initd-r1 @@ -0,0 +1,48 @@ +#!/sbin/runscript + +ceph_conf="${ceph_conf:-/etc/ceph/ceph.conf}" +extra_commands="reload" +type=${RC_SVCNAME:5:3} +id=${RC_SVCNAME:9} +id=${id:-"0"} +command="/usr/bin/ceph-${type}" +pidfile="/run/ceph/${type}.${id}.pid" +command_args="-i ${id} --pid-file ${pidfile} -c ${ceph_conf}" + +depend() { + after net ntpd ntp-client chronyd + before netmount +} + +is_type_valid() { + case ${type} in + mon|mds|osd) return 0;; + *) return 1;; + esac +} + +start_pre() { + checkpath -d -q $(dirname ${pidfile}) +} + +start() { + ebegin "Starting Ceph ${type}.${id}" + if ! is_type_valid ;then + eerror "Please give valid Ceph Server Type: mds, mon, osd" + return 1 + fi + ${command} ${command_args} + eend $? +} + +stop() { + ebegin "Stopping Ceph ${type}.${id}" + start-stop-daemon --stop --pidfile ${pidfile} + eend $? +} + +reload() { + ebegin "Reloading Ceph ${type}.${id}" + start-stop-daemon --signal 1 --pidfile ${pidfile} + eend $? +} diff --git a/sys-cluster/ceph/files/ceph.logrotate b/sys-cluster/ceph/files/ceph.logrotate new file mode 100644 index 0000000..ff50cd9 --- /dev/null +++ b/sys-cluster/ceph/files/ceph.logrotate @@ -0,0 +1,22 @@ +/var/log/ceph/admin.log +/var/log/ceph/ceph.log +/var/log/ceph/ceph-mon.* +/var/log/ceph/ceph-mds.* +/var/log/ceph/ceph-osd.* +{ + rotate 7 + daily + compress + sharedscripts + prerotate + for dmn in $(cd /run/ceph && ls *.asok 2>/dev/null); do + ceph --admin-daemon /run/ceph/${dmn} log flush 2>/dev/null >/dev/null + done + endscript + postrotate + for dmn in $(cd /run/ceph && ls *.asok 2>/dev/null); do + ceph --admin-daemon /run/ceph/${dmn} log reopen 2>/dev/null >/dev/null + done + endscript + missingok +} diff --git a/sys-cluster/ceph/metadata.xml b/sys-cluster/ceph/metadata.xml index bba8e8a..8e46f85 100644 --- a/sys-cluster/ceph/metadata.xml +++ b/sys-cluster/ceph/metadata.xml @@ -17,8 +17,6 @@ Ceph is a distributed network file system designed to provide excellent performa <flag name='libaio'>Use libaio as asynchronous input/output library</flag> <flag name='lttng'>Add support for LTTng</flag> <flag name='babeltrace'>Add support for LTTng babeltrace</flag> - <flag name='kinetic'>Add support for kinetic</flag> - <flag name='rocksdb'>Add support for rocksdb</flag> <flag name='nss'>Use <pkg>dev-libs/nss</pkg> for cryptography</flag> <flag name='radosgw'>Add radosgw support</flag> <flag name='xfs'>Add xfs support</flag>