From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: www-servers/nginx/files/, www-servers/nginx/
Date: Thu, 21 Apr 2016 20:49:47 +0000 (UTC) [thread overview]
Message-ID: <1461271751.85509ccf9222c448b6c6986b6b3efe18e3cba6cc.zmedico@gentoo> (raw)
commit: 85509ccf9222c448b6c6986b6b3efe18e3cba6cc
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 21 20:49:11 2016 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Apr 21 20:49:11 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85509ccf
www-servers/nginx: fix nginx_modules_upstream_check for 1.8.1 (bug 580764)
Package-Manager: portage-2.2.28
www-servers/nginx/files/check_1.7.2+.patch | 201 -----------------------------
www-servers/nginx/nginx-1.8.1.ebuild | 2 +-
2 files changed, 1 insertion(+), 202 deletions(-)
diff --git a/www-servers/nginx/files/check_1.7.2+.patch b/www-servers/nginx/files/check_1.7.2+.patch
deleted file mode 100644
index 50405a5..0000000
--- a/www-servers/nginx/files/check_1.7.2+.patch
+++ /dev/null
@@ -1,201 +0,0 @@
-commit 21116e1c0bba730ca59327ffba9320bc63f11462
-Author: Johan Bergström <bugs@bergstroem.nu>
-Date: Thu Jun 19 10:17:22 2014 +1000
-
- Add support for upstream_check to nginx 1.7.2
-
-diff --git src/http/modules/ngx_http_upstream_ip_hash_module.c src/http/modules/ngx_http_upstream_ip_hash_module.c
-index 148d73a..be9e03d 100644
---- src/http/modules/ngx_http_upstream_ip_hash_module.c
-+++ src/http/modules/ngx_http_upstream_ip_hash_module.c
-@@ -9,6 +9,9 @@
- #include <ngx_core.h>
- #include <ngx_http.h>
-
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+#include "ngx_http_upstream_check_handler.h"
-+#endif
-
- typedef struct {
- /* the round robin data must be first */
-@@ -212,6 +215,15 @@ ngx_http_upstream_get_ip_hash_peer(ngx_peer_connection_t *pc, void *data)
- goto next_try;
- }
-
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0,
-+ "get ip_hash peer, check_index: %ui",
-+ peer->check_index);
-+ if (ngx_http_check_peer_down(peer->check_index)) {
-+ goto next_try;
-+ }
-+#endif
-+
- if (peer->max_fails
- && peer->fails >= peer->max_fails
- && now - peer->checked <= peer->fail_timeout)
-diff --git src/http/modules/ngx_http_upstream_least_conn_module.c src/http/modules/ngx_http_upstream_least_conn_module.c
-index dbef95d..14e9e40 100644
---- src/http/modules/ngx_http_upstream_least_conn_module.c
-+++ src/http/modules/ngx_http_upstream_least_conn_module.c
-@@ -9,6 +9,9 @@
- #include <ngx_core.h>
- #include <ngx_http.h>
-
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+#include "ngx_http_upstream_check_handler.h"
-+#endif
-
- typedef struct {
- ngx_uint_t *conns;
-@@ -203,6 +206,16 @@ ngx_http_upstream_get_least_conn_peer(ngx_peer_connection_t *pc, void *data)
- continue;
- }
-
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0,
-+ "get least_conn peer, check_index: %ui",
-+ peer->check_index);
-+
-+ if (ngx_http_check_peer_down(peer->check_index)) {
-+ continue;
-+ }
-+#endif
-+
- if (peer->max_fails
- && peer->fails >= peer->max_fails
- && now - peer->checked <= peer->fail_timeout)
-@@ -256,6 +269,16 @@ ngx_http_upstream_get_least_conn_peer(ngx_peer_connection_t *pc, void *data)
- continue;
- }
-
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0,
-+ "get least_conn peer, check_index: %ui",
-+ peer->check_index);
-+
-+ if (ngx_http_check_peer_down(peer->check_index)) {
-+ continue;
-+ }
-+#endif
-+
- if (lcp->conns[i] * best->weight != lcp->conns[p] * peer->weight) {
- continue;
- }
-diff --git src/http/ngx_http_upstream_round_robin.c src/http/ngx_http_upstream_round_robin.c
-index 37c835c..43ccdcf 100644
---- src/http/ngx_http_upstream_round_robin.c
-+++ src/http/ngx_http_upstream_round_robin.c
-@@ -9,6 +9,9 @@
- #include <ngx_core.h>
- #include <ngx_http.h>
-
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+#include "ngx_http_upstream_check_handler.h"
-+#endif
-
- static ngx_http_upstream_rr_peer_t *ngx_http_upstream_get_peer(
- ngx_http_upstream_rr_peer_data_t *rrp);
-@@ -88,6 +91,14 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf,
- peer[n].fail_timeout = server[i].fail_timeout;
- peer[n].down = server[i].down;
- peer[n].server = server[i].name;
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+ if (!server[i].down) {
-+ peers->peer[n].check_index =
-+ ngx_http_check_add_peer(cf, us, &server[i].addrs[j]);
-+ } else {
-+ peers->peer[n].check_index = (ngx_uint_t) NGX_ERROR;
-+ }
-+#endif
- n++;
- }
- }
-@@ -144,6 +155,15 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf,
- peer[n].fail_timeout = server[i].fail_timeout;
- peer[n].down = server[i].down;
- peer[n].server = server[i].name;
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+ if (!server[i].down) {
-+ backup->peer[n].check_index =
-+ ngx_http_check_add_peer(cf, us, &server[i].addrs[j]);
-+ }
-+ else {
-+ backup->peer[n].check_index = (ngx_uint_t) NGX_ERROR;
-+ }
-+#endif
- n++;
- }
- }
-@@ -203,6 +223,9 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf,
- peer[i].current_weight = 0;
- peer[i].max_fails = 1;
- peer[i].fail_timeout = 10;
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+ peers->peer[i].check_index = (ngx_uint_t) NGX_ERROR;
-+#endif
- }
-
- us->peer.data = peers;
-@@ -312,7 +335,9 @@ ngx_http_upstream_create_round_robin_peer(ngx_http_request_t *r,
- peer[0].current_weight = 0;
- peer[0].max_fails = 1;
- peer[0].fail_timeout = 10;
--
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+ peers->peer[0].check_index = (ngx_uint_t) NGX_ERROR;
-+#endif
- } else {
-
- for (i = 0; i < ur->naddrs; i++) {
-@@ -352,6 +377,9 @@ ngx_http_upstream_create_round_robin_peer(ngx_http_request_t *r,
- peer[i].current_weight = 0;
- peer[i].max_fails = 1;
- peer[i].fail_timeout = 10;
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+ peers->peer[i].check_index = (ngx_uint_t) NGX_ERROR;
-+#endif
- }
- }
-
-@@ -411,6 +439,12 @@ ngx_http_upstream_get_round_robin_peer(ngx_peer_connection_t *pc, void *data)
- goto failed;
- }
-
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+ if (ngx_http_check_peer_down(peer->check_index)) {
-+ goto failed;
-+ }
-+#endif
-+
- } else {
-
- /* there are several peers */
-@@ -508,6 +542,12 @@ ngx_http_upstream_get_peer(ngx_http_upstream_rr_peer_data_t *rrp)
- continue;
- }
-
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+ if (ngx_http_check_peer_down(peer->check_index)) {
-+ continue;
-+ }
-+#endif
-+
- if (peer->max_fails
- && peer->fails >= peer->max_fails
- && now - peer->checked <= peer->fail_timeout)
-diff --git src/http/ngx_http_upstream_round_robin.h src/http/ngx_http_upstream_round_robin.h
-index 9db82a6..2fedd46 100644
---- src/http/ngx_http_upstream_round_robin.h
-+++ src/http/ngx_http_upstream_round_robin.h
-@@ -31,6 +31,10 @@ typedef struct {
- ngx_uint_t max_fails;
- time_t fail_timeout;
-
-+#if (NGX_UPSTREAM_CHECK_MODULE)
-+ ngx_uint_t check_index;
-+#endif
-+
- ngx_uint_t down; /* unsigned down:1; */
-
- #if (NGX_HTTP_SSL)
diff --git a/www-servers/nginx/nginx-1.8.1.ebuild b/www-servers/nginx/nginx-1.8.1.ebuild
index e75a805..5bb4978 100644
--- a/www-servers/nginx/nginx-1.8.1.ebuild
+++ b/www-servers/nginx/nginx-1.8.1.ebuild
@@ -276,7 +276,7 @@ src_prepare() {
epatch "${FILESDIR}/${PN}-1.4.1-fix-perl-install-path.patch"
if use nginx_modules_http_upstream_check; then
- epatch "${FILESDIR}"/check_1.7.2+.patch
+ epatch "${HTTP_UPSTREAM_CHECK_MODULE_WD}"/check_1.7.2+.patch
fi
if use nginx_modules_http_lua; then
next reply other threads:[~2016-04-21 20:49 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-21 20:49 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-05-07 3:15 [gentoo-commits] repo/gentoo:master commit in: www-servers/nginx/files/, www-servers/nginx/ Zac Medico
2016-05-14 9:05 Zac Medico
2016-07-26 9:51 Lars Wendler
2016-07-26 9:51 Lars Wendler
2016-08-10 22:13 Thomas Deutschmann
2016-10-12 19:48 Thomas Deutschmann
2016-10-19 14:38 Thomas Deutschmann
2016-11-15 21:49 Thomas Deutschmann
2017-04-14 10:51 Thomas Deutschmann
2017-07-12 10:34 Thomas Deutschmann
2018-02-18 16:05 Thomas Deutschmann
2018-06-05 16:25 Thomas Deutschmann
2018-06-22 10:37 Thomas Deutschmann
2018-11-11 22:43 Thomas Deutschmann
2018-12-13 15:39 Thomas Deutschmann
2020-08-14 0:07 Thomas Deutschmann
2022-07-13 19:05 Conrad Kostecki
2022-10-23 20:24 Conrad Kostecki
2024-09-02 2:55 Sam James
2024-10-19 14:44 Louis Sautier
2024-12-23 9:38 Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1461271751.85509ccf9222c448b6c6986b6b3efe18e3cba6cc.zmedico@gentoo \
--to=zmedico@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox