Commit graph

190 commits

Author SHA1 Message Date
Matěj Grabovský
a0d4beab0d retrace: Explicitly add opsys release; improve error handling
- Explicitly register supported CentOS and Fedora releases using
  `faf releaseadd`.
- Ignore "errors" of the "already defined" kind.
2022-02-23 13:04:16 +01:00
Matěj Grabovský
500ed7e0cd retrace: Skip source arch when cleaning up 2022-02-23 13:03:55 +01:00
Matěj Grabovský
54ff2d749d retrace: Fix Fedora repo assignment again
Use the correct variable to loop over this time.
2021-09-16 20:25:09 +00:00
Matěj Grabovský
763612db97 retrace: Fix Fedora repo assignment
* Fix type error (`rs_internal_fedora_vers` is a list of numbers).
* Assign across all supported architectures.
2021-09-14 15:23:06 +02:00
Matěj Grabovský
372f845509 default: Set list to empty instead of None
The `eol_opsys` variable should be set explicitly to the empty list
rather than the implicitly `None` otherwise it causes problems down
the line.
2021-09-13 14:24:26 +00:00
Matěj Grabovský
7a65a7fb82 retrace: Move repo-related tasks to separate file 2021-09-10 15:35:41 +02:00
Matěj Grabovský
48a74d76ad retrace: Parameterise over CentOS versions
Allow for Retrace Server to support multiple versions of CentOS via
the `rs_internal_centos_vers` variable.
2021-09-10 15:35:41 +02:00
Matěj Grabovský
14917002b2 retrace: Simplify template syntax
Remove unnecessary juggling with the `eol_opsys` structure.
2021-09-10 15:35:41 +02:00
Matěj Grabovský
1e5443118e retrace: Drop i386 from list of architectures 2021-09-10 15:35:02 +02:00
Matěj Grabovský
b00a8bc10b retrace: Add /metrics endpoint
Update httpd config to reflect the upstream addition of the /metrics
endpoint for Prometheus stats.
2021-09-09 22:42:04 +00:00
Matěj Grabovský
997508c26c retrace: Ignore errors in FAF packages cleanup
Ignore errors when cleaning up packages after removed releases -- the
releases might already be gone when cleanup-packages is run.

See also 9f64d9661 and c2ed129aa.
2021-06-21 11:52:25 +00:00
Matěj Grabovský
923368d85c retrace: Fix cron job definitions
* Fix line folding syntax. The previous version caused vertical
  whitespace to be included in the output which broke the crontab.
* Rename clean up job so that it doesn't contain any variables.
  Including variables in a name makes it difficult to remove or change
  the job when the variable changes.
* Code style consistency.
2021-06-18 16:03:53 +00:00
Matěj Grabovský
afd82d8a50 retrace: Drop GID modification for now
The management of groups is opaque to me right now and it seems
modifying the GID in this case might be useless or even harmful
so let's drop it for now.
2021-06-17 17:29:32 +00:00
Matěj Grabovský
ac751e42ef retrace: Remove gid setting
`retrace` group is ensured above, gid is set below. We don't need to
duplicate code here.
2021-06-14 11:30:35 +02:00
Matěj Grabovský
cadbae81e1 abrt: Improve retrace user modification flow
We need to stop and restart the httpd service when modifying the retrace
user, otherwise we get errors like "user retrace is currently used by
process <PID>".

Also, factor out some magic values into role variables.
2021-06-10 15:03:44 +00:00
Matěj Grabovský
556a3b39a4 abrt: Update retrace-server role from upstream
* podman: Improve pipeline for getting max subuid
2021-06-10 15:03:44 +00:00
Matěj Grabovský
0505e365da retrace: Use variables for list of Fedora versions 2021-06-08 14:44:16 +02:00
Matěj Grabovský
6b57d23220 retrace: Fix faf db backup job
The job was broken before because the backup directory
(`/srv/faf/db-backup`) might not have existed.

Also, factor out some magic values into variables.
2021-06-08 14:44:16 +02:00
Matěj Grabovský
2ce5a4b91b retrace: Drop devel variable in favour of env
`env` seems to be the prevailing method of specifying production vs.
staging environments across groups and hosts.
2021-06-08 14:44:15 +02:00
Matěj Grabovský
4cfe740fc6 retrace: Improve code style
* Capitalise task names.
* Wrap shell commands in quotes.
* Use folded strings where appropriate.
* Wrap tasks with the same condition in a block.
2021-06-08 14:43:54 +02:00
Matěj Grabovský
9f64d96615 retrace: Manage FAF repositories on staging as well
* Drop the `not devel` flag on FAF repository management tasks.
* Ignore errors when deleting repositories -- they might be gone already
  when repodel is run.
2021-06-08 14:43:54 +02:00
Matěj Grabovský
b708714444 abrt: Fix become directive
`become` only accepts, not the user name which belongs in `become_user`.
2021-06-01 10:36:23 +02:00
Matěj Grabovský
ed06aae6ab abrt: Update list of releases for faf and retrace-server 2021-05-31 08:03:27 +00:00
Matěj Grabovský
8f308ed0d9 abrt: Do not modify retrace home perms 2021-05-31 08:03:27 +00:00
Matěj Grabovský
f0cdefabf5 abrt: Improve code style
* Add names to tasks.
* Split arguments over lines.
2021-05-31 08:03:27 +00:00
Matěj Grabovský
89f150cd8c abrt: Bring roles up to date with upstream 2021-05-31 08:03:27 +00:00
Kevin Fenzi
4fbfe6de26 retrace: oops, its home
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-03-18 12:30:52 -07:00
Kevin Fenzi
ab618af4de retrace: see if moving the homedir setting fixes issues
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-03-18 12:21:50 -07:00
Michal Fabik
c96ab97549 abrt: Update list of Fedora versions for retrace-server 2021-03-02 19:25:54 +00:00
Matěj Grabovský
db96e95ded abrt: Update list of Fedora versions for retrace-server 2021-01-14 14:36:26 +01:00
Matěj Grabovský
3d0eb2f6db abrt: Move retrace user home out of system volume
Change retrace user's home directory to /srv/retrace/home.
2021-01-14 14:36:26 +01:00
Matěj Grabovský
bb53148eed abrt: Add job to clean up unused Podman data 2021-01-14 14:36:25 +01:00
Miroslav Suchý
1326be797a retrace: use podman for retracing
this is submitted to upstream as well
2020-10-14 21:02:00 +02:00
Miroslav Suchý
5d2a203949 retrace: remove remains of f30 2020-09-22 21:02:26 +02:00
Miroslav Suchý
9493e96aa5 retrace: add f33 2020-09-22 21:02:26 +02:00
Miroslav Suchý
f9b3be2676 retrace: run this on prod too 2020-09-22 19:09:54 +02:00
Miroslav Suchý
f752bbdf33 retrace: fix name of task 2020-09-21 23:30:59 +02:00
Miroslav Suchý
d1fe25a12a retrace: type yum->dnf 2020-09-21 17:04:42 +02:00
Miroslav Suchý
c2ed129aa6 retrace: ignore errors here 2020-09-17 20:39:08 +02:00
Miroslav Suchý
ef3dc87414 retrace: do not check letsencrypt when letsencrypt is not defined 2020-09-17 14:41:51 +02:00
Miroslav Suchý
5740d0c62e retrace: typo in variable name
addressing:
TASK [abrt/retrace : Get last subuid entry] *****************************************************************************
Monday 30 March 2020  07:15:43 +0000 (0:00:00.831)       0:05:45.873 **********
fatal: [retrace-stg.aws.fedoraproject.org]: FAILED! => {"msg": "The conditional check '\"retrace\" not in retrace_subgid.stdout' failed. The error was: error while evaluating conditional (\"retrace\" not in retrace_subgid.stdout): Unable to look up a name or access an attribute in template string ({% if \"retrace\" not in retrace_subgid.stdout %} True {% else %} False {% endif %}).\nMake sure your variable name does not contain invalid characters like '-': argument of type 'AnsibleUndefined' is not iterable\n\nThe error appears to be in '/srv/web/infra/ansible/roles/abrt/retrace/tasks/podman.yml': line 23, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n- block:\n  - name: Get last subuid entry\n    ^ here\n"}
2020-04-24 21:34:28 +02:00
Miroslav Suchý
5ed5fb081d retrace: cherry pick upstream a3db712 2020-04-24 21:34:28 +02:00
Miroslav Suchý
1936dcfd09 retrace: define defaults 2020-04-24 21:34:28 +02:00
Miroslav Suchý
77ef17aad8 retrace: rebase to latest upstream roles 2020-04-24 21:34:28 +02:00
Miroslav Suchý
37b0794bac retrace: add url for faf 2020-04-24 21:34:28 +02:00
Miroslav Suchý
e77a035915 retrace: add env suffix 2020-04-24 21:34:28 +02:00
Miroslav Suchý
018a4f1b82 retrace: add env suffix
https://pagure.io/fedora-infrastructure/issue/8780

addressing:
TASK [abrt/faf-pre : install certs for fedora-messaging] ****************************************************************
Wednesday 25 March 2020  16:47:16 +0000 (0:00:00.799)       0:05:10.000 *******
changed: [retrace-stg.aws.fedoraproject.org] => (item={u'dest': u'ca.crt', u'src': u'/srv/private/ansible/files/rabbitmq/staging/pki/ca.crt', u'mode': 420, u'owner': u'faf'})
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: If you are using a module and expect the file to exist on the remote, see the remote_src option
failed: [retrace-stg.aws.fedoraproject.org] (item={u'dest': u'faf.key', u'src': u'/srv/private/ansible/files/rabbitmq/staging/pki/private/faf.key', u'mode': u'600', u'owner': u'faf'}) => {"ansible_loop_var": "item", "changed": false, "item": {"dest": "faf.key", "mode": "600", "owner": "faf", "src": "/srv/private/ansible/files/rabbitmq/staging/pki/private/faf.key"}, "msg": "Could not find or access '/srv/private/ansible/files/rabbitmq/staging/pki/private/faf.key' on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option"}
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: If you are using a module and expect the file to exist on the remote, see the remote_src option
failed: [retrace-stg.aws.fedoraproject.org] (item={u'dest': u'faf.crt', u'src': u'/srv/private/ansible/files/rabbitmq/staging/pki/issued/faf.crt', u'mode': 420, u'owner': u'faf'}) => {"ansible_loop_var": "item", "changed": false, "item": {"dest": "faf.crt", "mode": 420, "owner": "faf", "src": "/srv/private/ansible/files/rabbitmq/staging/pki/issued/faf.crt"}, "msg": "Could not find or access '/srv/private/ansible/files/rabbitmq/staging/pki/issued/faf.crt' on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option"}
2020-04-24 21:34:28 +02:00
Miroslav Suchý
55ee39ccf3 retrace: use public hostname rather than ip addr
addressing:
curl https://172.30.5.239/settings
curl: (51) SSL: no alternative certificate subject name matches target host name '172.30.5.239'
2020-04-24 21:34:28 +02:00
Miroslav Suchý
cc2f7a5cb3 retrace: add again fedora-messaging configs
this has been added in 4d1bcd1802 but later lost when rebased to latest upstream role
2020-04-24 21:34:28 +02:00
Miroslav Suchý
095e467a8c retrace: this is already defined in faf-web.conf 2020-04-24 21:34:28 +02:00