Commit 3b4efd06 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

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

parent 46b6b56d
......@@ -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);
......
......@@ -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,
......
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"
......@@ -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
......
......@@ -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 {
......
......@@ -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
......
......@@ -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
......
......@@ -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 {
......
......@@ -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
......
......@@ -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"
......
......@@ -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"
......
......@@ -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
......
......@@ -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 {
......
......@@ -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} {
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment