copr-be-dev: don't try to reach the rabbit server over ssh

... it is down on staging.  So the whole role/messaging/base is broken,
and we can not depend on it:

TASK [rabbit/user : Create the user in RabbitMQ] ***********************
Tuesday 11 August 2020  05:37:34 +0000 (0:00:00.121)       0:05:22.244 *
Tuesday 11 August 2020  05:37:34 +0000 (0:00:00.121)       0:05:22.243 *
[WARNING]: Unhandled error in Python interpreter discovery for host
rabbitmq01.stg.iad2.fedoraproject.org: Failed to connect to the host via
ssh: ssh: connect to host rabbitmq01.stg.iad2.fedoraproject.org port 22:
Connection timed out
fatal: [copr-be-dev.aws.fedoraproject.org]: UNREACHABLE! => {"changed":
false, "msg": "Data could not be sent to remote host
\"rabbitmq01.stg.iad2.fedoraproject.org\". Make sure this host can be
reached over ssh: ssh: connect to host rab
bitmq01.stg.iad2.fedoraproject.org port 22: Connection timed out\r\n",
"unreachable": true}

So there's now a new toggle named "copr_messaging", turned on only for
production copr instance.
This commit is contained in:
Pavel Raiskup 2020-08-11 07:59:55 +02:00
parent 53c7c8cdf9
commit 600280665c
4 changed files with 7 additions and 1 deletions

View file

@ -2,6 +2,8 @@
devel: false
datacenter: aws
copr_messaging: true
_forward_src: "forward"
# don't forget to update ip in ./copr-keygen, due to custom firewall rules

View file

@ -1,6 +1,8 @@
---
devel: true
copr_messaging: false
datacenter: aws
_forward_src: "forward_dev"

View file

@ -55,3 +55,4 @@
- copr/backend
- nagios_client
- role: messaging/base
when: copr_messaging

View file

@ -230,6 +230,7 @@
- name: create messaging config directory
file: dest=/etc/copr/msgbuses state=directory owner=copr group=copr mode=0700
when: copr_messaging
tags:
- config
@ -237,7 +238,7 @@
template: src="fedora-messaging.conf.j2"
dest=/etc/copr/msgbuses/fedora-messaging.conf
owner=copr group=copr mode=0600
when: not devel
when: copr_messaging
notify:
- restart copr-backend
tags: