UltraMonkey-L7 V3(multi-thread implementation)
Revisão | 0903ac689db508379195abb1a345fc24f313dadb (tree) |
---|---|
Hora | 2015-10-22 17:24:34 |
Autor | Michiro Hibari <l05102@shib...> |
Commiter | Michiro Hibari |
Merge branch 'for_rhel7' into v3.1.3-devel
@@ -1,3 +1,6 @@ | ||
1 | +[Oct. 18 2015] 3.1.3-rc1 HIBARI Michiro | |
2 | + - Add systemd unit file. | |
3 | + | |
1 | 4 | [Sep. 11 2014] 3.1.2-1 HIBARI Michiro, Hiroaki Nakano |
2 | 5 | - Fixed degraded bug: re-patch for fixed #30300. |
3 | 6 |
@@ -1,9 +1,9 @@ | ||
1 | 1 | AC_PREREQ(2.59) |
2 | -AC_INIT(l7vsd) | |
2 | +AC_INIT(l7vsd, 3.1.3, ultramonkey-l7-develop@lists.sourceforge.jp) | |
3 | 3 | PACKAGENAME=l7vsd |
4 | -VERSION=3.1.2 | |
4 | +VERSION=3.1.3 | |
5 | 5 | |
6 | -AM_INIT_AUTOMAKE($PACKAGENAME, $VERSION, no-define ) | |
6 | +AM_INIT_AUTOMAKE | |
7 | 7 | AC_CONFIG_SRCDIR([config.h.in]) |
8 | 8 | AC_CONFIG_HEADER([config.h]) |
9 | 9 |
@@ -14,6 +14,8 @@ AC_PROG_CPP | ||
14 | 14 | AC_PROG_INSTALL |
15 | 15 | AC_PROG_LN_S |
16 | 16 | AC_PROG_MAKE_SET |
17 | +AC_CHECK_PROG(check_systemd,systemctl,1,0) | |
18 | +AM_CONDITIONAL(CHECK_SYSTEMD, test $check_systemd -eq 1) | |
17 | 19 | |
18 | 20 | # Checks for libraries. |
19 | 21 | AC_CHECK_LIB(dl, dlopen) |
@@ -115,6 +117,7 @@ AC_CONFIG_FILES([doc/Makefile] | ||
115 | 117 | [l7directord/Makefile] |
116 | 118 | [l7vsd/Makefile] |
117 | 119 | [l7vsd/init.d/Makefile] |
120 | + [l7vsd/systemd/Makefile] | |
118 | 121 | [l7vsd/module/Makefile] |
119 | 122 | [l7vsd/module/protocol/Makefile] |
120 | 123 | [l7vsd/module/schedule/Makefile] |
@@ -24,7 +24,9 @@ | ||
24 | 24 | # Initialization: |
25 | 25 | |
26 | 26 | . ${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs |
27 | -#. /usr/lib/ocf/resource.d/heartbeat/.ocf-shellfuncs | |
27 | + | |
28 | +L7DIRCONF=${OCF_RESKEY_configfile:-/etc/ha.d/conf/l7directord.cf} | |
29 | +L7DIRECTORD=${OCF_RESKEY_l7directord:-/usr/sbin/l7directord} | |
28 | 30 | |
29 | 31 | ####################################################################### |
30 | 32 |
@@ -49,6 +51,22 @@ Location to store the resource state in. | ||
49 | 51 | <content type="string" default="" /> |
50 | 52 | </parameter> |
51 | 53 | |
54 | +<parameter name="configfile" unique="1"> | |
55 | +<longdesc lang="en"> | |
56 | +The full pathname of the l7directord configuration file. | |
57 | +</longdesc> | |
58 | +<shortdesc lang="en">configuration file path</shortdesc> | |
59 | +<content type="string" default="/etc/ha.d/conf/l7directord.cf" /> | |
60 | +</parameter> | |
61 | + | |
62 | +<parameter name="l7directord"> | |
63 | +<longdesc lang="en"> | |
64 | +The full pathname of the l7directord. | |
65 | +</longdesc> | |
66 | +<shortdesc lang="en">ldirectord binary path</shortdesc> | |
67 | +<content type="string" default="/usr/sbin/l7directord" /> | |
68 | +</parameter> | |
69 | + | |
52 | 70 | </parameters> |
53 | 71 | |
54 | 72 | <actions> |
@@ -109,7 +127,7 @@ l7directord_pkill(){ | ||
109 | 127 | ############################### |
110 | 128 | isRunning(){ |
111 | 129 | RET=0 |
112 | - RET=`pgrep -fox "/usr/sbin/l7directord start" | wc -l` | |
130 | + RET=`pgrep -fox "$L7DIRECTORD $L7DIRCONF start" | wc -l` | |
113 | 131 | return $RET |
114 | 132 | } |
115 | 133 |
@@ -130,7 +148,7 @@ l7vsd_flush(){ | ||
130 | 148 | # Get Resource Status Method |
131 | 149 | ############################### |
132 | 150 | l7directord_status(){ |
133 | - /etc/init.d/l7directord status > /dev/null 2>&1 | |
151 | + $L7DIRECTORD $L7DIRCONF status > /dev/null 2>&1 | |
134 | 152 | RET=$? |
135 | 153 | if [ $RET -eq 0 ]; then |
136 | 154 | return ${OCF_SUCCESS} |
@@ -159,8 +177,6 @@ l7directord_monitor() { | ||
159 | 177 | if [ $? -eq ${OCF_SUCCESS} ]; then |
160 | 178 | # status OK |
161 | 179 | return ${OCF_SUCCESS} |
162 | - else | |
163 | - break | |
164 | 180 | fi |
165 | 181 | elif [ $RET -eq 0 ]; then |
166 | 182 | MSG="l7direcotrd is not running." |
@@ -193,11 +209,12 @@ l7directord_start() { | ||
193 | 209 | outputLog info "l7directord starts." |
194 | 210 | return ${OCF_SUCCESS} |
195 | 211 | elif [ $RET -eq 0 ]; then |
196 | - /etc/init.d/l7directord start > /dev/null 2>&1 | |
212 | + $L7DIRECTORD $L7DIRCONF start > /dev/null 2>&1 | |
197 | 213 | RET=$? |
198 | 214 | if [ $RET -ne 0 ]; then |
199 | 215 | MSG="l7directord start fatal error!: $RET" |
200 | 216 | outputLog err ${OCF_ERR_GENERIC} $MSG |
217 | + return ${OCF_ERR_GENERIC} | |
201 | 218 | fi |
202 | 219 | fi |
203 | 220 | sleep 1 |
@@ -216,7 +233,7 @@ l7directord_stop() { | ||
216 | 233 | l7vsd_flush |
217 | 234 | return ${OCF_SUCCESS} |
218 | 235 | elif [ $RET -eq 1 ]; then |
219 | - /etc/init.d/l7directord stop > /dev/null 2>&1 | |
236 | + $L7DIRECTORD $L7DIRCONF stop > /dev/null 2>&1 | |
220 | 237 | RET=$? |
221 | 238 | if [ $RET -ne 0 ]; then |
222 | 239 | MSG="l7directord stop fatal error!: $RET" |
@@ -24,7 +24,8 @@ | ||
24 | 24 | # Initialization: |
25 | 25 | |
26 | 26 | . ${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs |
27 | -#. /usr/lib/ocf/resource.d/heartbeat/.ocf-shellfuncs | |
27 | + | |
28 | +L7SOCKFILE=${OCF_RESKEY_socket_default:-/var/run/l7vs/l7vs} | |
28 | 29 | |
29 | 30 | ####################################################################### |
30 | 31 |
@@ -40,8 +41,15 @@ This is a L7vsd Resource Agent. | ||
40 | 41 | </longdesc> |
41 | 42 | <shortdesc lang="en">L7vsd resource agent</shortdesc> |
42 | 43 | |
43 | -<parameter/> | |
44 | -<parameters/> | |
44 | +<parameters> | |
45 | +<parameter name="socket" unique="0" required="0"> | |
46 | +<longdesc lang="en"> | |
47 | +The socket to be used for l7vsadm. | |
48 | +</longdesc> | |
49 | +<shortdesc lang="en">l7vsadm socket</shortdesc> | |
50 | +<content type="string" default="${OCF_RESKEY_socket_default}"/> | |
51 | +</parameter> | |
52 | +</parameters> | |
45 | 53 | |
46 | 54 | <actions> |
47 | 55 | <action name="start" timeout="60" /> |
@@ -73,7 +81,16 @@ l7vsd_start() { | ||
73 | 81 | ocf_log info "l7vsd is already running." |
74 | 82 | return $OCF_SUCCESS |
75 | 83 | elif [ $RET -eq $OCF_NOT_RUNNING ]; then |
76 | - /etc/init.d/l7vsd start > /dev/null 2>&1 | |
84 | + L7SOCKDIR=`dirname L7SOCKFILE` | |
85 | + if [ ! -d $L7SOCKDIR ] ; then | |
86 | + ocf_log info "Creating l7vsadm socket dir: $L7SOCKDIR" | |
87 | + mkdir -p $L7SOCKDIR | |
88 | + fi | |
89 | + if [ -e $L7SOCKFILE ] ; then | |
90 | + ocf_log info "Delete l7vsadm socket filer: $L7SOCKFILE" | |
91 | + rm -rf $L7SOCKFILE | |
92 | + fi | |
93 | + /usr/sbin/l7vsd > /dev/null 2>&1 | |
77 | 94 | RET=$? |
78 | 95 | if [ $RET -ne 0 ]; then |
79 | 96 | MSG="l7vsd start error!" |
@@ -97,19 +114,19 @@ l7vsd_start() { | ||
97 | 114 | ############################### |
98 | 115 | l7vsd_stop() { |
99 | 116 | ocf_log info "l7vsd stopping ..." |
100 | - isRunning; | |
117 | + l7vsd_status | |
101 | 118 | RET=$? |
102 | - if [ $RET -eq 0 ]; then | |
119 | + if [ $RET -eq $OCF_NOT_RUNNING ]; then | |
103 | 120 | ocf_log info "l7vsd stopped." |
104 | 121 | return $OCF_SUCCESS |
105 | 122 | fi |
106 | - /etc/init.d/l7vsd stop > /dev/null 2>&1 | |
123 | + pkill -f "/usr/sbin/l7vsd" | |
107 | 124 | count=0 |
108 | 125 | while [ $count -le 10 ] |
109 | 126 | do |
110 | - isRunning; | |
127 | + l7vsd_status | |
111 | 128 | RET=$? |
112 | - if [ $RET -eq 0 ]; then | |
129 | + if [ $RET -eq $OCF_NOT_RUNNING ]; then | |
113 | 130 | ocf_log info "l7vsd stopped." |
114 | 131 | return $OCF_SUCCESS |
115 | 132 | fi |
@@ -118,6 +135,7 @@ l7vsd_stop() { | ||
118 | 135 | done |
119 | 136 | l7vsd_pkill |
120 | 137 | RET=$? |
138 | + rm -rf $L7SOCKFILE | |
121 | 139 | return $RET |
122 | 140 | } |
123 | 141 |
@@ -144,9 +162,9 @@ l7vsd_pkill(){ | ||
144 | 162 | while true |
145 | 163 | do |
146 | 164 | sleep 1 |
147 | - isRunning; | |
165 | + l7vsd_status | |
148 | 166 | RET=$? |
149 | - if [ $RET -eq 0 ]; then | |
167 | + if [ $RET -eq $OCF_NOT_RUNNING ]; then | |
150 | 168 | # stop OK |
151 | 169 | ocf_log info "l7vsd process stopped!" |
152 | 170 | return $OCF_SUCCESS |
@@ -155,24 +173,19 @@ l7vsd_pkill(){ | ||
155 | 173 | } |
156 | 174 | |
157 | 175 | ############################### |
158 | -# Resource Running Check Method | |
159 | -############################### | |
160 | -isRunning(){ | |
161 | - RET=0 | |
162 | - RET=`pgrep -fox "/usr/sbin/l7vsd" | wc -l` | |
163 | - return $RET | |
164 | -} | |
165 | - | |
166 | -############################### | |
167 | 176 | # Get Resource Status Method |
168 | 177 | ############################### |
169 | 178 | l7vsd_status(){ |
170 | - /etc/init.d/l7vsd status > /dev/null 2>&1 | |
171 | - RET=$? | |
172 | - if [ $RET -eq 0 ]; then | |
179 | + RET=0 | |
180 | + RET=`pgrep -fox "/usr/sbin/l7vsd" | wc -l` | |
181 | + if [ $RET -eq 1 ]; then | |
173 | 182 | return $OCF_SUCCESS |
183 | + elif [ $RET -eq 0 ]; then | |
184 | + MSG="l7vsd is not running." | |
185 | + outputLog $loglevel ${OCF_NOT_RUNNING} ${MSG} | |
186 | + return $OCF_NOT_RUNNING | |
174 | 187 | else |
175 | - MSG="l7vsd status ERROR!: $RET" | |
188 | + MSG="l7vsd status ERROR!: (ps=$RET)" | |
176 | 189 | outputLog err ${OCF_ERR_GENERIC} ${MSG} |
177 | 190 | return $OCF_ERR_GENERIC |
178 | 191 | fi |
@@ -188,23 +201,16 @@ l7vsd_monitor() { | ||
188 | 201 | loglevel="info" |
189 | 202 | fi |
190 | 203 | |
191 | - isRunning; | |
204 | + l7vsd_status | |
192 | 205 | RET=$? |
193 | - if [ $RET -eq 1 ]; then | |
194 | - # l7vsd is running | |
195 | - l7vsd_status | |
196 | - if [ $? -eq $OCF_SUCCESS ]; then | |
197 | - # status OK | |
198 | - return $OCF_SUCCESS | |
199 | - else | |
200 | - break | |
201 | - fi | |
202 | - elif [ $RET -eq 0 ]; then | |
203 | - MSG="l7vsd is not running." | |
204 | - outputLog $loglevel ${OCF_NOT_RUNNING} ${MSG} | |
206 | + if [ $RET -eq $OCF_SUCCESS ]; then | |
207 | + # status OK | |
208 | + return $OCF_SUCCESS | |
209 | + elif [ $RET -eq $OCF_NOT_RUNNING ]; then | |
210 | + # status NG | |
205 | 211 | return $OCF_NOT_RUNNING |
206 | 212 | fi |
207 | - MSG="l7vsd does not work. (ps=$RET) " | |
213 | + MSG="l7vsd duplicated. " | |
208 | 214 | outputLog err ${OCF_ERR_GENERIC} ${MSG} |
209 | 215 | return $OCF_ERR_GENERIC |
210 | 216 | } |
@@ -4,11 +4,6 @@ UML7_VERSION = @ultramonkeyl7_version@ | ||
4 | 4 | HB2_TEMPDIR = ${prefix}/share/doc/$(UML7_VERSION)/heartbeat-ra |
5 | 5 | |
6 | 6 | install: |
7 | - $(INSTALL) -b -m 644 -D ./logd.cf $(HB2_TEMPDIR)/logd.cf | |
8 | - $(INSTALL) -b -m 644 -D ./ha.cf $(HB2_TEMPDIR)/ha.cf | |
9 | - $(INSTALL) -b -m 600 -D ./authkeys $(HB2_TEMPDIR)/authkeys | |
10 | - $(INSTALL) -b -m 600 -D ./cib.xml-sample $(HB2_TEMPDIR)/cib.xml | |
11 | 7 | $(INSTALL) -b -m 600 -D ./sample.crm $(HB2_TEMPDIR)/sample.crm |
12 | 8 | $(INSTALL) -b -m 755 -D ./L7vsd $(HB2_TEMPDIR)/L7vsd |
13 | 9 | $(INSTALL) -b -m 755 -D ./L7directord $(HB2_TEMPDIR)/L7directord |
14 | - $(INSTALL) -b -m 755 -D ./VIPcheck $(HB2_TEMPDIR)/VIPcheck |
@@ -3,15 +3,11 @@ Heartbeat Resource Agent and example configuration files. | ||
3 | 3 | == Files == |
4 | 4 | L7directord: Resource Agent for l7directord. |
5 | 5 | L7vsd: Resource Agent for l7vsd. |
6 | -VIPcheck: Resource Agent for VIP. | |
7 | -authkeys: Heartbeat authkey example. | |
8 | -cib.xml-sample: Heartbeat cib.xml example. | |
9 | -ha.cf: Heartbeat ha.cf example. | |
10 | -logd.cf: Heartbeat logd.cf example. | |
6 | +sample.crm Pacemaker CRM example. | |
11 | 7 | |
12 | 8 | == Set up == |
13 | -See Heartbeat2 install manual for UltraMonkey-L7. (Japanese) | |
14 | -http://osdn.jp/projects/ultramonkey-l7/docs/?category_id=964 | |
9 | +See Pacemaker install manual for UltraMonkey-L7. (Japanese) | |
10 | +https://osdn.jp/projects/ultramonkey-l7/docs/?category_id=1148 | |
15 | 11 | |
16 | 12 | You can use Resource Agents as they are. But you must edit at |
17 | 13 | least IP addresses in configuration files. |
@@ -1,150 +0,0 @@ | ||
1 | -#!/bin/sh | |
2 | -# | |
3 | -# | |
4 | -# This program is free software; you can redistribute it and/or modify | |
5 | -# it under the terms of version 2 of the GNU General Public License as | |
6 | -# published by the Free Software Foundation. | |
7 | -# | |
8 | -# This program is distributed in the hope that it would be useful, but | |
9 | -# WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
11 | -# | |
12 | -# Further, this software is distributed without any warranty that it is | |
13 | -# free of the rightful claim of any third person regarding infringement | |
14 | -# or the like. Any license provided herein, whether implied or | |
15 | -# otherwise, applies only to this software file. Patent licenses, if | |
16 | -# any, provided herein do not apply to combinations of this program with | |
17 | -# other software, or any other product whatsoever. | |
18 | -# | |
19 | -# You should have received a copy of the GNU General Public License | |
20 | -# along with this program; if not, write the Free Software Foundation, | |
21 | -# Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | |
22 | -# | |
23 | - | |
24 | -####################################################################### | |
25 | -# Initialization: | |
26 | - | |
27 | -. ${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs | |
28 | -#. /usr/lib/ocf/resource.d/heartbeat/.ocf-shellfuncs | |
29 | - | |
30 | -####################################################################### | |
31 | - | |
32 | -meta_data() { | |
33 | - cat <<END | |
34 | -<?xml version="1.0"?> | |
35 | -<!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd"> | |
36 | -<resource-agent name="VIPcheck" version="0.1"> | |
37 | -<version>1.0</version> | |
38 | - | |
39 | -<longdesc lang="en"> | |
40 | -This is a VIPcheck Resource Agent. | |
41 | -</longdesc> | |
42 | -<shortdesc lang="en">VIPcheck resource agent</shortdesc> | |
43 | - | |
44 | -<parameters> | |
45 | -<parameter name="target_ip" unique="1"> | |
46 | -<longdesc lang="en"> | |
47 | -ping target VIP address. | |
48 | -</longdesc> | |
49 | -<shortdesc lang="en">target ip</shortdesc> | |
50 | -<content type="string" default="" /> | |
51 | -</parameter> | |
52 | - | |
53 | -<parameter name="count" unique="1"> | |
54 | -<longdesc lang="en"> | |
55 | -repeat times | |
56 | -</longdesc> | |
57 | -<shortdesc lang="en">repeat times</shortdesc> | |
58 | -<content type="integer" default="1" /> | |
59 | -</parameter> | |
60 | - | |
61 | -<parameter name="wait" unique="1"> | |
62 | -<longdesc lang="en"> | |
63 | -wait times | |
64 | -</longdesc> | |
65 | -<shortdesc lang="en">wait times</shortdesc> | |
66 | -<content type="integer" default="10" /> | |
67 | -</parameter> | |
68 | - | |
69 | -</parameters> | |
70 | - | |
71 | -<actions> | |
72 | -<action name="start" timeout="60" /> | |
73 | -<action name="stop" timeout="60" /> | |
74 | -<action name="monitor" timeout="60" interval="10" depth="0" start-delay="0" /> | |
75 | -<action name="meta-data" timeout="5" /> | |
76 | -</actions> | |
77 | -</resource-agent> | |
78 | -END | |
79 | -} | |
80 | - | |
81 | -####################################################################### | |
82 | - | |
83 | -VIPcheck_usage() { | |
84 | - cat <<END | |
85 | -usage: $0 {start|stop|monitor|meta-data} | |
86 | - | |
87 | -Expects to have a fully populated OCF RA-compliant environment set. | |
88 | -END | |
89 | -} | |
90 | - | |
91 | -VIPcheck_start() { | |
92 | - VIPcheck_monitor | |
93 | - if [ $? = $OCF_SUCCESS ]; then | |
94 | - return $OCF_SUCCESS | |
95 | - fi | |
96 | - | |
97 | - ping ${OCF_RESKEY_target_ip} -c ${OCF_RESKEY_count} -w ${OCF_RESKEY_wait} > /dev/null 2>&1 | |
98 | - prc=$? | |
99 | - ocf_log debug "target_ip = $OCF_RESKEY_target_ip, count = $OCF_RESKEY_count, wait = $OCF_RESKEY_wait" | |
100 | - ocf_log debug "ping return code = $prc" | |
101 | - if [ $prc = 0 ]; then | |
102 | - # pingが通った-->ERROR | |
103 | - return $OCF_ERR_GENERIC | |
104 | - else | |
105 | - # pingが通らない --> 成功 | |
106 | - touch ${OCF_RESKEY_state} | |
107 | - return $OCF_SUCCESS | |
108 | - fi | |
109 | -} | |
110 | - | |
111 | -VIPcheck_stop() { | |
112 | - VIPcheck_monitor | |
113 | - if [ $? = $OCF_SUCCESS ]; then | |
114 | - rm ${OCF_RESKEY_state} | |
115 | - fi | |
116 | - return $OCF_SUCCESS | |
117 | -} | |
118 | - | |
119 | -VIPcheck_monitor() { | |
120 | - if [ -f ${OCF_RESKEY_state} ]; then | |
121 | - return $OCF_SUCCESS | |
122 | - fi | |
123 | - if false ; then | |
124 | - return $OCF_ERR_GENERIC | |
125 | - fi | |
126 | - return $OCF_NOT_RUNNING | |
127 | -} | |
128 | - | |
129 | -: ${OCF_RESKEY_wait=10} | |
130 | -: ${OCF_RESKEY_count=1} | |
131 | -: ${OCF_RESKEY_state=${HA_RSCTMP}/VIPcheck-${OCF_RESOURCE_INSTANCE}.state} | |
132 | - | |
133 | -case $__OCF_ACTION in | |
134 | -meta-data) meta_data | |
135 | - exit $OCF_SUCCESS | |
136 | - ;; | |
137 | -start) VIPcheck_start;; | |
138 | -stop) VIPcheck_stop;; | |
139 | -monitor) VIPcheck_monitor;; | |
140 | -usage|help) VIPcheck_usage | |
141 | - exit $OCF_SUCCESS | |
142 | - ;; | |
143 | -*) VIPcheck_usage | |
144 | - exit $OCF_ERR_UNIMPLEMENTED | |
145 | - ;; | |
146 | -esac | |
147 | -rc=$? | |
148 | -ocf_log debug "${OCF_RESOURCE_INSTANCE} $__OCF_ACTION : $rc" | |
149 | -exit $rc | |
150 | - |
@@ -1,2 +0,0 @@ | ||
1 | -auth 1 | |
2 | -1 sha1 ClusterKey01 |
@@ -1,94 +0,0 @@ | ||
1 | - <cib admin_epoch="0" epoch="0" num_updates="0"> | |
2 | - <configuration> | |
3 | - <crm_config> | |
4 | - <cluster_property_set id="cib-bootstrap-options"> | |
5 | - <attributes> | |
6 | - <nvpair id="cib-bootstrap-options-no-quorum-policy" name="no-quorum-policy" value="ignore"/> | |
7 | - <nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="false"/> | |
8 | - <nvpair id="cib-bootstrap-options-default-resource-stickiness" name="default-resource-stickiness" value="INFINITY"/> | |
9 | - <nvpair id="cib-bootstrap-options-default-resource-failure-stickiness" name="default-resource-failure-stickiness" value="-INFINITY"/> | |
10 | - <nvpair id="cib-bootstrap-options-default-action-timeout" name="default-action-timeout" value="120s"/> | |
11 | - </attributes> | |
12 | - </cluster_property_set> | |
13 | - </crm_config> | |
14 | - <nodes/> | |
15 | - <resources> | |
16 | - <group id="grpUltraMonkey1"> | |
17 | - <primitive id="prmVIPcheck" class="ocf" type="VIPcheck" provider="heartbeat"> | |
18 | - <instance_attributes id="prmVIPcheck_instance_attrs"> | |
19 | - <attributes> | |
20 | - <nvpair id="atr:VIPcheck:ex:VIPcheck:target_ip" name="target_ip" value="192.168.1.200"/> | |
21 | - <nvpair id="atr:VIPcheck:ex:VIPcheck:count" name="count" value="1"/> | |
22 | - <nvpair id="atr:VIPcheck:ex:VIPcheck:wait" name="wait" value="10"/> | |
23 | - </attributes> | |
24 | - </instance_attributes> | |
25 | - <operations> | |
26 | - <op id="op:VIPcheck:ex:VIPcheck:start" name="start" timeout="90s" on_fail="restart" start_delay="4s"/> | |
27 | - </operations> | |
28 | - </primitive> | |
29 | - <primitive id="prmVIP" class="ocf" type="IPaddr2" provider="heartbeat"> | |
30 | - <instance_attributes id="prmVIP_instance_attrs"> | |
31 | - <attributes> | |
32 | - <nvpair id="atr:VIP:ex:IPadder2:ip" name="ip" value="192.168.1.200"/> | |
33 | - <nvpair id="atr:VIP:ex:IPadder2:nic" name="nic" value="eth0"/> | |
34 | - <nvpair id="atr:VIP:ex:IPadder2:cidr_netmask" name="cidr_netmask" value="24"/> | |
35 | - </attributes> | |
36 | - </instance_attributes> | |
37 | - <operations> | |
38 | - <op id="op:VIP:ex:IPadder2:start" name="start" timeout="60s" on_fail="restart"/> | |
39 | - <op id="op:VIP:ex:IPadder2:monitor" name="monitor" interval="10s" timeout="60s" on_fail="restart"/> | |
40 | - <op id="op:VIP:ex:IPadder2:stop" name="stop" timeout="60s" on_fail="block"/> | |
41 | - </operations> | |
42 | - </primitive> | |
43 | - <primitive id="prmL7directord" class="ocf" type="L7directord" provider="heartbeat"> | |
44 | - <operations> | |
45 | - <op id="op:L7directord:ex:L7directord:start" name="start" timeout="60s" on_fail="restart"/> | |
46 | - <op id="op:L7directord:ex:L7directord:monitor" name="monitor" interval="10s" timeout="60s" on_fail="restart"/> | |
47 | - <op id="op:L7directord:ex:L7directord:stop" name="stop" timeout="60s" on_fail="block"/> | |
48 | - </operations> | |
49 | - </primitive> | |
50 | - </group> | |
51 | - <clone id="grpClone1" ordered="false" interleave="false" notify="false" globally_unique="false"> | |
52 | - <instance_attributes id="grpClone1_attrs"> | |
53 | - <attributes> | |
54 | - <nvpair id="atr:Clone1:ex:clone:clone_max" name="clone_max" value="2"/> | |
55 | - <nvpair id="atr:Clone1:ex:clone:clone_node_max" name="clone_node_max" value="1"/> | |
56 | - </attributes> | |
57 | - </instance_attributes> | |
58 | - <primitive id="prmL7vsd" class="ocf" type="L7vsd" provider="heartbeat"> | |
59 | - <operations> | |
60 | - <op id="op:L7vsd:ex:L7vsd:start" name="start" timeout="60s" on_fail="restart"/> | |
61 | - <op id="op:L7vsd:ex:L7vsd:monitor" name="monitor" interval="10s" timeout="60s" on_fail="restart"/> | |
62 | - <op id="op:L7vsd:ex:L7vsd:stop" name="stop" timeout="60s" on_fail="block"/> | |
63 | - </operations> | |
64 | - </primitive> | |
65 | - </clone> | |
66 | - </resources> | |
67 | - <constraints> | |
68 | - <rsc_colocation id="colocation_UltraMonkey1_and_Clone1" from="grpUltraMonkey1" to="grpClone1" score="INFINITY"/> | |
69 | - <rsc_location id="location_node01_200" rsc="grpUltraMonkey1"> | |
70 | - <rule id="prefered_location_node01_200" score="200"> | |
71 | - <expression attribute="#uname" id="location:grpUltraMonkey:node01" operation="eq" value="LB01"/> | |
72 | - </rule> | |
73 | - </rsc_location> | |
74 | - <rsc_location id="location_node02_100" rsc="grpUltraMonkey1"> | |
75 | - <rule id="prefered_location_node02_100" score="100"> | |
76 | - <expression attribute="#uname" id="location:grpUltraMonkey:node02" operation="eq" value="LB02"/> | |
77 | - </rule> | |
78 | - </rsc_location> | |
79 | - <rsc_location id="rul_PN1_dsc" rsc="grpUltraMonkey1"> | |
80 | - <rule id="prefered_rul_PN1_dsc" score="-INFINITY" boolean_op="and"> | |
81 | - <expression attribute="default_ping_set" id="PN1_dsc:expr:defined" operation="defined"/> | |
82 | - <expression attribute="default_ping_set" id="PN1_dsc:expr:lt" operation="lt" value="100"/> | |
83 | - </rule> | |
84 | - </rsc_location> | |
85 | - <rsc_location id="rul_diskcheck_status_internal" rsc="grpUltraMonkey1"> | |
86 | - <rule id="preferd_diskcheck_status_internal" score="-INFINITY" boolean_op="and"> | |
87 | - <expression attribute="diskcheck_status_internal" id="diskcheck_status_internal:defined" operation="defined"/> | |
88 | - <expression attribute="diskcheck_status_internal" id="diskcheck_status_internal:eq" operation="eq" value="ERROR"/> | |
89 | - </rule> | |
90 | - </rsc_location> | |
91 | - <rsc_order id="order_UltraMonkey1_and_Clone1" from="grpClone1" action="start" type="before" to="grpUltraMonkey1" score="0"/> | |
92 | - </constraints> | |
93 | - </configuration> | |
94 | - </cib> |
@@ -1,21 +0,0 @@ | ||
1 | -crm on | |
2 | -use_logd on | |
3 | - | |
4 | -debug 0 | |
5 | -udpport 694 | |
6 | -keepalive 2 | |
7 | -warntime 7 | |
8 | -deadtime 10 | |
9 | -initdead 48 | |
10 | - | |
11 | -bcast eth2 | |
12 | -bcast eth3 | |
13 | - | |
14 | -node hpww0101 | |
15 | -node hpww0201 | |
16 | - | |
17 | -watchdog /dev/watchdog | |
18 | -respawn root /usr/lib64/heartbeat/pingd -m 100 -a default_ping_set | |
19 | -ping 192.168.43.14 | |
20 | -respawn root /usr/lib64/heartbeat/diskd -N /dev/sda -a diskcheck_status_internal -i 10 | |
21 | -respawn root /etc/ha.d/monitoring/heartbeat_logmoni.sh monitor |
@@ -1,3 +0,0 @@ | ||
1 | -logfile /var/log/ha-log | |
2 | -debugfile /var/log/ha-debug | |
3 | -logfacility none |
@@ -1,9 +1,7 @@ | ||
1 | 1 | ### Cluster Option ### |
2 | 2 | property no-quorum-policy="ignore" \ |
3 | 3 | stonith-enabled="false" \ |
4 | - startup-fencing="false" \ | |
5 | - stonith-timeout="750s" \ | |
6 | - crmd-transition-delay=2s | |
4 | + startup-fencing="false" | |
7 | 5 | |
8 | 6 | ### Resource Defaults ### |
9 | 7 | rsc_defaults resource-stickiness="INFINITY" \ |
@@ -26,13 +24,16 @@ group grpUltraMonkey \ | ||
26 | 24 | prmL7directord |
27 | 25 | #group grpStonith1 \ |
28 | 26 | # prmStonith1-1 \ |
29 | -# prmStonith1-2 \ | |
30 | -# prmStonith1-3 | |
27 | +# prmStonith1-2 | |
31 | 28 | |
32 | 29 | #group grpStonith2 \ |
33 | 30 | # prmStonith2-1 \ |
34 | -# prmStonith2-2 \ | |
35 | -# prmStonith2-3 | |
31 | +# prmStonith2-2 | |
32 | + | |
33 | +### Fencing Topology ### | |
34 | +#fencing_topology \ | |
35 | +# MODIFY_PRYMARY_HOST: prmStonith1-1 prmStonith1-2 \ | |
36 | +# MODIFY_SECONDARY_HOST: prmStonith2-1 prmStonith2-2 | |
36 | 37 | |
37 | 38 | ### Primitive Configuration ### |
38 | 39 | primitive prmVIPcheck ocf:heartbeat:VIPcheck \ |
@@ -61,11 +62,14 @@ primitive prmL7vsd ocf:heartbeat:L7vsd \ | ||
61 | 62 | op monitor interval="10s" timeout="60s" on-fail="restart" \ |
62 | 63 | op stop interval="0s" timeout="60s" on-fail="block" |
63 | 64 | |
64 | -primitive prmPingd ocf:pacemaker:pingd \ | |
65 | +primitive prmPing ocf:pacemaker:ping \ | |
65 | 66 | params \ |
66 | 67 | name="default_ping_set" \ |
67 | 68 | host_list="MODIFY_PING_TARGET_IP" \ |
68 | 69 | multiplier="100" \ |
70 | + attempts="2" \ | |
71 | + timeout="2" \ | |
72 | + debug="true" \ | |
69 | 73 | op start interval="0s" timeout="60s" on-fail="restart" \ |
70 | 74 | op monitor interval="10s" timeout="60s" on-fail="restart" \ |
71 | 75 | op stop interval="0s" timeout="60s" on-fail="ignore" |
@@ -81,58 +85,47 @@ primitive prmDiskd ocf:pacemaker:diskd \ | ||
81 | 85 | |
82 | 86 | #primitive prmStonith1-1 stonith:external/stonith-helper \ |
83 | 87 | # params \ |
84 | -# priority="1" \ | |
88 | +# pcmk_reboot_retries="1" \ | |
85 | 89 | # stonith-timeout="40s" \ |
86 | 90 | # hostlist="MODIFY_PRYMARY_HOST" \ |
87 | 91 | # dead_check_target="MODIFY_TARGET_IP MODIFY_TARGET_IP ..." \ |
88 | -# standby_check_command="/usr/sbin/crm_resource -r prmVIP -W | grep -q `hostname`" \ | |
89 | -# op start interval="0s" timeout="60s" \ | |
90 | -# op monitor interval="10s" timeout="60s" \ | |
91 | -# op stop interval="0s" timeout="60s" | |
92 | +# standby_check_command="/usr/sbin/crm_resource -r prmL7directord -W | grep -q `hostname`" \ | |
93 | +# run_online_check="yes" \ | |
94 | +# op start interval="0s" timeout="60s" on-fail="restart" \ | |
95 | +# op stop interval="0s" timeout="60s" on-fail="ignore" | |
92 | 96 | |
93 | 97 | #primitive prmStonith1-2 stonith:external/ipmi \ |
94 | 98 | # params \ |
99 | +# pcmk_reboot_timeout="60s" \ | |
95 | 100 | # passwd="MODIFY_IPMI_PASSWORD" \ |
96 | 101 | # ipaddr="MODIFY_IPMI_IP" \ |
97 | -# priority="2" \ | |
98 | 102 | # userid="MODIFY_IPMI_USER" \ |
99 | 103 | # hostname="MODIFY_PRYMARY_HOST" \ |
100 | 104 | # interface="MODIFY_IPMI_INTERFACE" \ |
101 | -# stonith-timeout="60s" \ | |
102 | -# op start interval="0s" timeout="60s" \ | |
103 | -# op monitor interval="3600s" timeout="60s" \ | |
104 | -# op stop interval="0s" timeout="60s" | |
105 | - | |
106 | -#primitive prmStonith1-3 stonith:meatware \ | |
107 | -# params \ | |
108 | -# priority="3" \ | |
109 | -# stonith-timeout="600s" \ | |
110 | -# hostlist="MODIFY_PRYMARY_HOST" \ | |
111 | -# op start interval="0s" timeout="60s" \ | |
112 | -# op monitor interval="3600s" timeout="60s" \ | |
113 | -# op stop interval="0s" timeout="60s" | |
105 | +# op start interval="0s" timeout="60s" on-fail="restart" \ | |
106 | +# op monitor interval="3600s" timeout="60s" on-fail="restart" \ | |
107 | +# op stop interval="0s" timeout="60s" on-fail="ignore" | |
114 | 108 | |
115 | 109 | #primitive prmStonith2-1 stonith:external/stonith-helper \ |
116 | 110 | # params \ |
117 | -# priority="1" \ | |
111 | +# pcmk_reboot_retries="1" \ | |
118 | 112 | # stonith-timeout="40s" \ |
119 | 113 | # hostlist="MODIFY_SECONDARY_HOST" \ |
120 | 114 | # dead_check_target="MODIFY_TARGET_IP MODIFY_TARGET_IP ..." \ |
121 | -# standby_check_command="/usr/sbin/crm_resource -r prmVIP -W | grep -q `hostname`" \ | |
122 | -# op start interval="0s" timeout="60s" \ | |
123 | -# op monitor interval="10s" timeout="60s" \ | |
124 | -# op stop interval="0s" timeout="60s" | |
115 | +# standby_check_command="/usr/sbin/crm_resource -r prmL7directord -W | grep -q `hostname`" \ | |
116 | +# run_online_check="yes" \ | |
117 | +# op start interval="0s" timeout="60s" on-fail="restart" \ | |
118 | +# op stop interval="0s" timeout="60s" on-fail="ignore" | |
125 | 119 | |
126 | 120 | #primitive prmStonith2-2 stonith:external/ipmi \ |
127 | 121 | # params \ |
122 | +# pcmk_reboot_timeout="60s" \ | |
128 | 123 | # passwd="MODIFY_IPMI_PASSWORD" \ |
129 | 124 | # ipaddr="MODIFY_IPMI_IP" \ |
130 | -# priority="2" \ | |
131 | 125 | # userid="MODIFY_IPMI_USER" \ |
132 | 126 | # hostname="MODIFY_SECONDARY_HOST" \ |
133 | 127 | # interface="MODIFY_IPMI_INTERFACE" \ |
134 | -# stonith-timeout="60s" \ | |
135 | -# op start interval="0s" timeout="60s" \ | |
128 | +# op start interval="0s" timeout="60s" onfail\ | |
136 | 129 | # op monitor interval="3600s" timeout="60s" \ |
137 | 130 | # op stop interval="0s" timeout="60s" |
138 | 131 |
@@ -141,9 +134,9 @@ primitive prmDiskd ocf:pacemaker:diskd \ | ||
141 | 134 | # priority="3" \ |
142 | 135 | # stonith-timeout="600s" \ |
143 | 136 | # hostlist="MODIFY_SECONDARY_HOST" \ |
144 | -# op start interval="0s" timeout="60s" \ | |
145 | -# op monitor interval="3600s" timeout="60s" \ | |
146 | -# op stop interval="0s" timeout="60s" | |
137 | +# op start interval="0s" timeout="60s" on-fail="restart" \ | |
138 | +# op monitor interval="3600s" timeout="60s" on-fail="restart" \ | |
139 | +# op stop interval="0s" timeout="60s" on-fail="ignore" | |
147 | 140 | |
148 | 141 | ### Resource Location ### |
149 | 142 | location rsc_location-grpUltraMonkey-1 grpUltraMonkey \ |
@@ -4,5 +4,8 @@ SBINDIR = @sbindir@ | ||
4 | 4 | |
5 | 5 | install: |
6 | 6 | $(INSTALL) -m 755 -D ./l7directord $(SBINDIR)/l7directord |
7 | +if CHECK_SYSTEMD | |
8 | + $(INSTALL) -m 644 -D ./systemd/l7directord.service ${prefix}/lib/systemd/system/l7directord.service | |
9 | +else | |
7 | 10 | $(INSTALL) -m 755 -D ./init.d/l7directord ${sysconfdir}/rc.d/init.d/l7directord |
8 | - | |
11 | +endif |
@@ -0,0 +1,14 @@ | ||
1 | +[Unit] | |
2 | +Description=UltraMonkey-L7 healthcheck daemon | |
3 | +After=syslog.target network.target nss-lookup.service | |
4 | + | |
5 | +[Service] | |
6 | +Type=forking | |
7 | +EnvironmentFile=/etc/ha.d/conf/l7directord.cf | |
8 | +ExecStart=/usr/sbin/l7directord start | |
9 | +ExecReload=/usr/sbin/l7directord reload | |
10 | +ExecStop=/usr/sbin/l7directord stop | |
11 | +PIDFile=/var/run/l7directord.l7directord.pid | |
12 | + | |
13 | +[Install] | |
14 | +WantedBy=multi-user.target |
@@ -0,0 +1,13 @@ | ||
1 | +[Unit] | |
2 | +Description=UltraMonkey-L7 healthcheck daemon | |
3 | +After=syslog.target network.target nss-lookup.service l7vsd.service | |
4 | + | |
5 | +[Service] | |
6 | +Type=forking | |
7 | +ExecStart=/usr/sbin/l7directord /etc/ha.d/conf/l7directord.cf start | |
8 | +ExecReload=/usr/sbin/l7directord /etc/ha.d/conf/l7directord.cf reload | |
9 | +ExecStop=/usr/sbin/l7directord /etc/ha.d/conf/l7directord.cf stop | |
10 | +PIDFile=/var/run/l7directord.l7directord.pid | |
11 | + | |
12 | +[Install] | |
13 | +WantedBy=multi-user.target |
@@ -1,2 +1,2 @@ | ||
1 | 1 | AUTOMAKE_OPTIONS = foreign |
2 | -SUBDIRS = init.d src module include | |
2 | +SUBDIRS = init.d systemd src module include |
@@ -1,4 +1,6 @@ | ||
1 | 1 | AUTOMAKE_OPTIONS = foreign |
2 | 2 | |
3 | 3 | install: |
4 | +if !CHECK_SYSTEMD | |
4 | 5 | $(INSTALL) -m 755 -D ./l7vsd ${sysconfdir}/rc.d/init.d/l7vsd |
6 | +endif |
@@ -0,0 +1,14 @@ | ||
1 | +[Unit] | |
2 | +Description=UltraMonkey-L7 loadbalancing daemon | |
3 | +After=syslog.target network.target nss-lookup.service | |
4 | + | |
5 | +[Service] | |
6 | +Type=oneshot | |
7 | +# LimitNOFILE=65536 | |
8 | +EnvironmentFile=/etc/l7vs/l7vs.cf | |
9 | +ExecStart=/usr/sbin/l7vsd | |
10 | +ExecStop=/bin/kill $MAINPID | |
11 | +RemainAfterExit=yes | |
12 | + | |
13 | +[Install] | |
14 | +WantedBy=multi-user.target |
@@ -173,6 +173,7 @@ l7vsd_LDADD = \ | ||
173 | 173 | -lboost_system-mt \ |
174 | 174 | -lboost_serialization-mt \ |
175 | 175 | -lnetsnmpmibs -lnetsnmpagent -lnetsnmphelpers -lnetsnmp \ |
176 | + -lpthread \ | |
176 | 177 | @external_agent_libs@ |
177 | 178 | |
178 | 179 | l7vsadm_CPPFLAGS = \ |
@@ -197,6 +198,7 @@ l7vsadm_LDADD = \ | ||
197 | 198 | libl7vsadm_parameter.a \ |
198 | 199 | -llog4cxx \ |
199 | 200 | -lrt \ |
201 | + -lpthread \ | |
200 | 202 | -lboost_thread-mt \ |
201 | 203 | -lboost_system-mt \ |
202 | 204 | -lboost_serialization-mt \ |
@@ -0,0 +1,6 @@ | ||
1 | +AUTOMAKE_OPTIONS = foreign | |
2 | + | |
3 | +install: | |
4 | +if CHECK_SYSTEMD | |
5 | + $(INSTALL) -m 644 -D ./l7vsd.service ${prefix}/lib/systemd/system/l7vsd.service | |
6 | +endif |
@@ -0,0 +1,13 @@ | ||
1 | +[Unit] | |
2 | +Description=UltraMonkey-L7 loadbalancing daemon | |
3 | +After=syslog.target network.target nss-lookup.service | |
4 | +Before=l7directord.service | |
5 | + | |
6 | +[Service] | |
7 | +Type=forking | |
8 | +ExecStartPre=/bin/rm -rf /var/run/l7vs/l7vs | |
9 | +ExecStart=/usr/sbin/l7vsd | |
10 | +ExecStop=/bin/kill $MAINPID | |
11 | +ExecStopPost=/bin/rm -rf /var/run/l7vs/l7vs | |
12 | +[Install] | |
13 | +WantedBy=multi-user.target |
@@ -6,8 +6,8 @@ | ||
6 | 6 | |
7 | 7 | Summary: The Layer-7 Virtual Server |
8 | 8 | Name: ultramonkeyl7 |
9 | -Version: 3.1.2 | |
10 | -Release: 1%{?dist} | |
9 | +Version: 3.1.3 | |
10 | +Release: rc1%{?dist} | |
11 | 11 | License: LGPLv2.1 |
12 | 12 | Group: System Environment/Daemons |
13 | 13 | URL: http://osdn.jp/projects/ultramonkey-l7/ |
@@ -27,6 +27,14 @@ Requires: perl-Crypt-SSLeay | ||
27 | 27 | Requires: perl-Net-SSLeay |
28 | 28 | Requires: perl-IO-Socket-SSL |
29 | 29 | Requires: perl-IO-Socket-INET6 |
30 | +Requires: perl-Time-HiRes | |
31 | + | |
32 | +%if 0%{?fedora} >= 15 || 0%{?centos_version} >= 7 || 0%{?rhel} >= 7 | |
33 | +Requires: perl-LWP-Protocol-https | |
34 | +Requires: perl-Sys-Syslog | |
35 | +Requires: perl-autodie | |
36 | +Requires: systemd | |
37 | +%endif | |
30 | 38 | |
31 | 39 | %define hb2_tempdir /usr/share/doc/%{name}-%{version}/heartbeat-ra |
32 | 40 | %define mibs_tempdir /usr/share/doc/%{name}-%{version}/mibs |
@@ -51,6 +59,9 @@ for UltraMonkeyl7's module. | ||
51 | 59 | ./configure \ |
52 | 60 | --prefix=%{_prefix} \ |
53 | 61 | --sysconfdir=%{_sysconfdir} \ |
62 | +%if %{defined _unitdir} | |
63 | + --with-systemdsystemunitdir=%{_unitdir} \ | |
64 | +%endif | |
54 | 65 | --localstatedir=%{_localstatedir} \ |
55 | 66 | --libdir=%{_libdir} |
56 | 67 |
@@ -63,7 +74,11 @@ mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} | ||
63 | 74 | mkdir -p -m 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/l7vs |
64 | 75 | mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/l7vs/sslproxy |
65 | 76 | mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/ha.d/conf |
77 | +%if %{defined _unitdir} | |
78 | +mkdir -p ${RPM_BUILD_ROOT}%{_unitdir} | |
79 | +%else | |
66 | 80 | mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/rc.d/init.d |
81 | +%endif | |
67 | 82 | mkdir -p -m 755 ${RPM_BUILD_ROOT}%{l7vs_moddir} |
68 | 83 | mkdir -p ${RPM_BUILD_ROOT}%{l7vs_logdir} |
69 | 84 | mkdir -p ${RPM_BUILD_ROOT}%{l7vsadm_sockdir} |
@@ -81,22 +96,37 @@ mkdir -p ${RPM_BUILD_ROOT}%{_includedir} | ||
81 | 96 | rm -rf $RPM_BUILD_ROOT |
82 | 97 | |
83 | 98 | %post |
84 | -chkconfig --add l7vsd | |
85 | -chkconfig --add l7directord | |
99 | +%if %{defined _unitdir} | |
100 | + systemctl daemon-reload | |
101 | +%else | |
102 | + chkconfig --add l7vsd | |
103 | + chkconfig --add l7directord | |
104 | +%endif | |
86 | 105 | |
87 | 106 | %preun |
88 | 107 | if [ $1 = 0 ]; then |
108 | +%if %{defined _unitdir} | |
109 | + systemctl disable l7directord > /dev/null 2>&1 | |
110 | + systemctl disable l7vsd > /dev/null 2>&1 | |
111 | + systemctl stop l7directord > /dev/null 2>&1 | |
112 | + systemctl stop l7vsd > /dev/null 2>&1 | |
113 | +%else | |
89 | 114 | /sbin/service l7directord stop > /dev/null 2>&1 |
90 | 115 | /sbin/service l7vsd stop > /dev/null 2>&1 |
91 | 116 | chkconfig --del l7vsd |
92 | 117 | chkconfig --del l7directord |
118 | +%endif | |
93 | 119 | fi |
94 | 120 | |
95 | 121 | %files |
96 | 122 | %defattr(-, root, root, 0755) |
97 | 123 | %{_sbindir}/* |
98 | 124 | %{l7vs_moddir}/* |
125 | +%if %{defined _unitdir} | |
126 | +%{_unitdir}/* | |
127 | +%else | |
99 | 128 | %{_sysconfdir}/rc.d/init.d/* |
129 | +%endif | |
100 | 130 | %dir %{l7vs_moddir} |
101 | 131 | %dir %{l7vs_logdir} |
102 | 132 | %dir %{_sysconfdir}/l7vs |
@@ -133,7 +163,11 @@ fi | ||
133 | 163 | %{moduledevel_tempdir}/* |
134 | 164 | |
135 | 165 | %changelog |
136 | -* Wed Sep 11 2014 Hiroaki Nakano <nakano.hiroaki@nttcom.co.jp> 3.1.2-1 | |
166 | +* Sun Oct 18 2015 HIBARI Michiro <l05102@shibaura-it.ac.jp> 3.1.3-rc1 | |
167 | +- Update for 3.1.3-rc1 | |
168 | +- Add systemd Unit file. | |
169 | + | |
170 | +* Wed Sep 10 2014 Hiroaki Nakano <nakano.hiroaki@nttcom.co.jp> 3.1.2-1 | |
137 | 171 | - Update for 3.1.2-1 |
138 | 172 | - Marge from 3.1.2-devel to master. And modefy version. |
139 | 173 | - Fixed degraded bug: re-patch for fixed ticket 30300. |
@@ -159,7 +193,7 @@ fi | ||
159 | 193 | * Wed Aug 1 2012 Hiroaki Nakano <nakano.hiroaki@nttcom.co.jp> 3.0.4-rc1 |
160 | 194 | - Update for 3.0.4-rc1 |
161 | 195 | |
162 | -* Thu Dec 20 2011 HIBARI Michiro <hibari.michirou@nttcom.co.jp> 3.0.3-1 | |
196 | +* Tue Dec 20 2011 HIBARI Michiro <hibari.michirou@nttcom.co.jp> 3.0.3-1 | |
163 | 197 | - Update for 3.0.3-1 |
164 | 198 | |
165 | 199 | * Thu Feb 10 2011 HIBARI Michiro <hibari.michirou@nttcom.co.jp> 3.0.2-1 |