[master] 6768c37 Ignore missing reason in probe responses

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon Apr 10 16:55:06 CEST 2017


commit 6768c376edf2c879654d701bff7ffc95aa0eebfe
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Mon Sep 12 18:53:05 2016 +0200

    Ignore missing reason in probe responses
    
    This is a cherry-pick of 3271c51e303b1f187d851cdaf056a940ccaa8365 that
    fixed the issue for Varnish 3.0 since it wasn't a problem in the 4.1
    series then. This is only a back-port of the regression test since the
    referenced commits already fixed the regression.
    
    Refs 5e4d6c843376acc0bf14872d89a4e8bb2f77186b
    Refs 9f4226200ef7784b597056fbb788b57f64ca6ef3
    Refs #2069

diff --git a/bin/varnishtest/tests/r02069.vtc b/bin/varnishtest/tests/r02069.vtc
new file mode 100644
index 0000000..9e59644
--- /dev/null
+++ b/bin/varnishtest/tests/r02069.vtc
@@ -0,0 +1,38 @@
+varnishtest "Probe response without a reason"
+
+server s1 -repeat 20 {
+	rxreq
+	send "HTTP/1.1 200\r\n\r\n"
+} -start
+
+varnish v1 -vcl {
+	import std;
+
+	backend s1 {
+		.host = "${s1_addr}";
+		.port = "${s1_port}";
+		.probe = {
+			.initial = 0;
+			.window = 5;
+			.threshold = 5;
+			.interval = 100ms;
+		}
+	}
+
+	sub vcl_recv {
+		if (std.healthy(req.backend_hint)) {
+			return (synth(200));
+		}
+		else {
+			return (synth(500));
+		}
+	}
+} -start
+
+delay 1
+
+client c1 {
+	txreq
+	rxresp
+	expect resp.status == 200
+} -run



More information about the varnish-commit mailing list