- First commit to issue fork.
- π«π·France goz
This is still the case for 8.x-2.x, but patch does not apply
- @goz opened merge request.
- π¬π§United Kingdom zach.bimson
Love the power of the community! 6 years we are in :D
- πΊπΈUnited States jerrac
Just ran into a need for this again. But #21 won't apply.
Could not apply patch! Skipping. The error was: Cannot apply patch https://git.drupalcode.org/project/varnish_purge/-/merge_requests/11.patch In Patches.php line 331: Cannot apply patch Multiple Varnish Server IPs (https://git.drupalcode.org/p roject/varnish_purge/-/merge_requests/11.patch)!
This is with explicitly setting varnish_purge to version ^2.x-dev in composer.json and using cweagans/composer-patches to apply the patch.
I initially tried with 2.1 and 2.2, not dev.
I also pulled up the patch dialog in PHPStorm and it said it can't apply a hunk.
Don't have time right now to dig in deeper. Hope this helps.
- π«π·France just_like_good_vibes PARIS
if you use the patch derived from the MR 11 of @goz β , it should be fine.
use this URL for the patch :
https://git.drupalcode.org/project/varnish_purge/-/merge_requests/11.patch
I have started testing this patch on the last version 2.2 and it seems to works fine.
- πΊπΈUnited States jerrac
Er, I'm 99% sure that's the url I used when I was trying to patch.
That said, long story, but I ended up switching to the http purger built into Purge and was able to make it work. Just added a purger per instance of varnish.
For me, using https://git.drupalcode.org/project/varnish_purge/-/merge_requests/11.patch introduces a bug.
It fails to correctly send ban requests, queue is not decreasing, varnish cache is never cleared. I have the following error in the cron logs :Drupal\purge\Plugin\Purge\Purger\Exception\BadPluginBehaviorException : Only NOT_SUPPORTED, PROCESSING, SUCCEEDED and FAILED are valid outbound states. dans Drupal\purge\Plugin\Purge\Invalidation\InvalidationBase->setStateContext() (ligne 144 de /var/www/ppd/xxxxxxxxx/web/modules/contrib/purge/src/Plugin/Purge/Invalidation/InvalidationBase.php).
And I don't even have 2 hosts in my purger config.
- π«π·France O'Briat Nantes
If your Varnish servers are load balanced, it should easier to add a specific rules to your load balancer (filtered on drupal IP + PURGE/BAN method) so it send the request to both all Varnish instances.
So you just need to set the inbound LB IP.