Page MenuHomePhabricator

Forward-port maps VCL to Varnish 4
Closed, ResolvedPublic

Description

VCL code needs to be forward-ported to Varnish 4.

https://www.varnish-cache.org/docs/4.0/whats-new/upgrading.html#changes-to-vcl

There is some C code in the VCL too, e.g. for geoip, that may need deeper changes.

Event Timeline

ema raised the priority of this task from to Needs Triage.
ema updated the task description. (Show Details)
ema added projects: SRE, Traffic.
ema added subscribers: ema, Southparkfan, Aklapper and 4 others.

https://github.com/fgsch/varnish3to4 is pretty good. I spent a small amount of time (less than a half hour) at some point running this + manual changes against the upload VCL and I was successful in convincing Varnish 4 to load it. Whether it works without bugs though, I can't say :)

And instead of inline C, we can consider using vmods too.

ema triaged this task as Medium priority.
ema set Security to None.
ema moved this task from Backlog to Traffic team actively servicing on the Traffic board.

Change 269466 had a related patch set uploaded (by Ema):
WIP: Maps VCL forward-porting to Varnish 4

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

With https://gerrit.wikimedia.org/r/#/c/269664/ and https://gerrit.wikimedia.org/r/#/c/269466/ applied the following procedure allows to upgrade a maps box to Varnish 4:

echo deb https://people.wikimedia.org/~ema ./ > /etc/apt/sources.list.d/wikimedia-ema.list
apt-get update
service varnish stop && service varnish-frontend stop
DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes install varnish=4.1.1-1wm1 libvarnishapi1=4.1.1-1wm1 varnish-dbg=4.1.1-1wm1 libvmod-header libvmod-netmapper libvmod-tbf libvmod-vslp
# set varnish_version4: true in hiera for the node you're working on
puppet agent -tv

To switch back to Varnish 3:

service varnish stop && service varnish-frontend stop
apt-get remove -y --purge libvarnishapi1
# unset varnish_version4 in hiera
puppet agent -tv

Change 270392 had a related patch set uploaded (by Ema):
Rename vcl_recv_purge into recv_purge

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

Change 270392 merged by Ema:
Rename vcl_recv_purge into recv_purge

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

Change 269466 had a related patch set uploaded (by Ema):
Maps VCL initial forward-port to Varnish 4

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

Change 272468 had a related patch set uploaded (by Ema):
New WMF version: 4.1.1-1wm2

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

Change 272468 merged by Ema:
New WMF version: 4.1.1-1wm2

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

Change 273490 had a related patch set uploaded (by Ema):
Maps VCL forward-port to Varnish 4

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

Change 273490 abandoned by Ema:
Maps VCL forward-port to Varnish 4

Reason:
Wrong Change-Id doh

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

Mentioned in SAL [2016-03-24T13:29:38Z] <ema> testing vcl v4 merge, puppet disabled on all cache nodes T124279

Change 269466 merged by Ema:
Maps VCL forward-port to Varnish 4

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

Change 279362 had a related patch set uploaded (by Giuseppe Lavagetto):
scap: re-insert mw2173

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

Change 279362 merged by Giuseppe Lavagetto:
scap: re-insert mw2173

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

Mentioned in SAL [2016-03-24T14:17:35Z] <ema> puppet re-enabled on all cache nodes T124279

Change 280404 had a related patch set uploaded (by Ema):
Varnish 4: fix dynamic directors inclusion

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

Change 280404 merged by Ema:
Varnish 4: fix dynamic directors inclusion

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

Change 280409 had a related patch set uploaded (by Ema):
Varnish 4: call init_hashcircle after vslp director definition

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

Change 280409 merged by Ema:
Varnish 4: call init_hashcircle after vslp director definition

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

ema renamed this task from Forward-port VCL to Varnish 4 to Forward-port maps VCL to Varnish 4.Mar 31 2016, 1:45 PM
ema closed this task as Resolved.