Gentoo Archives: gentoo-commits

From: "Yixun Lan (dlan)" <dlan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-cluster/ceph/files: ceph.initd-r1 ceph.logrotate ceph.confd-r1
Date: Wed, 21 May 2014 07:43:28
Message-Id: 20140521074324.7A78E2004E@flycatcher.gentoo.org
1 dlan 14/05/21 07:43:24
2
3 Added: ceph.initd-r1 ceph.logrotate ceph.confd-r1
4 Log:
5 version bump 0.80.1, fix bug #510396, #507956, thanks @babykart, @Changyuan Yu, @LeeL
6
7 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0xAABEFD55)
8
9 Revision Changes Path
10 1.1 sys-cluster/ceph/files/ceph.initd-r1
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/ceph/files/ceph.initd-r1?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/ceph/files/ceph.initd-r1?rev=1.1&content-type=text/plain
14
15 Index: ceph.initd-r1
16 ===================================================================
17 #!/sbin/runscript
18
19 ceph_conf="${ceph_conf:-/etc/ceph/ceph.conf}"
20 extra_commands="reload"
21 type=${RC_SVCNAME:5:3}
22 id=${RC_SVCNAME:9}
23 id=${id:-"0"}
24 command="/usr/bin/ceph-${type}"
25 pidfile="/run/ceph/${type}.${id}.pid"
26 command_args="-i ${id} --pid-file ${pidfile} -c ${ceph_conf}"
27
28 depend() {
29 after net
30 before netmount
31 }
32
33 is_type_valid() {
34 case ${type} in
35 mon|mds|osd) return 0;;
36 *) return 1;;
37 esac
38 }
39
40 start_pre() {
41 checkpath -d -q $(dirname ${pidfile})
42 }
43
44 start() {
45 ebegin "Starting Ceph ${type}.${id}"
46 if ! is_type_valid ;then
47 eerror "Please give valid Ceph Server Type: mds, mon, osd"
48 return 1
49 fi
50 ${command} ${command_args}
51 eend $?
52 }
53
54 stop() {
55 ebegin "Stopping Ceph ${type}.${id}"
56 start-stop-daemon --stop --pidfile ${pidfile}
57 eend $?
58 }
59
60 reload() {
61 ebegin "Reloading Ceph ${type}.${id}"
62 start-stop-daemon --signal 1 --pidfile ${pidfile}
63 eend $?
64 }
65
66
67
68 1.1 sys-cluster/ceph/files/ceph.logrotate
69
70 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/ceph/files/ceph.logrotate?rev=1.1&view=markup
71 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/ceph/files/ceph.logrotate?rev=1.1&content-type=text/plain
72
73 Index: ceph.logrotate
74 ===================================================================
75 /var/log/ceph/admin.log
76 /var/log/ceph/ceph.log
77 /var/log/ceph/ceph-mon.*
78 /var/log/ceph/ceph-mds.*
79 /var/log/ceph/ceph-osd.*
80 {
81 rotate 7
82 daily
83 compress
84 sharedscripts
85 prerotate
86 for dmn in $(cd /run/ceph && ls *.asok); do
87 ceph --admin-daemon /run/ceph/${dmn} log flush 2>/dev/null >&1
88 done
89 endscript
90 postrotate
91 for dmn in $(cd /run/ceph && ls *.asok); do
92 ceph --admin-daemon /run/ceph/${dmn} log reopen 2>/dev/null >&1
93 done
94 endscript
95 missingok
96 }
97
98
99
100 1.1 sys-cluster/ceph/files/ceph.confd-r1
101
102 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/ceph/files/ceph.confd-r1?rev=1.1&view=markup
103 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/ceph/files/ceph.confd-r1?rev=1.1&content-type=text/plain
104
105 Index: ceph.confd-r1
106 ===================================================================
107 # Example
108
109 # default ceph conf file
110 #ceph_conf="/etc/ceph/ceph.conf"