Commit Graph

412 Commits

Author SHA1 Message Date
Kevin Fenzi
4d82d65a9b haproxy: use datacenter name instead of hostname
The proxies in the new fedora-isolated vlan are in rdu3 and have rdu3
domain in their hostname, but they aren't strictly in the rdu3
datacenter for purposes of access. They do not have acls to directly
talk to backend applications from that vlan.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-12-12 10:51:40 -08:00
Michal Konecny
b0d7dc1892 [haproxy] Fix regex for ipsilon
The env_suffix caused the regex to contain \\ and it didn't redirected
the request correctly.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2025-11-21 12:37:40 +01:00
Michal Konecny
a08cbb190f [ipsilon] Separate openID instance on production
This will apply the changes done for staging on production and
introduces ipsilon03 machine, which will be OpenID only.
2025-11-18 14:27:58 +01:00
Kevin Fenzi
6ad86be1fe Revert "haproxy: switch kojipkgs to use apache backend on 8080"
This reverts commit 19cf971bde.

We want to switch this back now that the tcp_timeout issue is solved.
2025-11-13 10:42:56 -08:00
Kevin Fenzi
7925576c33 haproxy: Also retry oci-registry connections
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-11-08 15:04:18 -08:00
Kevin Fenzi
b66f5a7bf5 haproxy: more cleanups. Drop old pdc fragment, fix geoip-city check to use http/1.1
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-11-03 10:20:27 -08:00
Kevin Fenzi
748c10d41c haproxy: more cleanups and syntax fixes.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-11-03 09:36:19 -08:00
Kevin Fenzi
19cf971bde haproxy: switch kojipkgs to use apache backend on 8080
This avoids the tcp timeout problem totally from what I can tell.

Just switch it for now as we continue to work on the underlying problem.

This does mean that we don't use varnish, but apache is able to
keep up ok so far.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-11-03 08:26:37 -08:00
Kevin Fenzi
7f3289963e haproxy: clean up warnings, drop openqa01
openqa uses apache load balancer now, and doesn't use haproxy at all.
Clean up some things that current haproxy warns about on start.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-11-03 08:26:37 -08:00
Greg Sutcliffe
0a4a78bf9a Zabbix: Add HAProxy monitoring template
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2025-11-03 15:54:57 +00:00
Michal Konecny
ba209ee7df Fixes for OpenID only ipsilon instance in staging
After some troubleshooting I was finally able to fix the OpenID
authentication on staging. These are the changes I ended up deploying to fix
the remaining issues.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2025-11-03 09:33:32 +00:00
Kevin Fenzi
87d350504a haproxy: retry failed connections to pkgs01/src
This seems to be a similar case to the kojipkgs one, where we see from
time to time timeouts from proxies to pkgs01.

If it's a health check, haproxy will mark the backend down.
If it's a user request they will get a timeout and a 503 back.

This will help mitigate the second problem and retry those.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-10-11 01:20:49 +00:00
Kevin Fenzi
46fd68d504 proxies / haproxy: setup some retry for kojipkgs
We are having problems with connections sometimes hanging from proxies
to kojipkgs. Lets try and mitigate that at the haproxy level and
hopefully improve things while we try and figure out what the underlying
cause is.

This should retry connections that failed for any 'retryable' output
(including timeout) and also it should try a _different_ backend than
the one that returned the error. This will not eliminate errors, but
should reduce them.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-10-08 13:39:38 -07:00
Kevin Fenzi
fd53786d35 f43 final freeze
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-10-07 17:55:46 -07:00
Greg Sutcliffe
69645f5da5 HAProxy/Rsyslog: fix logging to the rsyslog UDP port that haproxy expects
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2025-10-07 21:21:02 +00:00
Michal Konecny
3b238ac133 [haproxy] Set permanent cookie for openid
We originally set header value instead of cookie. This will set it up
and do redirect correctly.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2025-10-02 11:28:38 +02:00
Michal Konecny
724cb330d7 [haproxy] Don't check the /openid endpoint
The ipsilon is returning redirect when hitting /openid endpoint. Let's
us just check /.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2025-10-01 14:59:11 +02:00
Michal Konecny
94cf028ed7 [haproxy] Set cookie value for ipsilon openid
To be redirected to openid server during the authentication let's set a
cookie for it and match against that.

This was tested and it's working, but ipsilon is doing something with
the requests and the cookie is gone after redirect.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2025-10-01 12:54:41 +02:00
Michal Konecny
3db583cdfb [haproxy] Use the correct method
req.body_payload is unknown, let's use req.body instead.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2025-10-01 10:18:40 +02:00
Michal Konecny
3df75c98bb [haproxy] Redirect openid based on payload
When checking if the server has openid capabilities we are checking for
openid_identifier, let's redirect that to openid backend as well.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2025-10-01 10:02:12 +02:00
Michal Konecny
aa5e1674c0 [haproxy] Fix the variable name
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2025-10-01 09:05:03 +02:00
Michal Konecny
b24e4e976f [haproxy] Add rule for openidc endpoint
The paths are too similar and /openidc ended up being routed to wrong
ipsilon server, let's add specific rule for OIDC as well.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2025-10-01 08:58:22 +02:00
Michal Konecny
abe254334e [haproxy] Add redirect for openid only ipsilon
Adding redirect to openid ipsilon instance for staging.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2025-10-01 08:30:46 +02:00
Michal Konecny
17d33b34cd [haproxy] Let's use the correct cert for ipa
HAProxy had incorrect IPA certificate for staging. I'm not sure how that
even worked, but the issue was revealed when the IAD2 machines were
removed from cluster.
2025-07-04 16:09:24 +02:00
Adam Williamson
64ffac4caf haproxy: only proxy rabbitmq on rdu3 proxies
Prior to 38d138e this condition existed with 'iad2' instead of
'rdu3'. @abompard took it out entirely, but that was wrong, it
makes the external proxies include this block. We need to put the
condition back with the correct data center name.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2025-07-03 12:05:00 -07:00
Adam Williamson
9da2cfb6f2 haproxy: IPA certs don't depend on data center
The IPA cert doesn't change when we move datacenters, because we
just replicate across. So it shouldn't have the datacenter in the
name. This should fix haproxy deployment (it was broken because
we didn't have an 'rdu3' file).

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2025-07-03 11:55:59 -07:00
Nils Philippsen
6c85fda0c9 Mass remove/replace iad2 -> rdu3, 10.3. -> 10.16.
Signed-off-by: Nils Philippsen <nils@redhat.com>
2025-07-03 20:05:02 +02:00
Kevin Fenzi
b53014c3a4 haproxy / switch pkgs to rdu3
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-07-01 10:59:26 -07:00
James Antill
ea5ca95c57 Change iad2 things to rdu3 for zabbix. Namely haproxy/agent.
Signed-off-by: James Antill <james@and.org>
2025-07-01 13:29:08 -04:00
Francois Andrieu
80f922c6ff replace iad2 ocp-stg certificate with rdu3 2025-06-27 16:49:04 +00:00
Aurélien Bompard
38d138e9e0 Relay RabbitMQ on the proxies in RDU3
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2025-06-27 14:32:48 +02:00
Kevin Fenzi
9ef0759ca2 haproxy: enable src and kojipkgs in rdu3
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-06-26 15:26:10 -07:00
Kevin Fenzi
643aaadb8e openshift / stg / rdu3: add cluster cert and point ocp to it
This will break things in not rdu3, but we are moving staging tomorrow
anyhow. So, just running this on rdu3 staging for now.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-06-25 20:03:08 -07:00
Kevin Fenzi
41dcbe734f haproxy: correct bootstrap hostname
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-06-24 14:40:16 -07:00
Kevin Fenzi
a5e3b32175 haproxy: add stg rdu3 openshift apis
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-06-24 14:36:30 -07:00
Kevin Fenzi
a1a16698ab proxies / openshift / rdu3: just copy the iad2 stg ocp cert for now, will replace with new cert once staging cluster is up
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-06-20 09:57:06 -07:00
Kevin Fenzi
07d410c5d7 haproxy: drop bootstrap node for prod rdu3 openshift
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-06-19 11:16:55 -07:00
Kevin Fenzi
3f726efdbf proxies / rdu3: add service ca to web bundle
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-06-14 15:09:49 -07:00
Kevin Fenzi
6120b860a6 haproxy: also install ocp ca cert in rdu3
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-06-14 13:53:40 -07:00
Kevin Fenzi
43b150af7a haproxy: add prod rdu3 openshift ca
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-06-14 09:36:21 -07:00
Kevin Fenzi
eb3178f55d openshift in prod rdu3: initial cut at setting up control plane
Added host vars for all the control plane vm's and bootstrap node.
Set latest version for downloading and setting things up.
Setup haproxy in rdu3 prod to load balance the ocp api and internal api.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-06-12 14:33:37 -07:00
Michal Konecny
6428f8f772 Sunset github2fedmsg and fedmsg
This commit is removing all the fedmsg related stuff from ansible
repository.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2025-02-13 10:08:51 +00:00
Michal Konecny
2ec055db6f Use first uppercase letter for all handlers
This will unify all the handlers to use first uppercase letter for
ansible-lint to stop complaining.

I went through all `notify:` occurrences and fixed them by running
```
set TEXT "text_to_replace"; set REPLACEMENT "replacement_text"; git grep
-rlz "$TEXT" . | xargs -0 sed -i "s/$TEXT/$REPLACEMENT/g"
```

Then I went through all the changes and removed the ones that wasn't
expected to be changed.

Fixes https://pagure.io/fedora-infrastructure/issue/12391

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2025-02-10 20:31:49 +00:00
Ryan Lerch
47c68f478d ansiblelint fixes - fqcn[action-core] - template to ansible.builtin.template
Replaces references to template: with ansible.builtin.template

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:30:29 +10:00
Ryan Lerch
3c41882bb0 ansiblelint fixes - fqcn[action-core] - shell to ansible.builtin.shell
Replaces references to shell: with ansible.builtin.shell

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:29:10 +10:00
Ryan Lerch
25391e95b7 ansiblelint fixes - fqcn[action-core] - package to ansible.builtin.package
Replaces many references to  package: with ansible.builtin.package

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:28:00 +10:00
Ryan Lerch
462176464b ansiblelint fixes-- fqcn[action-core] - command to ansible.builtin.command
Replaces many references to  command: with ansible.builtin.command

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:26:47 +10:00
Ryan Lerch
6a3816dfdc ansiblelint fixes-- fqcn[action-core] - copy to ansible.builtin.copy
Replaces many references to 'copy' with ansible.builtin.copy

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 10:43:31 +10:00
Ryan Lerch
62952df107 ansiblelint fixes-- fqcn[action-core] - file to ansible.builtin.file
Replaces many references to  file: with ansible.builtin.file

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 10:41:52 +10:00
Ryan Lerch
691adee6ee Fix name[casing] ansible-lint issues
fix 1900 failures of the following case issue:

`name[casing]: All names should start with an uppercase letter.`

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-14 20:20:07 +10:00