Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
0f7baca4
Commit
0f7baca4
authored
Mar 05, 2018
by
Dridi Boukelmoune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable deprecated persistent storage by default
parent
6515f17e
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
76 additions
and
10 deletions
+76
-10
autogen.des
autogen.des
+1
-0
Makefile.am
bin/varnishd/Makefile.am
+8
-4
cache_main.c
bin/varnishd/cache/cache_main.c
+2
-0
mgt_stevedore.c
bin/varnishd/storage/mgt_stevedore.c
+4
-0
a00009.vtc
bin/varnishtest/tests/a00009.vtc
+7
-4
p00000.vtc
bin/varnishtest/tests/p00000.vtc
+2
-0
p00002.vtc
bin/varnishtest/tests/p00002.vtc
+2
-0
p00003.vtc
bin/varnishtest/tests/p00003.vtc
+2
-0
p00004.vtc
bin/varnishtest/tests/p00004.vtc
+2
-0
p00005.vtc
bin/varnishtest/tests/p00005.vtc
+2
-0
p00006.vtc
bin/varnishtest/tests/p00006.vtc
+2
-0
p00007.vtc
bin/varnishtest/tests/p00007.vtc
+2
-0
p00008.vtc
bin/varnishtest/tests/p00008.vtc
+2
-0
p00009.vtc
bin/varnishtest/tests/p00009.vtc
+2
-0
r00915.vtc
bin/varnishtest/tests/r00915.vtc
+2
-0
r00962.vtc
bin/varnishtest/tests/r00962.vtc
+2
-0
r01225.vtc
bin/varnishtest/tests/r01225.vtc
+2
-0
r01266.vtc
bin/varnishtest/tests/r01266.vtc
+2
-0
vtc.c
bin/varnishtest/vtc.c
+11
-1
configure.ac
configure.ac
+15
-0
persistent.rst
doc/sphinx/phk/persistent.rst
+2
-1
No files found.
autogen.des
View file @
0f7baca4
...
...
@@ -36,4 +36,5 @@ $SRCDIR/configure \
--enable-developer-warnings
\
--enable-debugging-symbols
\
--enable-dependency-tracking
\
--with-persistent-storage
\
"
$@
"
bin/varnishd/Makefile.am
View file @
0f7baca4
...
...
@@ -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
...
...
bin/varnishd/cache/cache_main.c
View file @
0f7baca4
...
...
@@ -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
();
...
...
bin/varnishd/storage/mgt_stevedore.c
View file @
0f7baca4
...
...
@@ -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
},
...
...
bin/varnishtest/tests/a00009.vtc
View file @
0f7baca4
...
...
@@ -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 ''
}
bin/varnishtest/tests/p00000.vtc
View file @
0f7baca4
varnishtest "Test Basic persistence"
feature persistent_storage
server s1 {
rxreq
txresp
...
...
bin/varnishtest/tests/p00002.vtc
View file @
0f7baca4
varnishtest "Ban a persistent object"
feature persistent_storage
shell "rm -f ${tmpdir}/_.per[12]"
server s1 {
...
...
bin/varnishtest/tests/p00003.vtc
View file @
0f7baca4
varnishtest "Ban a persistent object"
feature persistent_storage
shell "rm -f ${tmpdir}/_.per"
server s1 {
...
...
bin/varnishtest/tests/p00004.vtc
View file @
0f7baca4
varnishtest "Check object references"
feature persistent_storage
shell "rm -f ${tmpdir}/_.per"
server s1 {
...
...
bin/varnishtest/tests/p00005.vtc
View file @
0f7baca4
varnishtest "Check expiry of non-instantiated object"
feature persistent_storage
shell "rm -f ${tmpdir}/_.per"
server s1 {
...
...
bin/varnishtest/tests/p00006.vtc
View file @
0f7baca4
varnishtest "Check that Vary headers are stored"
feature persistent_storage
shell "rm -f ${tmpdir}/_.per"
server s1 {
...
...
bin/varnishtest/tests/p00007.vtc
View file @
0f7baca4
varnishtest "test reload of object spanning incomplete segment"
feature persistent_storage
barrier b1 cond 2
barrier b2 cond 2
...
...
bin/varnishtest/tests/p00008.vtc
View file @
0f7baca4
varnishtest "Ban list sync across silos"
feature persistent_storage
shell "rm -f ${tmpdir}/_.per[12]"
# Silo 1 & 2
...
...
bin/varnishtest/tests/p00009.vtc
View file @
0f7baca4
varnishtest "Check that reloaded bans with completed flag are really completed on restart"
feature persistent_storage
shell "rm -f ${tmpdir}/_.per[12]"
server s1 {
...
...
bin/varnishtest/tests/r00915.vtc
View file @
0f7baca4
varnishtest "error object allocation with persistent"
feature persistent_storage
server s1 {
rxreq
txresp
...
...
bin/varnishtest/tests/r00962.vtc
View file @
0f7baca4
varnishtest "Test address remapping"
feature persistent_storage
feature disable_aslr
# VM-remapping is too random on OSX
...
...
bin/varnishtest/tests/r01225.vtc
View file @
0f7baca4
varnishtest "Test bans_req counter on persistent reload - #1225"
feature persistent_storage
shell "rm -f ${tmpdir}/_.per"
server s1 {
...
...
bin/varnishtest/tests/r01266.vtc
View file @
0f7baca4
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"
...
...
bin/varnishtest/vtc.c
View file @
0f7baca4
...
...
@@ -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
;
...
...
configure.ac
View file @
0f7baca4
...
...
@@ -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],
...
...
doc/sphinx/phk/persistent.rst
View file @
0f7baca4
...
...
@@ -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:
------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment