1
0
Fork 0
forked from infra/ansible
Commit graph

172 commits

Author SHA1 Message Date
869ea27150 Add tar to datanommer
Signed-off-by: Michael Winters <fedora@mwinters.net>
2026-04-06 11:06:14 -05:00
2db3130404 Fix Tpyos and errata
Signed-off-by: Michael Winters <fedora@mwinters.net>
2026-04-02 21:12:54 -05:00
8ac48ade3b Use chronic for datanommer daily export
Signed-off-by: Michael Winters <fedora@mwinters.net>
2026-04-02 23:35:10 +00:00
2a941c4482 Rename retention script per feedback
Signed-off-by: Michael Winters <fedora@mwinters.net>
2026-04-02 23:35:10 +00:00
4fd6c27207 Requested changes
Signed-off-by: Michael Winters <fedora@mwinters.net>
2026-04-02 23:35:10 +00:00
7f493a042a Datanommer daily exports
Export daily 24h data in addition to the full pg_dump to allow
downstream replicas to stay in sync without requiring full PG
replication.

We call this "incremental" in some places because perhaps later we will
decide on a different level of granularity, e.g. hourly or weekly.

Signed-off-by: Michael Winters <fedora@mwinters.net>
2026-04-02 23:35:10 +00:00
James Antill
3e60b00464 postgresql_server: Remove unused config. file templates (-12 and -15).
Signed-off-by: James Antill <james@and.org>
2026-03-30 11:01:18 -04:00
James Antill
eb2d876d0b postgresql_server: Remove postgresql.conf-15, as -16 overwrites it anyway.
Signed-off-by: James Antill <james@and.org>
2026-03-30 10:57:39 -04:00
3f2332452e
Zabbix/Psql: Use same directory perms as zabbix_agent in psql task
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2026-03-23 10:00:41 +00:00
536af76624
Zabbix/Psql: Enable Psql template for all Psql servers
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2026-03-23 09:44:39 +00:00
f03559ad08
Zabbix: apply PGSQL template to db-datanommer02 to test with some real load
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2026-03-20 10:53:55 +00:00
8088e93c33
Zabbix: Deploy PGSQL scripts to /usr instead of /var
Because SELinux won't allow the agent to read /var.
Also fixes a few small things

Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2026-03-16 15:05:51 +00:00
955f1b776a
Zabbix: fix typo in private var name
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2026-03-16 14:05:18 +00:00
54610a8db8
Zabbix: Add upstream PGSQL template and setup code
This uses the upstream template which runs a bunch of SQL to query the
DB via a monitoring user.

Scoped to db01.stg for testing at the moment.

Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2026-03-16 14:03:19 +00:00
8da3e395b2 postgresql: Install mbuffer package
mbuffer is required on db-koji for staging-sync playbook, but
installing it on all DB servers doesn't hurt.
2025-07-04 19:44:32 +02:00
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
cf9d0af59a datanommer02: drop warnings from timescaledb on backups
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-07-03 09:30:11 -07:00
523c8c86bd postgresql: all the postgresql servers (except db-datanommer) are postgresql 16 now
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-07-01 11:27:04 -07:00
30fa665398 postgresql: add a -16 config thats a clone of -15 for now
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-06-26 10:09:46 -07:00
95afa6d4fd postgresql: move staging databases to postgresql 16
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-06-26 08:01:30 -07:00
James Antill
f446135409 Add rdu3 DB names to conditionals in postgresql_server tasks.
Signed-off-by: James Antill <james@and.org>
2025-06-24 18:47:31 +00:00
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
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
bddb4cd703 db-openqa01: on postgresql15 now
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-10-08 15:46:17 -07:00
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
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
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
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
bf5a81829c db01 migrates to rhel9/pgsql-15
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-05-14 15:06:43 -07:00
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
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
373f7a2a83 db-fas: clean up some old logic
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-05-11 10:16:42 -07:00
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
03501a770e db02.stg becomes db01.stg
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-05-01 10:13:06 -07:00
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
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
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
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
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
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
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
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