Commit 0f7baca4 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

Disable deprecated persistent storage by default

parent 6515f17e
......@@ -36,4 +36,5 @@ $SRCDIR/configure \
--enable-developer-warnings \
--enable-debugging-symbols \
--enable-dependency-tracking \
--with-persistent-storage \
"$@"
......@@ -91,15 +91,11 @@ varnishd_SOURCES = \
mgt/mgt_vcl.c \
proxy/cache_proxy_proto.c \
storage/mgt_stevedore.c \
storage/mgt_storage_persistent.c \
storage/stevedore.c \
storage/stevedore_utils.c \
storage/storage_file.c \
storage/storage_lru.c \
storage/storage_malloc.c \
storage/storage_persistent.c \
storage/storage_persistent_silo.c \
storage/storage_persistent_subr.c \
storage/storage_simple.c \
storage/storage_umem.c \
waiter/cache_waiter.c \
......@@ -109,6 +105,14 @@ varnishd_SOURCES = \
waiter/cache_waiter_ports.c \
waiter/mgt_waiter.c
if WITH_PERSISTENT_STORAGE
varnishd_SOURCES += \
storage/mgt_storage_persistent.c \
storage/storage_persistent.c \
storage/storage_persistent_silo.c \
storage/storage_persistent_subr.c
endif
nodist_varnishd_SOURCES = \
builtin_vcl.c
......
......@@ -360,9 +360,11 @@ child_main(int sigmagic, size_t altstksz)
CLI_AddFuncs(debug_cmds);
#if WITH_PERSISTENT_STORAGE
/* Wait for persistent storage to load if asked to */
if (FEATURE(FEATURE_WAIT_SILO))
SMP_Ready();
#endif
CLI_Run();
......
......@@ -92,6 +92,7 @@ static struct cli_proto cli_stv[] = {
/*--------------------------------------------------------------------
*/
#ifdef WITH_PERSISTENT_STORAGE
static void v_matchproto_(storage_init_f)
smp_fake_init(struct stevedore *parent, int ac, char * const *av)
{
......@@ -111,6 +112,7 @@ static const struct stevedore smp_fake_stevedore = {
.name = "deprecated_persistent",
.init = smp_fake_init,
};
#endif
/*--------------------------------------------------------------------
* Parse a stevedore argument on the form:
......@@ -120,8 +122,10 @@ static const struct stevedore smp_fake_stevedore = {
static const struct choice STV_choice[] = {
{ "file", &smf_stevedore },
{ "malloc", &sma_stevedore },
#ifdef WITH_PERSISTENT_STORAGE
{ "deprecated_persistent", &smp_stevedore },
{ "persistent", &smp_fake_stevedore },
#endif
#if defined(HAVE_LIBUMEM)
{ "umem", &smu_stevedore },
{ "default", &smu_stevedore },
......
......@@ -23,10 +23,6 @@ shell "varnishd -x vsl > ${tmpdir}/_.vsl"
shell "varnishd -x cli > ${tmpdir}/_.cli"
shell "varnishd -x builtin > ${tmpdir}/_.builtin"
shell -err -expect {-spersistent has been deprecated} {
varnishd -spersistent -f ''
}
shell -err -expect {-C needs either -b <backend> or -f <vcl_file>} {
varnishd -C
}
......@@ -50,3 +46,10 @@ shell -err -expect {-d makes no sense with -C} "varnishd -C -b 127.0.0.1:80 -d "
shell -err -expect {-F makes no sense with -C} "varnishd -C -b 127.0.0.1:80 -F "
shell -err -expect {Neither -b nor -f given} { varnishd -n ${tmpdir}/v0 }
# This check is kept last because it may be skipped
feature persistent_storage
shell -err -expect {-spersistent has been deprecated} {
varnishd -spersistent -f ''
}
varnishtest "Test Basic persistence"
feature persistent_storage
server s1 {
rxreq
txresp
......
varnishtest "Ban a persistent object"
feature persistent_storage
shell "rm -f ${tmpdir}/_.per[12]"
server s1 {
......
varnishtest "Ban a persistent object"
feature persistent_storage
shell "rm -f ${tmpdir}/_.per"
server s1 {
......
varnishtest "Check object references"
feature persistent_storage
shell "rm -f ${tmpdir}/_.per"
server s1 {
......
varnishtest "Check expiry of non-instantiated object"
feature persistent_storage
shell "rm -f ${tmpdir}/_.per"
server s1 {
......
varnishtest "Check that Vary headers are stored"
feature persistent_storage
shell "rm -f ${tmpdir}/_.per"
server s1 {
......
varnishtest "test reload of object spanning incomplete segment"
feature persistent_storage
barrier b1 cond 2
barrier b2 cond 2
......
varnishtest "Ban list sync across silos"
feature persistent_storage
shell "rm -f ${tmpdir}/_.per[12]"
# Silo 1 & 2
......
varnishtest "Check that reloaded bans with completed flag are really completed on restart"
feature persistent_storage
shell "rm -f ${tmpdir}/_.per[12]"
server s1 {
......
varnishtest "error object allocation with persistent"
feature persistent_storage
server s1 {
rxreq
txresp
......
varnishtest "Test address remapping"
feature persistent_storage
feature disable_aslr
# VM-remapping is too random on OSX
......
varnishtest "Test bans_req counter on persistent reload - #1225"
feature persistent_storage
shell "rm -f ${tmpdir}/_.per"
server s1 {
......
varnishtest "#1266 - Check persisted truncated completed bans"
feature persistent_storage
# Test that bans which has been completed, truncated and persisted works
shell "rm -f ${tmpdir}/_.per1"
......
......@@ -714,13 +714,22 @@ cmd_delay(CMD_ARGS)
* Do not fail the test if a string of the form ${...} is not
* recognized as a macro.
* term
* Support for ADM3A terminal
* Support for ADM3A terminal
*
* persistent_storage
* Varnish was built with the deprecated persistent storage.
*
* Be careful with ignore_unknown_macro, because it may cause a test with a
* misspelled macro to fail silently. You should only need it if you must
* run a test with strings of the form "${...}".
*/
#if WITH_PERSISTENT_STORAGE
static const unsigned with_persistent_storage = 1;
#else
static const unsigned with_persistent_storage = 0;
#endif
static int
test_term(struct vtclog *vl)
{
......@@ -787,6 +796,7 @@ cmd_feature(CMD_ARGS)
FEATURE("user_vcache", getpwnam("vcache") != NULL);
FEATURE("group_varnish", getgrnam("varnish") != NULL);
FEATURE("term", test_term(vl));
FEATURE("persistent_storage", with_persistent_storage);
if (!strcmp(*av, "disable_aslr")) {
good = 1;
......
......@@ -372,6 +372,21 @@ else
ac_cv_func_port_create=no
fi
# --with-persistent-storage
AC_ARG_WITH(persistent-storage,
AS_HELP_STRING([--with-persistent-storage],
[use deprecated persistent storage (default is NO)]),
[],
[with_persistent_storage=no])
if test "$with_persistent_storage" = yes; then
AC_DEFINE([WITH_PERSISTENT_STORAGE], [1],
[Define to 1 to build the deprecated peristent storage.])
fi
AM_CONDITIONAL([WITH_PERSISTENT_STORAGE],
[test "$with_persistent_storage" = yes])
AM_MISSING_HAS_RUN
AC_CHECK_DECL([SO_ACCEPTFILTER],
......
......@@ -5,7 +5,8 @@ A persistent message
====================
This message is about -spersistent and why you should not use it,
even though it is still present in Varnish 4.x.
even though it is still present in Varnish 4.x. Starting with Varnish
6 it is only present when explicitly enabled at compile time.
TL;DR:
------
......
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