Revisión | a43097d3ea8f47bded1069a3b9adb332c0c502f7 (tree) |
---|---|
Tiempo | 2014-06-16 17:44:00 |
Autor | Hiroaki Nakano <nakano.hiroaki@nttc...> |
Commiter | Hiroaki Nakano |
Merge branch 'master' of file:///var/www/html/ultramonkey-l7-v3.git
@@ -1,3 +1,7 @@ | ||
1 | +[Mar. 9 2014] 3.1.1-1 HIBARI Michiro, Hiroaki Nakano | |
2 | + - #33102 fix memory leak. | |
3 | + - #33255 fix accessing endpoint at deleted realserver. | |
4 | + | |
1 | 5 | [Sep. 8 2012] 3.1.0-1 HIBARI Michiro, Hiroaki Nakano |
2 | 6 | - Add "session_thread_pool_size" option for l7vsadm and l7directord. |
3 | 7 | - Change spec file. Make devel package. |
@@ -1,7 +1,7 @@ | ||
1 | 1 | AC_PREREQ(2.59) |
2 | 2 | AC_INIT(l7vsd) |
3 | 3 | PACKAGENAME=l7vsd |
4 | -VERSION=3.1.0 | |
4 | +VERSION=3.1.1 | |
5 | 5 | |
6 | 6 | AM_INIT_AUTOMAKE($PACKAGENAME, $VERSION, no-define ) |
7 | 7 | AC_CONFIG_SRCDIR([config.h.in]) |
@@ -145,6 +145,12 @@ l7directord_status(){ | ||
145 | 145 | # Get Resource Monitor Method |
146 | 146 | ############################### |
147 | 147 | l7directord_monitor() { |
148 | + local loglevel | |
149 | + loglevel=${1:-err} | |
150 | + if ocf_is_probe; then | |
151 | + loglevel="info" | |
152 | + fi | |
153 | + | |
148 | 154 | isRunning; |
149 | 155 | RET=$? |
150 | 156 | if [ $RET -eq 1 ]; then |
@@ -158,7 +164,7 @@ l7directord_monitor() { | ||
158 | 164 | fi |
159 | 165 | elif [ $RET -eq 0 ]; then |
160 | 166 | MSG="l7direcotrd is not running." |
161 | - outputLog err ${OCF_NOT_RUNNING} ${MSG} | |
167 | + outputLog $loglevel ${OCF_NOT_RUNNING} ${MSG} | |
162 | 168 | return ${OCF_NOT_RUNNING} |
163 | 169 | fi |
164 | 170 | MSG="l7direcotrd does not work. (ps=$RET) " |
@@ -171,7 +177,7 @@ l7directord_monitor() { | ||
171 | 177 | ############################### |
172 | 178 | l7directord_start() { |
173 | 179 | outputLog info "l7directord is starting ..." |
174 | - l7directord_monitor | |
180 | + l7directord_monitor info | |
175 | 181 | RET=$? |
176 | 182 | if [ $RET -eq ${OCF_SUCCESS} ]; then |
177 | 183 | MSG="l7directord is already running." |
@@ -67,7 +67,7 @@ END | ||
67 | 67 | ############################### |
68 | 68 | l7vsd_start() { |
69 | 69 | ocf_log info "l7vsd is starting ..." |
70 | - l7vsd_monitor | |
70 | + l7vsd_monitor info | |
71 | 71 | RET=$? |
72 | 72 | if [ $RET -eq $OCF_SUCCESS ]; then |
73 | 73 | ocf_log info "l7vsd is already running." |
@@ -182,6 +182,12 @@ l7vsd_status(){ | ||
182 | 182 | # Get Resource Monitor Method |
183 | 183 | ############################### |
184 | 184 | l7vsd_monitor() { |
185 | + local loglevel | |
186 | + loglevel=${1:-err} | |
187 | + if ocf_is_probe; then | |
188 | + loglevel="info" | |
189 | + fi | |
190 | + | |
185 | 191 | isRunning; |
186 | 192 | RET=$? |
187 | 193 | if [ $RET -eq 1 ]; then |
@@ -195,7 +201,7 @@ l7vsd_monitor() { | ||
195 | 201 | fi |
196 | 202 | elif [ $RET -eq 0 ]; then |
197 | 203 | MSG="l7vsd is not running." |
198 | - outputLog err ${OCF_NOT_RUNNING} ${MSG} | |
204 | + outputLog $loglevel ${OCF_NOT_RUNNING} ${MSG} | |
199 | 205 | return $OCF_NOT_RUNNING |
200 | 206 | fi |
201 | 207 | MSG="l7vsd does not work. (ps=$RET) " |
@@ -621,6 +621,8 @@ public: | ||
621 | 621 | void run(); |
622 | 622 | void stop(); |
623 | 623 | |
624 | + boost::shared_ptr<boost::thread> vs_thread_ptr; | |
625 | + | |
624 | 626 | void connection_active(const boost::asio::ip::tcp::endpoint &); |
625 | 627 | void connection_inactive(const boost::asio::ip::tcp::endpoint &); |
626 | 628 | void release_session(const tcp_session *session_ptr); |
@@ -254,7 +254,7 @@ void l7vsd::add_virtual_service(const virtualservice_element *in_vselement, e | ||
254 | 254 | try { |
255 | 255 | |
256 | 256 | // create thread and run |
257 | - vs_threads.create_thread(boost::bind(&virtual_service::run, vsptr)); | |
257 | + (*vsptr).vs_thread_ptr = boost::shared_ptr<boost::thread>(vs_threads.create_thread(boost::bind(&virtual_service::run, vsptr))); | |
258 | 258 | |
259 | 259 | } catch (...) { |
260 | 260 | std::stringstream buf; |
@@ -357,6 +357,8 @@ void l7vsd::del_virtual_service(const virtualservice_element *in_vselement, e | ||
357 | 357 | if (vslist.end() != vsitr) { |
358 | 358 | // vs stop |
359 | 359 | (*vsitr)->stop(); |
360 | + (*vsitr)->vs_thread_ptr->join(); | |
361 | + vs_threads.remove_thread((*vsitr)->vs_thread_ptr.get()); | |
360 | 362 | // vs finalize |
361 | 363 | (*vsitr)->finalize(err); |
362 | 364 |
@@ -800,14 +802,14 @@ void l7vsd::flush_virtual_service(error_code &err) | ||
800 | 802 | |
801 | 803 | // vs stop |
802 | 804 | (*itr)->stop(); |
805 | + // join virtualservice threads | |
806 | + (*itr)->vs_thread_ptr->join(); | |
807 | + vs_threads.remove_thread((*itr)->vs_thread_ptr.get()); | |
803 | 808 | // vs finalize |
804 | 809 | (*itr)->finalize(err); |
805 | 810 | } |
806 | 811 | } |
807 | 812 | |
808 | - // join virtualservice threads | |
809 | - vs_threads.join_all(); | |
810 | - | |
811 | 813 | // replication switch to slave |
812 | 814 | rep->switch_to_slave(); |
813 | 815 | } |
@@ -936,12 +936,10 @@ void l7vs::virtualservice_tcp::finalize(l7vs::error_code &err) | ||
936 | 936 | __FILE__, __LINE__); |
937 | 937 | } |
938 | 938 | } |
939 | - //waiting session delete | |
940 | - delete waiting_session; | |
941 | - waiting_session = NULL; | |
942 | - | |
943 | - //waiting thread delete | |
939 | + //release waiting session | |
944 | 940 | waiting_stc->join(); |
941 | + delete waiting_stc; | |
942 | + waiting_stc = NULL; | |
945 | 943 | |
946 | 944 | //unload ProtocolModule |
947 | 945 | if (protomod) { |
@@ -1531,8 +1529,9 @@ void l7vs::virtualservice_tcp::del_realserver(const l7vs::virtualservice_element | ||
1531 | 1529 | for (std::list<realserver>::iterator rs_itr = rs_list.begin(); |
1532 | 1530 | rs_itr != rs_list.end(); ++rs_itr) { |
1533 | 1531 | if (itr->tcp_endpoint == rs_itr->tcp_endpoint) { |
1532 | + boost::asio::ip::tcp::endpoint del_endpoint = rs_itr->tcp_endpoint; | |
1534 | 1533 | rs_list.erase(rs_itr); |
1535 | - active_sessions.do_all(boost::bind(&session_thread_control::session_realserver_remove, _1, rs_itr->tcp_endpoint)); | |
1534 | + active_sessions.do_all(boost::bind(&session_thread_control::session_realserver_remove, _1, del_endpoint)); | |
1536 | 1535 | break; |
1537 | 1536 | } |
1538 | 1537 | } |
@@ -6,7 +6,7 @@ Name: %define l7vs_moddir %{_libdir}/l7vs | ||
6 | 6 | |
7 | 7 | Summary: The Layer-7 Virtual Server |
8 | 8 | Name: ultramonkeyl7 |
9 | -Version: 3.1.0 | |
9 | +Version: 3.1.1 | |
10 | 10 | Release: 1%{?dist} |
11 | 11 | License: LGPLv2.1 |
12 | 12 | Group: System Environment/Daemons |
@@ -133,6 +133,14 @@ fi | ||
133 | 133 | %{moduledevel_tempdir}/* |
134 | 134 | |
135 | 135 | %changelog |
136 | +* Fri Mar 7 2014 Hiroaki Nakano <nakano.hiroaki@nttcom.co.jp> 3.1.1-1 | |
137 | +- Update for 3.1.1-1 | |
138 | +- Marge from 3.1.1-devel to master. And modefy version. | |
139 | + | |
140 | +* Fri Feb 7 2014 Hiroaki Nakano <nakano.hiroaki@nttcom.co.jp> 3.1.1-devel | |
141 | +- Update for 3.1.1-devel | |
142 | +- Bugfix | |
143 | + | |
136 | 144 | * Sat Sep 8 2012 HIBARI Michiro <l05102@shibaura-it.ac.jp> 3.1.0-devel |
137 | 145 | - Update for 3.1.0-devel |
138 | 146 | - Change spec file for generate devel package. |