Starting with Varnish 5.0, it is possible to [[ https://varnish-cache.org/docs/5.1/users-guide/vcl-separate.html | load multiple VCL files ]] and switch to the desired one from within VCL based on certain conditions (eg: Host header matching vhost-style). We should take advantage of such feature to merge the functionality of our current cache_misc cluster into cache_text.
Steps to complete the transition:
[x] Make puppet deploy misc VCL files on `cache::text` hosts
[x] Add the ability to load multiple VCL files to our custom `reload-vcl` script
[x] Make sure puppet triggers a reload of the additional VCL files upon modification. The reload procedure is a bit different compared to the one used to reload the main VCL program: `vcl.load ; vcl.label` instead of `vcl.load ; vcl.use`
[x] Matching the host header value with the hostnames currently handled by cache_misc (~90 at the time of this writing) should be done in a efficient and possibly clean way. The `set` functionality of [[https://code.uplex.de/uplex-varnish/libvmod-re2/|libvmod-re2]] seems apt, see https://phabricator.wikimedia.org/P7201 for how cache_text VCL might end up looking like if we choose to follow that approach
[x] Add misc `cache::app_directors` and `cache::req_handling` entries to text
[x] Some configuration settings differ between misc and text (eg: `cache::websocket_support` and `cache::app_def_be_opts`). See if/how they can be applied to text
[x] Test by pointing misc services to text IPs (eg: curl --resolve, resolv.conf)
[x] Add misc multicast purge IP, 239.128.0.115 to text's `profile::cache::base::purge_multicasts`
[x] DNS changes (`geoip!misc-addrs` -> `geoip!text-addrs`)
[] Reimage misc hosts as spares
[] Remove misc LVS services
[] Cleanup