[master] 3b4efd0 Rename -spersistent to make it clear that it is deprecated.

Poul-Henning Kamp phk at FreeBSD.org
Tue May 27 00:22:50 CEST 2014


commit 3b4efd06d2a687c3a32e561cf5ec0b64f3e8cd30
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon May 26 22:22:27 2014 +0000

    Rename -spersistent to make it clear that it is deprecated.

diff --git a/bin/varnishd/storage/stevedore_mgt.c b/bin/varnishd/storage/stevedore_mgt.c
index 53bfb07..7a38171 100644
--- a/bin/varnishd/storage/stevedore_mgt.c
+++ b/bin/varnishd/storage/stevedore_mgt.c
@@ -74,17 +74,44 @@ struct cli_proto cli_stv[] = {
 	    0, 0, "", stv_cli_list },
 	{ NULL}
 };
+
+/*--------------------------------------------------------------------
+ */
+
+static void
+smp_fake_init(struct stevedore *parent, int ac, char * const *av)
+{
+
+	(void)parent;
+	(void)ac;
+	(void)av;
+	ARGV_ERR(
+	    "-spersistent has been deprecated, please see:\n"
+	    "  https://www.varnish-cache.org/docs/trunk/phk/persistent.html\n"
+	    "for details.\n"
+	);
+}
+
+
+static const struct stevedore smp_fake_stevedore = {
+	.magic = STEVEDORE_MAGIC,
+	.name = "deprecated_persistent",
+	.init = smp_fake_init,
+};
+
+
 /*--------------------------------------------------------------------
  * Parse a stevedore argument on the form:
  *	[ name '=' ] strategy [ ',' arg ] *
  */
 
 static const struct choice STV_choice[] = {
-	{ "file",	&smf_stevedore },
-	{ "malloc",	&sma_stevedore },
-	{ "persistent",	&smp_stevedore },
+	{ "file",			&smf_stevedore },
+	{ "malloc",			&sma_stevedore },
+	{ "deprecated_persistent",	&smp_stevedore },
+	{ "persistent",			&smp_fake_stevedore },
 #ifdef HAVE_LIBUMEM
-	{ "umem",	&smu_stevedore },
+	{ "umem",			&smu_stevedore },
 #endif
 	{ NULL,		NULL }
 };
@@ -133,9 +160,6 @@ STV_Config(const char *spec)
 
 	*stv = *stv2;
 	AN(stv->name);
-	AN(stv->alloc);
-	if (stv->allocobj == NULL)
-		stv->allocobj = stv_default_allocobj;
 
 	if (p == NULL)
 		bprintf(stv->ident, "s%u", seq++);
@@ -158,6 +182,10 @@ STV_Config(const char *spec)
 	else if (ac != 0)
 		ARGV_ERR("(-s%s) too many arguments\n", stv->name);
 
+	AN(stv->alloc);
+	if (stv->allocobj == NULL)
+		stv->allocobj = stv_default_allocobj;
+
 	if (!strcmp(stv->ident, TRANSIENT_STORAGE)) {
 		stv->transient = 1;
 		AZ(stv_transient);
diff --git a/bin/varnishd/storage/storage_persistent.c b/bin/varnishd/storage/storage_persistent.c
index d7506f0..6633799 100644
--- a/bin/varnishd/storage/storage_persistent.c
+++ b/bin/varnishd/storage/storage_persistent.c
@@ -588,7 +588,7 @@ smp_free(struct storage *st)
 
 const struct stevedore smp_stevedore = {
 	.magic	=	STEVEDORE_MAGIC,
-	.name	=	"persistent",
+	.name	=	"deprecated_persistent",
 	.init	=	smp_mgt_init,
 	.open	=	smp_open,
 	.close	=	smp_close,
diff --git a/bin/varnishtest/tests/a00009.vtc b/bin/varnishtest/tests/a00009.vtc
index 34a56f0..73021ba 100644
--- a/bin/varnishtest/tests/a00009.vtc
+++ b/bin/varnishtest/tests/a00009.vtc
@@ -1,5 +1,6 @@
-varnishtest "Code coverage of VCL compiler and RSTdump"
+varnishtest "Code coverage of VCL compiler and RSTdump etc"
 
 shell "${varnishd} -b 127.0.0.1:80 -C -n ${tmpdir} > /dev/null 2>&1"
 shell "${varnishd} -x dumprstparam > /dev/null 2>&1"
 shell "${varnishd} -x dumprstvsl > /dev/null 2>&1"
+shell "! ${varnishd} -spersistent > /dev/null 2>&1"
diff --git a/bin/varnishtest/tests/p00000.vtc b/bin/varnishtest/tests/p00000.vtc
index ab59ccf..eb9d29d 100644
--- a/bin/varnishtest/tests/p00000.vtc
+++ b/bin/varnishtest/tests/p00000.vtc
@@ -9,7 +9,7 @@ shell "rm -f ${tmpdir}/_.per"
 
 varnish v1 \
 	-arg "-pfeature=+wait_silo" \
-	-arg "-spersistent,${tmpdir}/_.per,10m" \
+	-arg "-sdeprecated_persistent,${tmpdir}/_.per,10m" \
 	-vcl+backend { } -start
 
 varnish v1 -stop
diff --git a/bin/varnishtest/tests/p00002.vtc b/bin/varnishtest/tests/p00002.vtc
index 1e04ebc..e60c8a6 100644
--- a/bin/varnishtest/tests/p00002.vtc
+++ b/bin/varnishtest/tests/p00002.vtc
@@ -10,8 +10,8 @@ server s1 {
 varnish v1 \
 	-arg "-pfeature=+wait_silo" \
 	-arg "-pban_lurker_sleep=0" \
-	-arg "-spersistent,${tmpdir}/_.per1,10m" \
-	-arg "-spersistent,${tmpdir}/_.per2,10m" \
+	-arg "-sdeprecated_persistent,${tmpdir}/_.per1,10m" \
+	-arg "-sdeprecated_persistent,${tmpdir}/_.per2,10m" \
 	-vcl+backend { } -start
 
 client c1 {
diff --git a/bin/varnishtest/tests/p00003.vtc b/bin/varnishtest/tests/p00003.vtc
index 0e8eec7..98984df 100644
--- a/bin/varnishtest/tests/p00003.vtc
+++ b/bin/varnishtest/tests/p00003.vtc
@@ -9,7 +9,7 @@ server s1 {
 
 varnish v1 \
 	-arg "-pfeature=+wait_silo" \
-	-arg "-spersistent,${tmpdir}/_.per,10m" \
+	-arg "-sdeprecated_persistent,${tmpdir}/_.per,10m" \
 	-arg "-pban_lurker_sleep=0" \
 	-vcl+backend { } -start
 
diff --git a/bin/varnishtest/tests/p00004.vtc b/bin/varnishtest/tests/p00004.vtc
index c3aea98..a908913 100644
--- a/bin/varnishtest/tests/p00004.vtc
+++ b/bin/varnishtest/tests/p00004.vtc
@@ -11,7 +11,7 @@ server s1 {
 
 varnish v1 \
 	-arg "-pfeature=+wait_silo" \
-	-arg "-spersistent,${tmpdir}/_.per,10m" \
+	-arg "-sdeprecated_persistent,${tmpdir}/_.per,10m" \
 	-arg "-pban_lurker_sleep=0" \
 	-vcl+backend { } -start
 
diff --git a/bin/varnishtest/tests/p00005.vtc b/bin/varnishtest/tests/p00005.vtc
index 1ac8e08..55bc6c9 100644
--- a/bin/varnishtest/tests/p00005.vtc
+++ b/bin/varnishtest/tests/p00005.vtc
@@ -8,7 +8,7 @@ server s1 {
 } -start
 
 varnish v1 \
-	-arg "-spersistent,${tmpdir}/_.per,10m" \
+	-arg "-sdeprecated_persistent,${tmpdir}/_.per,10m" \
 	-arg "-pban_lurker_sleep=0" \
 	-arg "-pshortlived=0" \
 	-vcl+backend {
diff --git a/bin/varnishtest/tests/p00006.vtc b/bin/varnishtest/tests/p00006.vtc
index 96f4d17..fb5fcca 100644
--- a/bin/varnishtest/tests/p00006.vtc
+++ b/bin/varnishtest/tests/p00006.vtc
@@ -11,7 +11,7 @@ server s1 {
 
 
 varnish v1 \
-	-arg "-spersistent,${tmpdir}/_.per,10m" \
+	-arg "-sdeprecated_persistent,${tmpdir}/_.per,10m" \
 	-arg "-pban_lurker_sleep=0" \
 	-vcl+backend { } -start
 
diff --git a/bin/varnishtest/tests/p00007.vtc b/bin/varnishtest/tests/p00007.vtc
index 5fd9e9e..1daf4e5 100644
--- a/bin/varnishtest/tests/p00007.vtc
+++ b/bin/varnishtest/tests/p00007.vtc
@@ -24,7 +24,7 @@ server s1 {
 	txresp -bodylen 48
 } -start
 
-varnish v1 -arg "-spersistent,${tmpdir}/_.per,10m" \
+varnish v1 -arg "-sdeprecated_persistent,${tmpdir}/_.per,10m" \
 	-vcl+backend {} -start
 
 varnish v1 -cliok "debug.fragfetch 32"
diff --git a/bin/varnishtest/tests/p00008.vtc b/bin/varnishtest/tests/p00008.vtc
index b839a0c..c7a144d 100644
--- a/bin/varnishtest/tests/p00008.vtc
+++ b/bin/varnishtest/tests/p00008.vtc
@@ -16,8 +16,8 @@ server s1 {
 varnish v1 \
 	-arg "-pfeature=+wait_silo" \
 	-arg "-pban_lurker_sleep=0" \
-	-arg "-sper1=persistent,${tmpdir}/_.per1,10m" \
-	-arg "-sper2=persistent,${tmpdir}/_.per2,10m" \
+	-arg "-sper1=deprecated_persistent,${tmpdir}/_.per1,10m" \
+	-arg "-sper2=deprecated_persistent,${tmpdir}/_.per2,10m" \
 	-vcl+backend {
 		sub vcl_backend_response {
 			set beresp.storage_hint = "per1";
@@ -45,7 +45,7 @@ server s1 -wait
 varnish v2 \
 	-arg "-pfeature=+wait_silo" \
 	-arg "-pban_lurker_sleep=0" \
-	-arg "-spersistent,${tmpdir}/_.per1,10m" \
+	-arg "-sdeprecated_persistent,${tmpdir}/_.per1,10m" \
 	-vcl+backend { } -start
 varnish v2 -cliok "ban obj.http.x-foo == foo"
 varnish v2 -cliok "ban.list"
@@ -56,8 +56,8 @@ varnish v2 -stop
 varnish v3 \
 	-arg "-pfeature=+wait_silo" \
 	-arg "-pban_lurker_sleep=0" \
-	-arg "-spersistent,${tmpdir}/_.per1,10m" \
-	-arg "-spersistent,${tmpdir}/_.per2,10m" \
+	-arg "-sdeprecated_persistent,${tmpdir}/_.per1,10m" \
+	-arg "-sdeprecated_persistent,${tmpdir}/_.per2,10m" \
 	-vcl+backend { } -start
 varnish v3 -cliok "ban.list"
 varnish v3 -stop
@@ -72,7 +72,7 @@ server s1 {
 varnish v4 \
 	-arg "-pfeature=+wait_silo" \
 	-arg "-pban_lurker_sleep=0" \
-	-arg "-spersistent,${tmpdir}/_.per2,10m" \
+	-arg "-sdeprecated_persistent,${tmpdir}/_.per2,10m" \
 	-vcl+backend { } -start
 client c1 -connect ${v4_sock} {
 	txreq -url "/silo2"
diff --git a/bin/varnishtest/tests/p00009.vtc b/bin/varnishtest/tests/p00009.vtc
index 66b1e2f..6ec15d4 100644
--- a/bin/varnishtest/tests/p00009.vtc
+++ b/bin/varnishtest/tests/p00009.vtc
@@ -14,8 +14,8 @@ server s1 {
 varnish v1 \
 	-arg "-pfeature=+wait_silo" \
 	-arg "-pban_lurker_sleep=0" \
-	-arg "-sper1=persistent,${tmpdir}/_.per1,10m" \
-	-arg "-sper2=persistent,${tmpdir}/_.per2,10m" \
+	-arg "-sper1=deprecated_persistent,${tmpdir}/_.per1,10m" \
+	-arg "-sper2=deprecated_persistent,${tmpdir}/_.per2,10m" \
 	-vcl+backend {
 	}
 varnish v1 -start
diff --git a/bin/varnishtest/tests/r00915.vtc b/bin/varnishtest/tests/r00915.vtc
index 607d6db..3e1528c 100644
--- a/bin/varnishtest/tests/r00915.vtc
+++ b/bin/varnishtest/tests/r00915.vtc
@@ -9,7 +9,7 @@ shell "rm -f ${tmpdir}/_.per"
 
 varnish v1 \
 	-arg "-pfeature=+wait_silo" \
-	-arg "-spersistent,${tmpdir}/_.per,10m" \
+	-arg "-sdeprecated_persistent,${tmpdir}/_.per,10m" \
 	-vcl+backend {
 
 	sub vcl_backend_response {
diff --git a/bin/varnishtest/tests/r00962.vtc b/bin/varnishtest/tests/r00962.vtc
index 9cae4cf..6d750cb 100644
--- a/bin/varnishtest/tests/r00962.vtc
+++ b/bin/varnishtest/tests/r00962.vtc
@@ -12,8 +12,8 @@ shell "rm -f ${tmpdir}/_.per?"
 
 varnish v1 \
 	-arg "-pfeature=+wait_silo" \
-	-arg "-spersistent,${tmpdir}/_.per1,10m" \
-	-arg "-spersistent,${tmpdir}/_.per2,10m" \
+	-arg "-sdeprecated_persistent,${tmpdir}/_.per1,10m" \
+	-arg "-sdeprecated_persistent,${tmpdir}/_.per2,10m" \
 	-vcl+backend {
 	sub vcl_backend_response {
 		set beresp.storage = "s0";
@@ -44,8 +44,8 @@ server s1 {
 
 varnish v2 \
 	-arg "-pfeature=+wait_silo" \
-	-arg "-spersistent,${tmpdir}/_.per2,10m" \
-	-arg "-spersistent,${tmpdir}/_.per1,10m" \
+	-arg "-sdeprecated_persistent,${tmpdir}/_.per2,10m" \
+	-arg "-sdeprecated_persistent,${tmpdir}/_.per1,10m" \
 	-vcl+backend { } -start
 
 client c1 -connect ${v2_sock} {
diff --git a/bin/varnishtest/tests/r01225.vtc b/bin/varnishtest/tests/r01225.vtc
index 23d0253..85cc418 100644
--- a/bin/varnishtest/tests/r01225.vtc
+++ b/bin/varnishtest/tests/r01225.vtc
@@ -10,7 +10,7 @@ server s1 {
 
 varnish v1 \
 	-arg "-pfeature=+wait_silo" \
-	-arg "-spersistent,${tmpdir}/_.per,10m" \
+	-arg "-sdeprecated_persistent,${tmpdir}/_.per,10m" \
 	-arg "-pban_lurker_sleep=0.01" \
 	-vcl+backend { } -start
 
diff --git a/bin/varnishtest/tests/r01266.vtc b/bin/varnishtest/tests/r01266.vtc
index 76352c3..bf4bf42 100644
--- a/bin/varnishtest/tests/r01266.vtc
+++ b/bin/varnishtest/tests/r01266.vtc
@@ -12,7 +12,7 @@ server s1 {
 varnish v1 \
 	-arg "-pfeature=+wait_silo" \
 	-arg "-pban_lurker_sleep=0.01" \
-	-arg "-sper1=persistent,${tmpdir}/_.per1,10m" \
+	-arg "-sper1=deprecated_persistent,${tmpdir}/_.per1,10m" \
 	-vcl+backend {
 	}
 varnish v1 -start



More information about the varnish-commit mailing list