1
0
Fork 0
forked from infra/ansible
Commit graph

60 commits

Author SHA1 Message Date
9cad3bf76c
Nagios: Drop RabbitMQ checks as Zabbix handles this
This removes (almost) all the Nagios config for Rabbit, including the
templates in the Rabbit role(s).

It leaves the nagios user, because Zabbix is also using it.

It also adds a Matrix-level notification for high queues, above the one
that goes to the UI.

Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2026-03-12 12:30:02 +00:00
72789a919f rabbitmq: switch datacenter out for rdu3
This was useful when we had clusters in iad2 and rdu3, but it didn't
actually quite work then and it definitely doesn't now. :)

Datacenters like 'aws' do not have their own clusters, they use the one
in rdu3. So, just switch it back to hard coding.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-07-17 18:00:47 -07:00
80acc1e431
Replace references to iad2 with the datacenter variable in openshift apps playbooks
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2025-06-27 14:58:12 +02:00
8248acbe1e
RabbitMQ: Drop the zmq.topic exchange, fedmsg has been retired
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2025-06-26 10:58:07 +02:00
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
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
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
fe1c5c0e62
Change the loop variable name to avoid conficts in nested loops
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2024-12-10 09:42:54 +01:00
14d05f0a9e
Missing variable prefix
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2024-12-03 12:02:51 +01:00
1a962c0d71
Missing variable prefix
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2024-12-03 12:01:01 +01:00
b4462755f0
Prefix variables in rabbit/queue
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2024-12-03 11:58:18 +01:00
b37685848f
Prefix sent_topics where appropriate
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2024-12-03 11:39:54 +01:00
d23b6f2d9b
s/user_username/user_name/g
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2024-12-03 11:12:47 +01:00
4a4e7e07cb
[ansible-lint] prefix variable names for rabbit/user role
ansible-lint requires that variables for roles are prefixed with the
name of the role. This commit prefixes the variables for the
rabbit/user role with user_ as required by ansible-lint

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2024-12-03 10:48:45 +01: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
415e73efa1
Enable topic authorization on prod
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2023-07-10 14:26:20 +02:00
4d36f9ed50
Set the sent_topics for openqa
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2023-05-15 15:10:24 +02:00
00478a4f76
better debug
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2023-05-09 11:42:31 +02:00
1163aa8e47
Add missing tags
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2023-05-09 11:31:21 +02:00
93eaa5129b
Refactor the rabbit/queue role to include the rabbit/user role
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2023-05-09 11:23:17 +02:00
b57f90327c
Set the max priority for the robosig queue
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2023-05-03 09:26:40 +02:00
c8c4dfe72c
FMN: setup the fmn vhost in rabbitmq
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2022-11-21 10:30:43 +01:00
97eb3ff295
Typo
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2022-07-07 09:12:00 +02:00
d083b291d3
sent_topics can't be a list, it has to be a single regexp
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2022-07-07 09:09:24 +02:00
34eea99c7f
There's no defaults for read_priv
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2022-06-21 11:26:22 +02:00
bea4211790
Add missing tags
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2022-06-21 11:19:52 +02:00
58d703ae27
Limit topics that can be sent to
Only a few apps have topic permissions, if this works well we'll have to
generalize it.

Fixes: #8167

Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2022-06-21 11:16:09 +02:00
dbd763816b rabbitmq cluster / osci queues: adjust so playbook doesn't fail on trying to change queues
The osci queue's have changed since this playbook last completed.
The ttl changed and the routing keys have changed.
The ansible rabbitmq module can't change these things on already created
queues because the api doesn't allow it. This makes this playbook fail
with:

"RabbitMQ RESTAPI doesn't support attribute changes for existing
queues"

So, for now, set the ttl to what it already is, and don't change the
routing keys at all. Hopefully this will get it to complete and osci can
manage at least routing keys themseleves wherever they do that.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-01-28 13:50:56 -08:00
632d4a0273 nagios_server: adjust a bunch more things for iad2.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-06-30 15:39:32 -07:00
d703de535a iad2-move: disable nagios handler for rabbitmq for now until we have a iad2 nagios
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-06-08 07:51:54 -07:00
5351aa704e iad2 move: setup rabbitmq to be ready for moving.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-06-08 07:49:28 -07:00
Stephen Smoogen
f54401aca0 this hack probably breaks things in a way different way 2020-06-06 09:32:53 -04:00
eae8075d65 iad2: generalize rabbit/queue for both datacenters.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-06-03 20:53:12 -07:00
3f9c2e5d53 iad2: adjust rabbit/user defaults for either datacenter
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-06-03 15:13:31 -07:00
9370ffcf7e Add the rabbitmq_cluster tag to the rabbit roles
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2020-04-24 21:34:22 +02:00
c1d04e9783 Add default Nagios alerts for rabbit queues
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2020-04-24 21:34:20 +02:00
05f6dcdc39 rabbit/queue: don't default to subscribing to everything
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2020-04-24 21:34:20 +02:00
be681e40f3 Bind AMQP queues to both amq.topic and zmq.topic
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2020-04-24 21:34:12 +02:00
449b5988d0 Take some precautions against misuse of the rabbit roles
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2020-04-24 21:34:11 +02:00
da1144aa65 rabbit/queue: Fix default value for message_ttl 2020-04-24 21:34:10 +02:00
22dfe009c8 Revert "Fixing the type error"
This reverts commit f44bfd2ac307334500c5c4c5a704c28c2eb74143.
2020-04-24 21:34:10 +02:00
a1ecbc722d Fixing the type error
Signed-off-by: Mohan Boddu <mboddu@bhujji.com>
2020-04-24 21:34:10 +02:00
8b0df497f4 rabbit/queue: Tag all tasks with fedora-messaging tag 2020-04-24 21:34:10 +02:00
3ff6a8502f Koschei: create RabbitMQ queue 2020-04-24 21:34:10 +02:00
6a717f8536 rabbitmq: Switch default server back to 01
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:09 +02:00
c31b3aa14e Trivial change to test the handler
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2020-04-24 21:34:08 +02:00
ac6245ddde Delegate the nagios and nrpe handlers
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2020-04-24 21:34:08 +02:00
309ec254bf Add thresholds on Bodhi's RabbitMQ queues
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2020-04-24 21:34:08 +02:00
359e69f519 rabbit/queue/tasks: allow specifying custom write_queues
When creating a queue, the user is automatically created, but
there is no control over what queues the user can write to. A
user might need to write to queues other than ones prefixed with
their name (e.g. some users need to write to 'ci.*' queues).
This makes it possible to specify additional custom prefixes of
queues the user will be permitted to write to.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-04-24 21:34:07 +02:00