Page MenuHomePhabricator

provide haproxy silent-drop support for port 80 as well
Closed, ResolvedPublic

Description

Given the issues spotted while debugging T339898 haproxy would benefit from porting the silent-drop approach used on port 443 for port 80 as well

Event Timeline

Vgutierrez triaged this task as Medium priority.Jul 3 2023, 1:02 PM

Just as reminder:

As agreed with @Vgutierrez we decided to split the current haproxy acls/other actions per frontend in hieradata, eg.:

profile::cache::haproxy::acls:
  tls:
    - name: 'too_many_concurrent_queries'
      criterion: 'sc0_trackers(httpreqrate)'
      operator: 'ge'
      value: '2000'
      [...]
  http:
    - name: 'too_much_recent_concurrency'
      # Add hysteresis.
      criterion: 'sc0_gpc0_rate(httpreqrate)'
      operator: 'gt'
      value: '0'
      [...]

This will require templates and hiera files modifications and extensive tests.

Change 935095 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] haproxy: support different actions for tls and http frontend

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

Change 935095 merged by Fabfur:

[operations/puppet@production] haproxy: support different actions for tls and http frontend

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

Change 935760 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] haproxy: support different actions for tls and http frontend

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

Mentioned in SAL (#wikimedia-operations) [2023-07-06T08:17:42Z] <fabfur> disabling puppet temporary on cp1075.eqiad.wmnet, cp2027.codfw.wmnet, cp3050.esams.wmnet to apply 935760 (T340983)

Change 935760 merged by Fabfur:

[operations/puppet@production] haproxy: support different actions for tls and http frontend

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

Change 935988 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] haproxy: fix variable type and better naming

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

Change 935988 merged by Fabfur:

[operations/puppet@production] haproxy: fix variable type and better naming

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

Change 936701 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] hiera: add silent-drop directives for http frontend

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

Change 936701 merged by Fabfur:

[operations/puppet@production] hiera: add silent-drop directives for http frontend

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

Change 938002 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] hiera: apply silent-drop on port 80 to all eqsin cp hosts

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

Change 938002 merged by Fabfur:

[operations/puppet@production] hiera: apply silent-drop on port 80 to all eqsin cp hosts

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

Change 938807 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] hiera: apply silent-drop on port 80 to ulsfo cp hosts

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

Change 938807 merged by Fabfur:

[operations/puppet@production] hiera: apply silent-drop on port 80 to ulsfo cp hosts

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

Mentioned in SAL (#wikimedia-operations) [2023-07-17T09:48:35Z] <fabfur> enabled puppet on A:cp hosts in ulsfo to apply https://gerrit.wikimedia.org/r/c/operations/puppet/+/938807 (T340983) (hosts will run puppet with the usual schedule)

Mentioned in SAL (#wikimedia-operations) [2023-07-17T13:07:16Z] <fabfur> enabled puppet on A:cp-codfw to apply https://gerrit.wikimedia.org/r/c/operations/puppet/+/938840 (T340983) (hosts will run puppet with the usual schedule)

Change 938902 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] hiera: apply silent-drop on port 80 to drmrs cp hosts

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

Change 938902 merged by Fabfur:

[operations/puppet@production] hiera: apply silent-drop on port 80 to drmrs cp hosts

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

Mentioned in SAL (#wikimedia-operations) [2023-07-18T08:17:47Z] <fabfur> enable puppet on A:cp-drmrs for https://gerrit.wikimedia.org/r/c/operations/puppet/+/938902/ (T340983) (hosts will run puppet with the usual schedule)

Change 939235 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] hiera: apply silent-drop on port 80 to eqiad cp hosts

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

Change 939235 merged by Fabfur:

[operations/puppet@production] hiera: apply silent-drop on port 80 to eqiad cp hosts

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

Mentioned in SAL (#wikimedia-operations) [2023-07-18T08:58:37Z] <fabfur> enable puppet on A:cp-eqiad for https://gerrit.wikimedia.org/r/939235 (T340983) (hosts will run puppet with the usual schedule)

Change 939242 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] hiera: apply silent-drop on port 80 to all cp hosts

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

Change 939242 merged by Fabfur:

[operations/puppet@production] hiera: apply silent-drop on port 80 to all cp hosts

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

Mentioned in SAL (#wikimedia-operations) [2023-07-18T10:02:25Z] <fabfur> enable puppet on A:cp-esams for https://gerrit.wikimedia.org/r/939235 (T340983) (hosts will run puppet with the usual schedule)

Fabfur claimed this task.

The HAProxy configuration on all DCs has been updated to apply silent-drop to abusive clients hitting port 80, as been already done for port 443.

To check (eg. from cumin) if HAProxy is "silent-dropping" connections:

For port 443:
sudo cumin --ignore-exit-codes A:cp 'journalctl -u haproxy --since=-1h | grep silent-drop_for'

For port 80:
sudo cumin --ignore-exit-codes A:cp 'journalctl -u haproxy --since=-1h | grep silent-drop_port80_for'