Commit graph

151 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Kevin Fenzi
28a290f2bf db-riscv-koji01: use newer postgres here
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-12-09 16:27:29 -08:00
89f6f1fc32 Fix majority of remaining yamllint warnings and errors
Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2024-11-28 17:31:45 +10:00
Kevin Fenzi
bddb4cd703 db-openqa01: on postgresql15 now
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-10-08 15:46:17 -07:00
Kevin Fenzi
1cab62674b koji / manual / staging sync: fixes from recent sync
* The password was being set to the prod one
* The allowed ip in the database was the phx2 one. ;(
* The sequences were too low, prod already passed those, so increase
  them.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-10-03 10:03:52 -07:00
Kevin Fenzi
617d2d164d postgres / db-datanommer: use lock-wrapper for backups
It seems sometimes now db-datanommer is taking more than 24hours to
backup, and currently that means it starts another one while the
previous one is running. Thats no good for anyone, so lets put in a lock
wrapper to avoid that.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-09-19 08:22:19 -07:00
Jiri Podivin
f513e7cbcd Linting python scripts
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
2024-09-18 19:57:29 +00:00
Kevin Fenzi
abee63c966 postgresql_server: adjust backups for db-datanommer02
Currently backups are taking 17-18 hours with 4 threads.
Now that we have 16 cpus defined there, lets bump that up to 8 and see
if that lowers things much. If not we can look at moving to another
compression, but the database is very large so lots of compression is
good to save disk space.

Also filter out another output of the backup job that causes cron
emails.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-05-20 10:28:04 -07:00
Kevin Fenzi
31c4c11b8c db-datanommer: adjust playbook to handle new setup with normal rpm for timescaledb
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-05-14 15:19:30 -07:00
Kevin Fenzi
bf5a81829c db01 migrates to rhel9/pgsql-15
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-05-14 15:06:43 -07:00
Kevin Fenzi
8438fc5894 postgresql_server: adjust for new db-fas01 being rhel9/pgsql15
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-05-14 13:25:10 -07:00
Kevin Fenzi
7b6af55aa6 db-datanommer02.stg: use pgsql 15 here too
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-05-11 11:55:26 -07:00
Kevin Fenzi
373f7a2a83 db-fas: clean up some old logic
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-05-11 10:16:42 -07:00
Kevin Fenzi
997b22f9a4 postgresql / datanommer: adjust things to not (yet) apply to new rhel9 datanommer hosts
We want to wait until we have a timescaledb extension for rhel9 before
applying that to these hosts.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-05-09 16:30:23 -07:00
Kevin Fenzi
03501a770e db02.stg becomes db01.stg
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-05-01 10:13:06 -07:00
Kevin Fenzi
4b27b2774f postgresql_server: enable auto_explain and set to 30s
This will log an explain for any query that takes more than 30s.
We likely will need to lower it to get the slow heavy queries that are
hitting koji's db.

This does require a restart, but after this we can change the min
duration with just a reload. If there are too many logs, we can set this
to -1 to never log.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-01-27 13:14:41 -08:00
Kevin Fenzi
b0117bb64e db-koji01: crank settings to 10.5
bump up various stats to try and handle load better.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-12-16 09:15:01 -08:00
Kevin Fenzi
48a207abc1 db-koji01: Some adjustments to avoid any outages
Using the 'fix outage' clause in freeze here. ;)

Basically adjust db-koji01 to use more memory and avoid
saturating i/o. With these settings, page loads look faster
and i/o is not saturated. We should try adding more cpus and such,
but that will require a reboot, so avoiding for now.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-08-26 10:46:03 -07:00
Kevin Fenzi
eb3801edc7 postgresql_server: split out postgres15 config and tweak
db-koji01 is our only postgresql 15 install so far, but split out the
config from the 12 one we are using on RHEL8 to avoid making changes
there.

Also, lets try tweaking things:
- I am bumping cpus up to 88
- Tweak max workers/etc
- Try a higher i/o level since this db server is running on a virthost
  with ssds.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-06-02 17:59:12 -07:00
Kevin Fenzi
2367f1f8ba Revert "postgresql / db-koji: re-add this connection cleanup"
This reverts commit 9a4a973b05.

Turns out this is broken and hasn't worked for a long time. ;(
2023-06-02 10:16:05 -07:00
Kevin Fenzi
9a4a973b05 postgresql / db-koji: re-add this connection cleanup
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-06-02 10:03:24 -07:00
Kevin Fenzi
567a69dd58 db-koji01: try not using this long running script anymore
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-06-01 15:15:52 -07:00
Kevin Fenzi
718a84c645 db-koji01: move to rhel9 and postgresql 15
Set host vars to move to rhel9 on next reinstall and setup postgresql 15
module.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-06-01 10:36:52 -07:00
Kevin Fenzi
6030f92f4a db-datanommer: some more backups adjustments
First we need to pipe stderr into the grep to filter out the timescaledb
warnings. So, |& does that.

Then, there's no reason to backup the staging database. Disable that.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-04-01 11:23:01 -07:00
Kevin Fenzi
87671c627b db-datanommer02: supress warnings from pg_dump
db-datanommer02 uses timescaledb. When you do a pg_dump there's warnings
due to this, but according to upstream they are all completely harmless.
So, to avoid an email to everyone every day, lets just try and supress
these, but yet hopefully not supress real errors if they every occur.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-03-31 12:24:33 -07:00
Michal Konečný
ae6c2b6508 [postgresql_server] Grant datanommer_ro access to datanommer2 db
The datanommer_ro user was created in the task, but never got privilege to read
from datanommer2 db. This commit is fixing that.

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
2023-03-31 08:25:58 +00:00
Adam Williamson
e6746d768b postgresql_server: update for modern Fedora
Looks like this role hasn't been used on a Fedora box for a
while so things are kinda broken. Re-arrange all the package
install sections to be together, use newer package names on
Fedora (the Fedora and EL >= 8 sections are identical for now
but I figured I'd keep them separate in case that changes), and
use the newer config file, not the older one, on Fedora.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-06-07 15:40:56 -07:00
Kevin Fenzi
73b0029f20 postgresql server: double work_mem
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-02-10 13:06:59 -08:00
Aurélien Bompard
78da9de518
Also setup timescaledb on db-datanommer01 in staging
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2021-11-17 11:23:27 +01:00
Kevin Fenzi
79e99af9ce postgresql_server: Do not run the timescaledb setup on all the staging db servers.
We only want to run this on db-datanommer02, not that and all the other
staging postgresql servers. :)

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-09-30 15:49:33 -07:00
Aurélien Bompard
530d4672de
Syntax fix
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2021-09-17 10:47:06 +02:00
Aurélien Bompard
bd3a1b3912
Datanommer: enable the timescaledb extension on the DB
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2021-09-17 10:45:52 +02:00
Aurélien Bompard
4b4f1b99d8
datanommer: create the database and users
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2021-09-17 10:26:00 +02:00
Aurélien Bompard
4cf50fdad2
datanommer02: deploy timescaledb
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2021-09-17 09:55:32 +02:00
Aurélien Bompard
73f19b84e3
Use import instead of include
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2021-08-10 10:54:18 +02:00
Aurélien Bompard
76d3ead677
Deploy TimescaleDB on staging datanommer DB
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2021-08-10 10:37:24 +02:00
Kevin Fenzi
c1d0206256 postgresql: up connection limit to 2000
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-07-31 09:04:21 -07:00
Kevin Fenzi
e25775ed59 postgresql: fix db-fas01.stg breakage from playbook runs
In prod db-fas01 is rhel7 and uses postgresql 9.6.
In staging db-fas01.stg is rhel8, and should also use postgresql 9.6,
but we were blanket making rhel8 hosts use postgresql 12.
We could drop this by reinstalling db-fas01.stg with rhel7, or waiting
until we finally kill fas2 and just setting them both to use postgresql
12.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-07-26 13:53:56 -07:00
Kevin Fenzi
2379b465ab postgres / server / koji sessions script: remove
Turns out copy module doesn't actually have a 'absent' state.
So, just remove this (we no longer need it as there's a timer on koji
hub that does this from there).

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-08-26 13:50:33 -07:00
Kevin Fenzi
72424c52fb postgresql / db-koji01: allow adjusting max_workers and friends
db-koji01 has been running with this since before the mass rebuild, and
it seems to make it have a higher load, but process faster and without
stalling when doing backups or when long/bad koji-gc queries for old
versions of texlive hit it.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-08-05 16:28:08 -07:00
Kevin Fenzi
310a64c713 postgresql / db-koji: adjust postgresl some more
Turns out we were not setting effective_cache_size even tho it was set
for some servers (pagure). Adjust a few parameters on db-koji to try and
get some more performance out of it.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-07-22 16:23:33 -07:00
Kevin Fenzi
e2b5c6a42c postgresql_server: check for existance of vars
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-06-22 15:16:27 -07:00
Kevin Fenzi
8530a1c075 postgresql_server: new shiny template .conf file for postgresql 12
I took the default postgresql.conf from postgresql 12 and then added in
various changes we already manually made and variable substitions we
already had setup back in the postgresq 9.2 days.

This will apply to db-koji01, db-qa01, db-datanommer01 at least.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-06-22 15:08:23 -07:00
Kevin Fenzi
d92ff41412 postgresql: do NOT put a recovery.conf file on db-koji01 anymore
In phx2 we had a warm standby database host (db-koji02), but we no
longer have that host in iad2, so we shouldn't try and make db-koji01
handle that. Also, this was just changed mistakenly as it's the warm
standby host that should get the recovery.conf file.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-06-21 09:20:12 -07:00