Mark Bergsma has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/73145


Change subject: Detect and exit when persistent storage can't mmap a file at 
the required address.
......................................................................

Detect and exit when persistent storage can't mmap a file at the required 
address.

Change-Id: If7e9218b815a53160b4be197e155df1912fe20ac
---
A debian/patches/0010-varnishd-persistent-mmap-exit.patch
M debian/patches/series
2 files changed, 18 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/varnish 
refs/changes/45/73145/1

diff --git a/debian/patches/0010-varnishd-persistent-mmap-exit.patch 
b/debian/patches/0010-varnishd-persistent-mmap-exit.patch
new file mode 100644
index 0000000..0e6f03e
--- /dev/null
+++ b/debian/patches/0010-varnishd-persistent-mmap-exit.patch
@@ -0,0 +1,17 @@
+diff --git a/bin/varnishd/storage_persistent_mgt.c 
b/bin/varnishd/storage_persistent_mgt.c
+index ff10973..549ced3 100644
+--- a/bin/varnishd/storage_persistent_mgt.c
++++ b/bin/varnishd/storage_persistent_mgt.c
+@@ -175,6 +175,12 @@ smp_mgt_init(struct stevedore *parent, int ac, char * 
const *av)
+               ARGV_ERR("(-spersistent) failed to mmap (%s)\n",
+                   strerror(errno));
+ 
++      if (target != NULL && sc->base != target) {
++              fprintf(stderr, "Could not mmap SILO (%s) at target %u, was 
mapped at %u instead\n",
++                      sc->filename, target, sc->base);
++              exit(75); /* EX_TEMPFAIL */
++      }
++
+       smp_def_sign(sc, &sc->idn, 0, 0, "SILO");
+       sc->ident = SIGN_DATA(&sc->idn);
+ 
diff --git a/debian/patches/series b/debian/patches/series
index d9b8b42..acd125c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,6 +6,7 @@
 0010-varnishd-nukelru.patch
 0010-varnishd-persistent-seg-load-race.patch
 0010-varnishd-vcl_error-allow-keepalive.patch
+0010-varnishd-persistent-mmap-exit.patch
 0010-libvmod_std-collect.patch
 0010-varnishtest-rxbytes.patch
 0020-filter-headers.patch

-- 
To view, visit https://gerrit.wikimedia.org/r/73145
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If7e9218b815a53160b4be197e155df1912fe20ac
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/varnish
Gerrit-Branch: testing/3.0.3plus-rc1
Gerrit-Owner: Mark Bergsma <m...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to