The old key we were using for old releases had some sha1 in it
somewhere, so rhel10 rejects it (great!). So, lets use a newly generated
key that is acceptable to rhel10 and much nicer.
This adds the public key file, the repos that use that file, the rhel10
post kickstart that sets up the repo, robosignatory to sign epel10-infra
stuff with this new key and finally on rhel10 hosts put the new repo in
place.
Note that this only changes the rhel10 setup, all rhel8/9 machines are
still using the old key. We may want to move them over, or just not care
as we retire all of them.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
Adds better protection for the loglevel endpoints and adds control
endpoints to pause/unpause operation immediately.
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
Try another approach to separate the instances. Create a separate redis
instance for quay.io, that should allow to have completely separate
quay.io resources and registry.fp.o resources.
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
This commit updates the `logo` alias to make sure trademark permission
requests are correctly routed to the Fedora Design Team Admins as the
most responsible party for the legal stewardship of the Fedora Project
trademark and brand. Therefore, to encourage use of FAS group membership
to better manage access to these hand-coded email aliases, this will now
send all emails to this alias to FAS account users with membership as
sponsors in the `designteam` FAS group.
Once this change is deployed and updated in production, this mail alias
will begin sending mail to @duffy (no change), @ekidney, @jesschitas,
@jflory7, @madelinepeck (no change), and @mleonova.
Signed-off-by: Justin Wheeler <jwheel@redhat.com>
We never deployed this in the new clusters since we moved and the folks
who were working on it have left. If we want to revive it later, we can
always pull it out of git history.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
Use vcs-diff-lint (with csdiff backend) to report only new warnings and
errors introduced in a PR. This prevents older, pre-existing linter
violations from blocking new changes.
Same analyzer version is used for both the base and the head commit to
ensure consistent results.
See: infra/ansible#3143
When `nftables=True` the base role deploys nftables rules and enables the
nftables service, but never disables the iptables service. On freshly
provisioned hosts the iptables service can be left running from cloud-init,
overwriting nftables rules and silently dropping traffic on ports defined
in `tcp_ports`.
Stop and disable the iptables service explicitly when nftables is the
intended firewall backend.
Today the bastion relayhost didn't work for sign-bridge. So we changed
it to bastion01.rdu3.fedoraproject.org. This worked, so let's reflect
that change in ansible as well.
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
Turns out we were syncing this, but never actually had the categories
set in mirrormanager, so we never got any traffic for it.
These download servers are really close to full, so lets just remove
this for now and see if that gives us some space.
We probibly will need to stop carrying archive or something on these
sooner or later though.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
We have been seeing some 502's on forge also, that might be the same
thing we were seeing with src and koji, so lets try and bypass POSTs
here too.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
The playbook can be run with --tags all,build and it will perform the
ImageStream build and then proceed to deployment.
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
This actually restores some code I deleted in March, because it's needed
for the CentOS sender. It now places that config in /etc/zabbix since
/etc/nrpe.d is going to be removed.
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
The user is already gone in the nagios_client commit, but this alters
the sockets to be group-owned by Zabbix instead of nrpe
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
Note we can drop the nrpe.d block entirely because that dir got removed
in the previous commit.
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
Test is disabled on aarch64 on KDE for being flaky, and is also
a bit flaky on aarch64 on GNOME on F43, so we can't gate on
aarch64 for now. Will maybe re-assess when F43 goes EOL.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
See "BLOCK SCALARS" in
https://env.dev/cheatsheets/yaml-cheat-sheet
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
Also ensure that the fedora-messaging config is updated whenever the tag
is specified.
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
It seems that we doesn't need this as both differ deployments are
processing tasks from both quay.io and registry.fp.o indexer.
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
Remove tests from deployment - they are failing, but on upstream all of
them passing.
Fix the quay.io config - use correct quay.io namespace, delta and icons
uris need to point to registry.fp.o as there isn't any space on quay.io
to store them
Use upstream repository for redis build
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
This is another try to separate the quay.io instance for
flatpak-indexer.
See more info in infra/tickets#11543
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
This reverts commit db0b9e4f0cb505813217d8687118eaf874b04da6.
This is not the correct knob to adjust number of attempts.
This is number of things that have to be successfull before unlock.
1 is right here. ;(
Right now this script outputs the login message from bugzilla:
Last login: Sun Jun 21 04:22:00 UTC 2026
which causes it to email a cron output. This is useless.
Just supress that and still allow for getting other errors.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
ConfigMap and Secret differ nonsensically on the definition of this
keyword.
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
This also means that static-config can be a ConfigMap, rather than a
Secret since it no longer contains any sensitive data.
Also use `stringData` instead of `data` to be explicit about its format.
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
Includes the Koji, Bodhi and Database configuration
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
We have 3 compose builders, but we don't really need all of them I don't
think. The rawhide composes do boot.iso for everything and server
and server dvd here, so 2 builders I think should be fine.
Lets move this one to be a general builder to try and prevent
backlogs.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit updates the assignments for the releng-team@fp.o alias to
use a FAS group membership mail for dynamically updating who receives
email sent to this mail alias. The overall goal is to ensure a trusted
and responsible person receives email sent to this alias, and to use a
FAS group to more dynamically handle membership for who should receive
access to emails sent to this alias.
I noticed this while adjusting other aliases in the file nearby, and saw
that @jnsamyak was not yet a member of the email alias. By using the FAS
group member address, all people in the `releng-team` FAS group will
also receive mail sent to releng-team@fp.o from now on.
FYI: @humaton@kevin@jnsamyak
Signed-off-by: Justin Wheeler <jwheel@redhat.com>
Oops. I just enabled it only for RHEL10 and newer and it should be just
versions lesser than RHEL10.
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
This commit updates the assignments for various Fedora Marketing and
Fedora Ambassadors aliases to send mail to specific leadership roles
(i.e., @jspaleta the Fedora Project Leader, @jflory7 the Fedora
Community Architect, @amoloney the Fedora Operations Architect, and some
specific groups such as the Fedora Council private mailing list, Fedora
Mindshare Committee members, and Fedora Marketing Team.
The overall goal is to ensure an accountable person receives email sent
to some of these aliases, and to use FAS group membership to dynamically
add and remove members from the mail alias in the future.
Signed-off-by: Justin Wheeler <jwheel@redhat.com>
When running the playbook with specific tag it will skip pre_tasks and
some of the vars are missing if that happens. Let's add tags: always to
run it everytime.
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
The repos created through docker push are created as private by default.
This script will run every hour and sets any private repo visibility to
public.
This should be next step to finish
infra/tickets#11543
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
Seems like there are a ton of really small connections and it starts
hitting the limit (although it never logs that it's out, I think because
they free up quickly).
See if this solves the transitory alerts we see.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
If a host has a secondary ipv4 or ipv6 address, only have sshd listen on
the primary ip. This will allow hosts with secondary ips to use ssh port
on secondary ip's for other things.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This pr attempts to move sshd to port 222 on proxy01.stg and
proxy02.stg.
We want to do this (first here and then in prod) because we want to nat
in ssh from external and use haproxy to send that into
forge.fedoraproject.org. If we were using port 22 to connect here
it would conflict with forwarding it on to haproxy.
Note that we still need to actually get networking folks to make the nat
mapping and we still need to add haproxy config to send it into forge in
openshift, but this is the first step we need to get working before we
can do those things.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
There are six global 'fedora' runners in staging forgejo, each with a
different label. This makes it awkward to create workflows as you have to
arbitrarily tie them to a single runner for no very good reason. If we
give them all the 'fedora' label you can just set your workflow to run on
'fedora' and it will run on any available runner.
Also, at least for the quality org, our prod runners have the 'fedora' label,
so if the global staging runners have the same label, we can reuse workflows
between staging and prod.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
- split off the template into a node template and a cluster template
(that only needs to be instanciated on one node)
- add certificate expiration monitoring in the cluster template
This is only on staging for now.
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
See infra/tickets#13422
for details on this. It seems like rabbitmq staging has been
switch to the 'new' CA cert, and the consumers don't actually
read/trust both certs in the combined CA cert file, only the
first (old) one, so they don't trust the new one. This should
deploy and use a new file with only the new CA cert in it. We
copy it out of the private repo for convenience but it's not
actually private, hence the 0644 perms.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
I'm having auth issues on openQA staging, I believe it *may* be
to do with the changes Aurelien made in
6fe8b98de21747dc16d59dcf5096da719a541296 . Let's see if using the
old key and cert helps.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This *should* configure a new queue and consumer for openQA to
report dist-git PR test results back. It's all a bit speculative
ATM, may need some tweaking. Mostly applied only on staging for
now.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
AI caught that I've been cargo-culting a dumb message queue
config around from somewhere or other forever. Non-durable,
exclusive, and auto-delete is just about the worst config for a
queue you want to survive transitory issues like the server or
client going down or whatever. This might actually explain the
occasional issues we have with test results not showing up in
resultsdb, even.
This brings the config in line with most other message queues in
infra.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This reverts commit 0002bf4f26090bbac1260b9b61fe91cae7ba3713. I've
tweaked openQA to always softfail the tests on Rawhide for now, so
we no longer need to special-case the gating.
See https://bugzilla.redhat.com/show_bug.cgi?id=2490607
We have found a bug in FreeIPA replica enrolment with the
OpenSSL 4 update. However, the bug is tricky to fix and the update
is massive and maintaining its side tag is very painful. As a
very exceptional case, we're disabling gating on these tests so
the update can be merged without causing all subsequent updates
to fail gating. We will endeavour to fix the bug and re-enable
normal gating service ASAP.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit updates the `matrixadmin@fp.o` email address alias to now
use the `commops-wg-matrix` sponsor membership for the people who will
automatically receive email to the Matrix admin email. This is one step
to somewhat simplify membership of the email alias to a FAS-backed
mechanism for tracking and updating the sponsors.
Of course, sponsors cannot be updated in Noggin at the moment, so this
requires an IPA FAS admin to update the sponsor list for membership, but
this is an interim step for now.
Additionally, the `cle-managers@fp.o` email alias is added, which
ensures that key members of the CLE Team management will receive comms
to this email address, in the event that a key person from Fedora Infra
is on PTO, unavailable to respond, and to ensure delegation of access in
case of the "lottery factor".
People impacted by this change: @gwmngilfen@jasonbrooks@shaunm@blc@smilner@ancarrol@jbley@mattdm
Signed-off-by: Justin Wheeler <jwheel@redhat.com>
Ansible doesn't detect Deployment changes when dependent files are
modified, so we'll just add a serial we can bump up whenever we need to
force Ansible to re-deploy.
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
Instead of having foo: and foo_stg: variables with ternary() selections
based on environment, take a cue from Koschei and use two variable files
in the role, selected by environment name.
rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
Different versions of OpenShift return different messages when a Secret
already exists in the project. Check for both variants out of an
abundance of caution.
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
Allows the idempotent creation of a bot user with a randomized password.
Administrators can retrieve a keytab for this user without modifying the
password.
Playbook usage:
- role: keytab/botuser
username: "somebot"
kt_location: /etc/keytabs/somebot.keytab
tags:
- config
- krb5
Also accepts `first` and `last` arguments for given and family name, if
desired.
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
Also fix missing variable reference for the main role deployment
playbook.
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
The epel/10 symlink tracks the latest EPEL 10 minor version, which
targets CentOS 10. The epel/10z symlink tracks the EPEL 10 minor
version corresponding to RHEL 10. Since we're using RHEL 10 in the
infrastructure, we need to use epel/10z to ensure compatibility.
Follow up to 1963b068d3.
Signed-off-by: Carl George <carlwgeorge@gmail.com>
This was not specifying a registry, so it was using docker.io.
docker.io restricts pulls a lot, so when restarting often times
it would just get stuck in imagepullbackoff
Just switch to the nice new hummingbird version.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
These directories have 32k entries and when scrapers hit them it causes
kojipkgs to slow to a crawl since it takes minutes to stat all those
files. There is no need to allow indexes here, as ostree doesn't need or
use them, so just disallow it so the scrapers don't nuke kojipkgs.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
Now that ELNBuildSync is being deployed via Ansible, we should keep its
queue setup with the rest of the playbook.
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
This is needed for P09 hypervisors:
RuntimeError: Failed to upload ISO via SCP to /libvirt-images/vmhost_p09_01_prod_11752972_20260609_095937_config on copr@[2620:52:6:1161::10]
There is a too strict validation in `image-builder upload` requiring this value
to not be empty but we don't actually need or use it.
It should be fixed in `image-builder` but that's not something I want to get
blocked by right now.
Recent openQA has a mechanism where it refuses to schedule jobs
if the free space for various dirs (results, asset, archive) is
less than X%, where the default X is 5. We use a very large share
for these things and expand it only on need, so it's usually quite
close to 100% full. Let's try only needing 0.5% to be free.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The previous deployment of Redis has issue with the latest version and
the docker.io is failing on ratelimit. So let's build the redis
deployment from the flatpak-indexer Dockerfile. For details see infra/tickets#13390
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
For infra/tickets#13351
This makes a staging rhel10 vm thats just the same size / place
as pagure-stg01.
It still needs external ip's and nat in from those, but this should be
enough to install it and start setting things up.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
Set the systemd-boot package to build on secure-boot channel and set all
the normal permissions for that that other secure-boot builds have.
Add the systemd-boot cert to pesign config so it can be signed by the
right cert.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
test_models.py is not packaged, so we need to use a modified
patch file with the changes to that file stripped.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
728b6c57a3 inadvertently put the
annotations in the wrong place for bodhi-celery (in spec, not in
metadata).
Signed-off-by: Adam Williamson <awilliam@redhat.com>
See https://github.com/fedora-infra/bodhi/pull/6110 . We want to
be able to gate (only) Fedora ELN kernel updates via gating.yaml
(RemoteRule). However, if we just turned on the RemoteRule policy
for "fedora-eln", suddenly hundreds of existing gating.yamls which
specify "fedora-*" would apply to ELN, which we don't want.
To solve this, we will make Bodhi use "eln" not "fedora-eln" as
the product_version for ELN. That requires us to add "eln" to the
null policies. Let's also enable RemoteRule for "eln" at the same
time. This should not cause any existing policies to apply (unless
there are any which just specify '*', I guess) but will allow us
to add a kernel policy that applies to 'eln'.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Set DEBUG=true for staging OpenShift deployment (both the main
Deployment and the sync CronJob) to enable debug logging.
Remove the entire roles/blockerbugs/ directory which was the old
VM-based deployment (Apache/WSGI). This role has been fully
superseded by roles/openshift-apps/blockerbugs/ and is not
referenced by any playbook.
Assisted-by: Claude Opus 4.6
* nftables: (2 commits)
Cleanup nft merge. Chg osbuildapi and nft_custom_rules to use nft_table_filter.
...
Signed-off-by: James Antill <james@and.org>
We were copying in the req instead of the ca, so this messaging hook has
been broken for a long while. This is the hook that notifys on uploads.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
It seems like the alerts we have been getting have been when proxies are
near the limit rejecting things via anubis, but unable to keep up.
So, lets try and jump this up a bit and see if it solves those
alerts/slowdowns.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This had the hard coded mac address of the previous vm.
We moved to using ansible to just fill in the current mac, so fix that
here too.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
We need to do this anyhow, but this will test to see if the weird alerts
we have been getting persist on f44 with the latest libvirt machine
setup.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This moves all the applications that are using memcached to point to
the 01 (rhel10) versions intead of the 02 (rhel9) ones.
After pushing this, I will roll the changes out in staging and confirm
everything works, then do production. In the event of problems will roll
this back.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
In newer curl, not specifying Host: here means it emits a warning:
Warning: The provided HTTP header 'mirrors.fedoraproject.org' does not look
Warning: like a header?
So, specify Host: for the header so it works on both old curl and new.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
There's no super right answer here, but if we point to a specific minor
release here it means we have to move all machines to it when we change
it, and we have to remember to do so.
If we just use '10' and depend on the link that points to the latest
minor:
lrwxrwxrwx. 1 root root 4 May 19 17:12 /srv/web/repo/rhel/rhel10/10 -> 10.2/
then we don't have to keep changing this all the time, it will just
update when that link changes.
This doesn't leave us an easy way to keep some hosts back to the old
minor, but in practice we pretty much never do this anyhow.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
The index build was failing on xapian_haystack issue that happens when
the mail is too long. This patch will skip those e-mails. See
infra/tickets#13355 for more info.
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
We are no longer using the bkernel role (using the old card thats in
buildhw-x86-01), so this removes that role and mentions of it.
Also, because we are urgently building kernels all the time now,
add one more buildhw-x86 and one more buildhw-a64 to secure-boot channel
so we can build more/faster kernels.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
See infra/tickets#12913
and https://github.com/TecharoHQ/anubis/issues/1624
We are seeing sporadic EOF errors when koji/src/riscv-koji send a 200
reply back through anubis.
Since we just allow POST in anubis anyhow, bypass it entirely for them
to avoid the EOF issue until we can sort it out more.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
Clanker lead me astray here. We can't pass options on the proxypass here
because we are using a balancer, so we need to pass them on the balancer
members.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
I got claude to dig into the things we tried to fix this issue and look
for things we missed. It found a few things:
1. In commit 35a1b3223b Victor Koycheff added some proxyopts for
keepalive, etc. However, unfortunately, while the variable was set
the template wasn't looking at that, so they were never actually
set in the website. ;( So, we fix that by passing the variable in the
right template here.
2. kojihub didn't have a keepalive set on the backend. (but this is
likely cosmetic since the problem is at the proxy layer). We fix
this by adding one anyhow.
3. The pass thru anubis didn't have keepalive set right, so we do
that in the template. This may fix other 502 issues with other
applications also.
Calude used 57,508 tokens looking at all this. ;)
Assisted-By: claude
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
The `image.openshift.io/triggers` annotation was on the pod template metadata
instead of the deployment metadata, so OpenShift's image trigger controller
never detected ImageStream updates for auto-rollout.
Basically, when the MDAPI playbook was re-executed after the repository
`fedora-infra/ansible` was moved from Pagure to Forgejo, we have not had even
a single rollout, even with all the image builds.
Signed-off-by: Akashdeep Dhar <akashdeep.dhar@gmail.com>
This will be used for setting up automatic syncing of ELN builds into
CentOS Stream.
Fixes: infra/tickets#13226
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
Note I live upgrade these systems, so they've actually been on
F43 for months. This is just making the vars reflect reality (and
fixing it so if we do redeploy them, we deploy the right release).
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This adds authentication file for flatpak quay.io bots and also adds
quay.io to `container.destination_registry`.
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
This will update configuration to clean Received header from e-mail
forwarded by smtp-auth-iso01 server to prevent leaking of internal IPs.
See infra/tickets#12835
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
This sets a config option that gets ai-code-review to generate
shorter review text. It skips the MR Summary section and just
posts the Detailed Code Review section.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Since we have moved (almost everything) to deployment, we need to adjust
adjust these rollout commands to use deployment instead.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
We dont have a ticket but the problem was discovered on the @asahi/kernel
project and reported by @jannau. The use-case is
> We use the devel repositories for fedora asahi remix to have a bodhi like
> experience for copr projects
and technically, they enable the repositores on user machines like this:
26cab83/f/asahi-repos.spec (_149-160)
This change will remove routing and configuration for OpenID in Fedora.
Which was originally announced to sunset on 1st May 2026.
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
This acts as the second half of the fix for the 502 Bad Gateway errors
on long-running koji connections.
Fixes#12913
Signed-off-by: Victor Koycheff <victorkoycheff@gmail.com>
This fixes intermittent 502 Bad Gateway errors during long-running
koji connections (like watch-task or watch-logs).
For more details on proxy keepalive and ttl, see:
https://httpd.apache.org/docs/2.4/mod/mod_proxy.htmlFixes#12913
Signed-off-by: Victor Koycheff <victorkoycheff@gmail.com>
We don't want authenticated users being able to self provision projects
in our clusters. We only want that to happen via ansible.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
Add a 6 nvme rhel10 kickstart for aarch64 machines.
Set bvmhost-a64-01.stg to use it's 10G interface for provisioning now.
(I fixed it to allow pxe booting).
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
We don't want to move all packit builds, because it does a lot of
official builds for maintainers. Instead, we want to just move the
scratch builds over to the ci channel.
See: infra/tickets#13069
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
Some email aliases defined in `aliases.static` used a mix of formatting:
some entries separated recipients with ", " (comma-space) while others
used "," (comma only). The inconsistency may cause recipient resolution
failures if the MTA interprets the leading space as part of the alias
name during expansion.
Normalize all alias recipient lists to use comma-only separation,
matching the format already used by the majority of entries in the file
(e.g., `matrixadmin`, `swag-info`). This brings the following aliases
into alignment:
* codeofconduct
* flock-coc
* flock-staff
* legal
* sponsors
If this resolves delivery issues, the root cause was whitespace-
sensitive alias parsing. If not, it at least eliminates one variable and
standardizes the file format for future troubleshooting.
Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Justin Wheeler <jwheel@redhat.com>
This should be pushed tomorrow morning after release at 14utc.
It will tell gnome-software to start offering dist upgrades to users.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
We want to use deployment, and jskladan claims he's already done
the migration:
infra/tickets#12142 (comment)
let's remove deploymentconfig to avoid confusion.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
I can't tell for sure, but I suspect if both deploymentconfig
and deployment are present, deploymentconfig is used, so we need
the vars here as well as deployment.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This is the same file used on primary koji. It disallows robots
instead of just asking them to slow their roll like the default
robots.txt does.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
it's getting spammed by scrapers ATM. This follows the prod Koji
config as best I can: koji is always behind anubis, kojipkgs is
behind anubis on external proxies, not on internal proxies.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
These machines have a /dev/md3 and /dev/md4 that are encrypted, but we
were only binding /dev/md2, so boots would wait for a passphrase.
This binds all of them (they have the same passphrase and can use the
same tang server they just need to be bound to do so)
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
Split the key for production / staging. Drop the keys from hypervisors,
as we don't actually need them there (we copy images from backend ->
hypervisors these days, not from hypervisor to hypervisor).
Relates: https://github.com/fedora-copr/copr/pull/4221
With the decommission of OpenID we no longer need this machine on
staging. Let's get rid of it.
See infra/tickets#13265 for more details.
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
This commit is a first step to decommission OpenID authentication on
staging. It doesn't do much as most of it needs to stay for production.
See infra/tickets#13265 for more info.
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
This worked in staging, so drop the staging conditional and just apply
it in prod too. It should allow websocket connections via the anubis
proxing.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
Re-enable anubis for openqa-lab01 and then try and pass it a proxy
statement to pass websockets correctly via the proxy.
disclaimer: claude pointed me in this direction.
Possible fix for infra/tickets#13252
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This reverts commit 514bb44914.
After the discussion with Copr team; 10 was too small, and was set just
for too long time period (originally it was a work-around for the lab
rdu-cc lab movement event).
This commit changes how the podcast@fp.o email alias is configured.
Instead of a manually-curated list of FAS usernames in this config file,
instead, it will now use the FAS group sponsors of the `podcast` FAS
group. This allows a cleaner way of managing the permissions and not
requiring changes to config management to update the alias.
A FAS account admin will be needed for now to update the group sponsors,
but this can be done interactively or in a ticketed workflow with Fedora
Infrastructure Team.
In practice, this means the people who will now get emails for the
podcast@fp.o list are the current `podcast` group sponsors:
* @itguyeric
* @x3mboy
* @jflory7
* @jasonbrooks
Signed-off-by: Justin Wheeler <jwheel@redhat.com>
We have been moving this around, but decided that just putting it in as
a override for the systemd unit would be the best way to do it.
- Putting it in ansible means you have to run ansible every time you
restart the service for any reason. If it's in systemd it will
automagically get that set on start
- If for some reason the socket doesn't appear/the service doesn't start
right or dies, this will error out.
- adding it in the client is tricky and error prone and not needed
possibly for other installs, only fedora, so dropping it from there is
a win.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This should be reverted whenever it becomes available, but it seems to
have been struck by drones and the replication step fails with:
AWSHTTPSConnection(host='ec2.me-south-1.amazonaws.com', port=443):
Failed to establish a new connection: [Errno 113] No route to host
Signed-off-by: Jeremy Cline <jeremycline@microsoft.com>
Per infra/tickets#13171
we want to disable cron runs for now while repos and other things are
sorted out. We can just revert this after things are ready.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
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>
The acl call wasn't in the right place, it needed to be in the top
section instead of under [sigul] so it was getting ignored.
Once this is working we can remove the acl calls in ansible related to
this.
Also, at the same time grub2 is being signed by 2 certs currently (which
end up being the same one in the end). We want to switch the old
obsolete one over to the new 2025 one.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This restriction is no longer necessary now that s390x builds are
emulated (hopefully temporarily!) on x86_64, where we have 200+
instances available. These limits were blocking many s390x Packit
builds.
The service selector.app needs to match with deployment.selector app. In
this case we have a conflict. This change will fix it.
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
According to what I found the service selector app needs to match the
deployment app, which is pointing to the-new-hotness instead of
the-new-hotness redis. Hopefully this will fix the network issue between
the-new-hotness pod and redis pod.
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
When I made the change back in January in commit 0ba3182601, little did
I realize that I put myself into a world of hurt because my FAS email
does not route mail to my Red Hat email address. This is not acceptable
for Flock planning since I need the emails in Red Hat email.
*mild internal screaming ensues*
So, this fixes the problem and continues to use FAS group membership for
the mail alias, but now my Red Hat email is specifically folded into the
recipient list for the Flock aliases.
CC: @shaunm@jasonbrooks
Signed-off-by: Justin Wheeler <jwheel@redhat.com>
The websites moved to new way of doing things and we don't need the old
fedora websites build anymore. This change will clean the role of the
obsolete files.
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
siguldry pesign_bridge now has a way to set acls on startup.
This switches this to using that method.
it's a lot better because it always will be applied on startup instead
of having to wait for an ansible playbook run.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
If sigul gets stuck on something, signing just fails here causing
the builds to fail. Instead increase the timeout so it can just keep
retrying until someone fixes things.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
Without guardrails, AI tools generate PRs that ignore Fedora Infra's
conventions — wrong file extensions (`.yaml` vs `.yml`), missing
`vars_files` triplets, broken idempotency, relative paths instead of the
required hardcoded `/srv/web/infra/ansible/` layout, and suggestions to
"fix" intentional patterns like the `vars/all/*.yaml` exception or the
`fedora_messaging_callback.py` custom plugin.
AGENTS.md gives AI agents the same context a new human contributor would
get from reading README.md, CONVENTIONS, STYLEGUIDE, and
`.ai_review/project.md` — but in a single file that AI tools
automatically load before generating code. This means AI-assisted PRs
should arrive already following our linting rules, architectural
patterns (OpenShift app vs group playbook), staging/prod conventions
(`_stg` group_vars, `env`/`env_suffix`), and tag discipline.
The file also includes the Fedora AI-Assisted Contribution Policy
requirements, ensuring AI agents prompt contributors to include the
Assisted-by: commit message trailer and respect the project's rules on
accountability, transparency, and human-final review.
The net effect is fewer round-trips in review: maintainers spend less
time explaining the same conventions repeatedly and can focus review on
whether the change is correct, not whether it follows the style guide.
Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Justin Wheeler <jwheel@redhat.com>
This reverts commit cae77fb2a1.
and fixup commit ec25703442. The
debugging worked and we fixed the bug, so we can go back to
using the official container now.
This should 'fix' result reporting in staging resultsdb (and
future prod), see
infra/tickets#12997 and
infra/tickets#13235 .
This probably isn't ultimately the correct fix but it should make
things work for now. The real issue seems to be that the
RevereProxied custom WSGI app wrapper, which we copied around to
various apps back in the day and which attempts to handle the app
being reverse-proxied, doesn't handle all proxied headers and/or
doesn't handle comma-separated list values. The long-term fix is
likely to be using werkzeug's ProxyFix in a wrapper instead, see
infra/tickets#12997 (comment) .
Signed-off-by: Adam Williamson <awilliam@redhat.com>
We're getting 400s when trying to submit results to staging
and an error handler in resultsdb itself is obfuscating all
details. I sent https://github.com/release-engineering/resultsdb/pull/365
to try and fix this, this deploys a build with that patch to
staging.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The error pages were pointing to pagure.io/fedora-infrastructure/issues.
This commit adds patch that changes it to
forge.fedoraproject.org/infra/tickets/issues.
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
When triggering OpenShift build on staging branch we are reaching to
staging proxies. Till now there were allowed only for staging forgejo
instance, but the repository triggering the webhook could be on
production instance as well. Let's add the staging proxies to webhook
allowlist also for production.
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
When we modify the timeline of git, e.g. because of legal reason (removing patented things,
leaked tokens), the current checkout may not point to HEAD.
So before doing git-pull we should reset to current HEAD.
Related: #13194
This adds 2 groups to the gpu servers for shell access.
Only sysadmin-gpu has sudo access, but these users can login/do non root
things.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This relocates the work done via the Zabbix API to create & configure
a host to the base role, such that it is done for *every* host, even the
ones that don't run the agent (such as builders). This covers:
- Creating the host
- Adding the hostgroups
- Creating a set of items/triggers that ping the DNS name
- Creating a set of items/triggers that check the BMC interface (if defined)
The zabbix_agent role then deals with installing the agent and assigning
the agent template, as the rest has already been done in base.
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
pesign needs to map the socket into the chroot/container, but also set
acls to allow the users in the container to use it. We setup a
secureboot group to map these builders and only run this setup on them.
For now buildhw-x86-02 is the only builder we want to enable.
Once we know it's working well we can retire the bkernel role and repave
buildhw-x86-01. buildhw-a64-02 will be added once we fix the aarch64
signing.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
Change the pesign cert here to match the one that the kernel/grub/fwupd
already use in their spec files, this will allow us to switch over
without any changes to those packages.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This just sets it up to display the messages on prod. They are already
implemented on staging.
Resolves: forge/forge#432
Signed-off-by: Ryan Lerch <rlerch@redhat.com>
This commit removes Natalie Pazmiño from the email alias for Fedora
Project swag orders and requests. It adds @shaunm, the CentOS Community
Architect, and sponsors email alias for the Design Team (currently, this
is @duffy, @ekidney, @jesschitas, @jflory7, @madelinepeck, and
@mleonova). This will make it easier to coordinate and provide
authoritative answers on Fedora and CentOS brand guidelines and
requirements with swag vendors and printers.
Signed-off-by: Justin Wheeler <jwheel@redhat.com>
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>
The host_group variable was missing in retrace group, so the postfix
role took standard rdu3 main.cf file instead. Let's define the variable.
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
Few machines were having issues with sending e-mails (retrace03 and
pkgs01). In both cases it was caused by postfix misconfiguration.
* retrace03 - It's RHEL8 machine, so lmdb is unavailable and it also
didn't used vpn to reach bastion
* pkgs01 - It had just bastion as relay name, which wasn't happy to
resolve through DNS, this is using FQDN instead
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
I mistakenly thought there was a GIT_PUSH_MESSAGE option, but there is
not. so removing this from staging.
Signed-off-by: Ryan Lerch <rlerch@redhat.com>
This also relocates the `httpchecks` roles to the right place,
as putting it in it's own role was a bit of hack. Having it in
the proxy role is better.
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
This also removes the Nagios config - it'll be looking in the wrong
place. A Zabbix replacement check will follow in the next commit.
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
Use a log format closer to the "combined" log format on fedorapeople.
This log format includes the referrer and the user agent, it's like
Apache's combined log format plus the virtualhost at the beginning,
like what was used before.
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
Fix the expire date.
Point users to a wiki page to hopefully cut down on begg bounties
Note that we do NOT have a bug bounty program.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
Right now requests go:
client -> httpd on proxy -> anubis -> httpd on proxy -> varnish -> haproxy -> pkgs01
but haproxy is pretty useless in this case.
There is only one backend (pkgs01) so no load balancing, and doing a
liveness check is also pointless because if its down the request will
fail anyhow.
It might be tha haproxy ovehead is causing varnish to return retries
sometimes ( infra/tickets#13123 )
So, this drops it out for this.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
These directories have usually around 32k objects in them.
This means when a client asks for a directory index for them
it takes kojipkgs a few minutes to actually generate it, because it has
to stat every single file in order to show timestamps and sizes.
This means it fills up all slots doing this and the proxies start
getting 503's from it on other requests.
I don't _think_ ostree needs this enabled for any reason.
If it did, it would always have been a problem.
I think it's just some clients/crawlers deciding they want the directory index.
So, lets just deny indexes on directories under there.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
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>
These two maps are generated by a script, so we should adjust that
script to make lmdb if we want to switch them.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This fixes intermittent 502 Bad Gateway errors during long-running
koji connections (like watch-task or watch-logs).
For more details on proxy keepalive and ttl, see:
https://httpd.apache.org/docs/2.4/mod/mod_proxy.htmlFixes#12913
Signed-off-by: Victor Koycheff <victorkoycheff@gmail.com>
In quality/os-autoinst-distri-fedora#483
we added server-boot-iso tests to openQA that are similar to the
everything-boot-iso tests, but they generate and install a Server
netinst image, not an Everything one. That's been running for a
while, so we can gate on it now. We add a new policy because these
tests run on critical-path-server as well as all the ones we run
the everything-boot-iso tests on.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This machine moved from rdu2-cc to rdu3, we missed changing these at the
time.
For copr it should use the external hostname.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
After merging I found out that the handler can't handle blocks. The
workaround is to include tasks from separate file.
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
Missing space in variable for pkgs group ansible config
Revert changes in pagure and pkgs configs to use hash instead of btree
as before
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
This adds AI review for pull requests, using the workflow and
pattern already used by several Quality projects. Pull requests
will be reviewed by
https://gitlab.com/redhat/edge/ci-cd/ai-code-review/ whenever the
'ai-review-please' label is applied to them. Also adds a context
file, generated by claude-4.6-opus-high via Cursor, using the
https://github.com/juanje/context-generator skill, as recommended
by ai-code-review upstream.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Assisted-by: claude-4.6-opus-high
Assisted-by: Cursor-2.6.11
* Fix typos (disgit -> distgit)
* Run with rbac-playbook
* Use correct relative path when run with rbac-playbook
Resolvesepel/releng#85
Signed-off-by: Carl George <carlwgeorge@gmail.com>
This config was not moved over when the host moved from rdu2-cc to
rdu3's iso network. It's needed to allow the submission port to work to
submit emails.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This machine is in the rdu3 isolated network.
For now, just setup a simple kickstart on one disk and a playbook that
does the normal base role things. We can adjust from here.
This machine has 1 nvme and another spinning rust device.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
The mirrors-data.gp script had a hardcoded X-axis end date of
2024-12-31. Since we are now in 2026, gnuplot fails with "all points
y value undefined!" because the new log data points fall completely
outside this strict plotting window.
By removing the end date and using an open-ended range (e.g. ["2007-05-17":]),
gnuplot will automatically scale the X-axis to the latest available data
point in the CSV, preventing this from breaking again in the future.
Fixes: #12833
Signed-off-by: Victor Koycheff <victorkoycheff@gmail.com>
mod_deflate wasn't the issue, as src didn't have gzip enabled. The
backend (pkgs01) uses mod_mime_magic, which sniffs .crate files
and adds false gzip headers. Forcing application/octet-stream
fixes the client double-decompression bug.
Fixes#12812.
Signed-off-by: Victor Koycheff <victorkoycheff@gmail.com>
Fixes#12812.
This disables mod_deflate for the lookaside cache directory to prevent
incorrect 'Content-Encoding: gzip' headers being sent with archives.
Wrapped in a staging block for initial testing as requested.
Signed-off-by: Victor Koycheff <victorkoycheff@gmail.com>
This will ignore CI errors in category ignore-errors in ansible-lint as
this is something we don't need to care about.
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
previously, the yamllint ingores for templates only worked for roles one
level down. Since our openshift apps are nested in the openshift-apps
directory, yamllint was trying to lint jinja templates with a .yml
extension. This updates the yamllint ignores to include templates in
openshift apps roles.
Signed-off-by: Ryan Lerch <rlerch@redhat.com>
Cron jobs run with a stripped-down PATH (usually just /usr/bin:/bin),
causing simple_message_to_bus (which resides in /usr/local/bin) to fail
with "command not found" errors.
This explicitly exports /usr/local/bin to the PATH at the top of the
combineHttpLogs, condense-mirrorlogs, and countme update scripts so
the message bus command executes properly. This also removes the redundant
and late PATH assignments further down in the countme scripts.
Fixes: #12833
Signed-off-by: Victor Koycheff <victorkoycheff@gmail.com>
Fix up the config to the known working version with comments added
for various cert/token names.
Also, make sure we install pesign, we need it for the pesign user.
Also, add the sb ca so we can verify the pesigned files when we sign
them.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
We need to issue the keytab for copr.fedorainfracloud.org, as that is
the hostname users interact with. If we issue it for inventory_hostname
(copr-fe.aws.fedoraproject.org), users would need to configure their
krb5 library with dns_canonicalize_hostname = false. Since many users
do not have this configured, using the public-facing hostname is
necessary.
The current updates policy has the same rules for Branched after
Beta freeze / updates-testing activation as for stable releases,
so we don't need a specific Branched policy after that point at
all. It only needs to exist for the 'preenable' state. The
'current' state is useless, so get rid of it.
The Koji config handling was actually rather wrong in a few ways.
If we ever got into a situation where FedoraBranched was true
and FedoraBranchedBodhi was 'current', we'd allow block on the
branch, which seems bad. Also, because this block wasn't
conditionalized on FedoraBranched and FedoraBranchedNumber is
0 when FedoraBranched is false, we wound up defining a policy for
tag 'f0', which is also dumb (but probably harmless). Getting
rid of 'current' solves the first, conditionalizing the policy
on FedoraBranched solves the second.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
It is standard practice to use Mock's bootstrap image feature now, so
the vast majority of builds are not affected by the host's RPM
configuration.
However, some workarounds remain—such as for epel-7-ppc64le (where an
architecture-specific UBI7 image is unavailable). In these cases, we
still need to install the bootstrap chroot using the older method
(`dnf install yum` via the host's DNF/RPM). This process would fail for
target distributions that were using SIGMD5 digests if verification were
enforced:
| Error: Transaction test error:
| package libgcc-4.8.5-44.el7.ppc64le does not verify: no digest
| package tzdata-2024a-1.el7.noarch does not verify: no digest
| ...
Regardless of this change, we still perform gpgcheck=1 for target
buildroots. However, these checks are handled by the RPM/DNF stacks
inside the bootstrap environments. Therefore, this change specifically
affects bootstrap chroot installations (primarily for older targets) on
builder hosts running RPM v6 (Fedora 43+).
See also: infra/ansible#3122
This machine is disabled in koji and not frozen, so using it to deploy
and test this setup. Once I can manually sign something with it, we can
look at enabling it for real (after freeze).
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
we are now in the infrastructure freeze leading up to the Fedora 44
Beta release. This is a pre release freeze.
We do this to ensure that our infrastructure is stable and ready to
release Fedora 44 Beta when it's available.
You can always check if an infrastructure freeze is in place by
checking the value of the InfraFrozen variable at:
https://forge.fedoraproject.org/infra/ansible/src/branch/main/vars/all/Frozen.yaml
You can see a list of hosts that do not freeze by checking out the
ansible repo and running the freezelist script:
git clone
https://forge.fedoraproject.org/infra/ansible/src/branch/main/vars/all/Frozen.yaml
ansible/scripts/freezelist -i inventory
Any host listed as "freezes" is frozen until 2026-03-10 (or later if
release slips). Frozen hosts should have no changes made to them without
a sign-off on the change from at least 2 sysadmin-main or rel-eng
members, along with (in most cases) a patch of the exact change to be
made to this list and/or a pull-request to the infra/ansible repo.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
**Purpose:** Ansible automation for the entire Fedora Project infrastructure — managing hundreds of bare-metal hosts, VMs, and OpenShift-deployed applications across production and staging environments.
**Type:** Infrastructure as Code (Ansible)
**Domain:** Linux distribution infrastructure (build systems, package repositories, CI/CD, web services, identity management)
**Key Components:** `roles/` (134 reusable roles), `playbooks/` (groups, hosts, openshift-apps, manual), `inventory/` (host/group vars with constructed plugin)
3. App-specific templates in `roles/openshift-apps/<app>/templates/`
4. Staging vs production controlled by `env` variable and `env_suffix`
**Group playbook pattern** — for traditional VM-based services:
1. Playbook in `playbooks/groups/<group>.yml` with `hosts:` matching inventory group
2. Must include standard `vars_files` triplet (see Review Guidance)
### Critical Resources
- **`vars/all/`** — Fedora release cycle variables. Changed every ~6 months during branching/release. Incorrect values break builds, composes, and Bodhi across the entire infrastructure.
- **`roles/base/tasks/main.yml`** (700+ lines) — Applied to every managed host. Changes here have maximum blast radius.
- **`inventory/group_vars/`** — 150 files controlling per-group behavior. Many have `_stg` counterparts for staging.
- **`main.yml`** — Master playbook importing all groups. Nightly `--check --diff` cron runs all playbooks here.
## Review Guidance
### What Reviewers Must Know
- **All playbooks must be idempotent.** They can be run at any time by the nightly cron. The checked-in state must always be the desired state.
- **Standard vars_files triplet is required** in all group/host playbooks:
Plus `include_vars` for `vars/all/` when release cycle vars are needed.
- **Hardcoded paths are standard** — paths like `/srv/web/infra/ansible/` and `/srv/private/ansible/` are the production layout on batcave01. Don't suggest making them relative or configurable.
- **Use `yml` not `yaml`** for Ansible files (per STYLEGUIDE). The exception is `vars/all/*.yaml` which uses `.yaml` historically.
- **Add `.j2` extension** to all Jinja2 templates.
- **YAML indentation is 2 spaces.** Line length is not enforced.
- **Staging uses `_stg` suffixed group_vars** and `env_suffix` variable (empty string for prod, `.stg` for staging).
- **Tags `packages` and `config`** should be applied to relevant tasks. `build` and `rollout` tags use `never` to prevent accidental execution.
- **OpenShift apps target `os_control[0]:os_control_stg[0]`** — always the first control node. Don't suggest targeting all control nodes.
### Do NOT Flag (Known False Positives)
- `ansible-lint` skip list includes `no-changed-when` and `ignore-errors` — these are intentionally suppressed project-wide
- `yaml` rule category is skipped in ansible-lint — yamllint handles YAML validation separately
- Hardcoded absolute paths in playbooks (e.g., `/srv/web/infra/ansible/...`) — this is the expected deployment layout
- `mock_modules` and `mock_roles` in `.ansible-lint` — used to pass syntax checks without all dependencies
- Octal values forbidden in yamllint — intentional policy to avoid ambiguous YAML parsing
- `when: env == "production"` / `when: env == "staging"` conditional duplication in openshift-apps — standard pattern for different scaling/config per environment
### Common Pitfalls
- **Forgetting to update `vars/all/` during release transitions** — these variables control Fedora version numbers, freeze states, and EPEL branches. Multiple files must be updated together (e.g., branching requires changes to `FedoraBranched.yaml`, `00-FedoraCycleNumber.yaml`, `FedoraBranchedBodhi.yaml`, and `Frozen.yaml`).
- **Not testing with staging first** — staging group_vars (`*_stg`) should be updated before production. Changes that work in staging may still break production due to different scaling or secrets.
- **Breaking idempotency** — a task that makes changes on every run will generate noise in the nightly `--check --diff` report and mask real drift.
- **Wrong file extension for templates** — placing a `.yml` file in `templates/` instead of `.yml.j2` means Jinja2 expressions won't be rendered.
- **ansible-lint file/role misclassification** — the `.ansible-lint``kinds` section maps `tasks/*.yml` and `vars/*.yml` explicitly. New directories with tasks may need similar mappings.
## Internal & Proprietary
- **`/srv/private/ansible/`** — Private vars (secrets, credentials) stored on batcave01. Referenced as `{{ private }}/vars.yml`. Never committed to this repo.
- **`callback_plugins/fedora_messaging_callback.py`** — Custom Ansible callback that publishes play results to Fedora's AMQP message bus. Don't suggest replacing with standard callback plugins.
- **`callback_plugins/logdetail.py`** — Custom detailed logging callback for the nightly check-diff runs.
- **`library/virt_boot`** / **`library/delete_old_oci_images.py`** — Custom Ansible modules for VM management and OCI image cleanup. Not upstream modules.
- **`scripts/auth-keys-from-fas`** — Fetches SSH authorized keys from Fedora Account System (FAS). Referenced by `auth_keys_from_fas` global variable.
- **Constructed inventory plugin** (`zzz-inventory.config`) — Dynamically creates groups by datacenter (`rdu3`), distro, vmhost, and virtualization role. The `zzz-` prefix ensures it loads last.
---
<!-- MANUAL SECTIONS - DO NOT MODIFY THIS LINE -->
## Architecture & Design Decisions
- **Mostly flat role directory with some nesting**: Most roles live directly under `roles/`, but several use subdirectory namespacing — `openshift/` (OCP4 primitives), `openshift-apps/` (per-app deployments), `awx/`, `openqa/`, `rabbit/`, among others.
- **OpenShift apps via Ansible, not Helm/Kustomize**: OCP4 applications are deployed through Ansible roles that template and apply OpenShift objects. This keeps all infrastructure in one tool and one repo.
- **Staging/production parity through group_vars**: Rather than separate inventories, staging hosts are in the same inventory with `_stg` group_vars files providing overrides. The `env` and `env_suffix` variables control behavior.
- **Release cycle managed through simple YAML vars**: Fedora's complex release lifecycle (rawhide, branched, stable, EOL) is encoded in `vars/all/` as a set of interdependent variables rather than a database or API. This is intentional — the variables are updated manually during each release milestone by the release engineering team.
## Business Logic
- **Fedora release cycle states**: Three main states — unbranched (rawhide only), branched (rawhide + pre-release), and post-release. Controlled by `FedoraBranched`, `FedoraCycleNumber`, `FedoraBranchedBodhi` (preenable/prebeta/postbeta), and freeze flags. These cascade through templates across the entire infrastructure.
- **EPEL minor version lifecycle**: EPEL 10+ has minor versions that move through states: `epel_minor` (built against CentOS), `epel_branched_minor` (branched, built against CentOS snapshot), `epel_z_minor` (built against RHEL). Up to three active minor versions at once.
- **Critical path applications**: forge, pagure, mirrormanager, bodhi, koji, dist-git, and ~20 others require two-reviewer PRs and coordinated downtime scheduling for risky changes.
- **Nightly check-diff**: All playbooks under `playbooks/{groups,hosts}` are run nightly with `--check --diff`. The ideal state is zero changes reported.
## Domain-Specific Context
- **batcave01** — The Ansible control host. All playbooks are run from here via `sudo -i ansible-playbook`.
- **env / env_suffix** — `env` is `"production"` or `"staging"`. `env_suffix` is `""` for prod, `".stg"` for staging. Used throughout to construct hostnames, queue names, and paths.
- **FAS (Fedora Account System)** — Identity provider for the Fedora community. SSH keys, group memberships, and permissions come from FAS/IPA.
- **Koji** — Fedora's build system. Build hosts (buildvm, buildhw) are managed here. Koji hub is VM-based (`playbooks/groups/koji-hub.yml` + `roles/koji_hub`), not on OpenShift.
- **Bodhi** — Fedora's update management system. Runs on OpenShift with complex RabbitMQ messaging integration.
- **dist-git / Pagure** — Package source repositories. The lookaside cache and git hosting are managed by separate roles.
- **RabbitMQ / fedora-messaging** — AMQP message bus connecting Fedora services. Certificates managed per-service via `openshift/secret-file` role.
## Special Cases
- **`playbooks/openshift-apps/` uses `gather_facts: false`** — OCP4 playbooks target the control node to run `oc` commands, not the apps themselves. Facts aren't needed and would slow execution.
- **`ansible-lint` runs in offline mode** (`offline: true`) — dependencies aren't installed during linting. `mock_modules` and `mock_roles` paper over missing dependencies.
- **Some playbooks are excluded from ansible-lint** (e.g., `copr-db.yml`, `list-vms-per-host.yml`) due to known issues with hardcoded paths or unicode errors.
- **`linux-system-roles.network`** is mocked in ansible-lint — it's an external role not available during CI.
This file provides guidance to AI coding agents when working with code in this repository.
## Project Overview
Ansible automation for the entire Fedora Project infrastructure. Manages hundreds of bare-metal hosts, VMs, and OpenShift 4 applications across production and staging environments. The control host is **batcave01** (`/srv/web/infra/ansible` public, `/srv/private/ansible` private).
Repository is hosted at https://forge.fedoraproject.org/infra/ansible
## Linting
Run yamllint on changed files:
```sh
yamllint path/to/file.yml
```
Run ansible-lint on changed files:
```sh
ansible-lint path/to/file.yml
```
CI runs both linters on changed files only (Forgejo Actions on `quay.io/fedora/fedora:latest`). The `community.zabbix` collection is installed before ansible-lint runs.
- **ansible-lint** (`.ansible-lint`): Runs in offline mode. Skipped rules: `yaml`, `role-name[path]`, `var-naming[no-role-prefix]`, `no-changed-when`, `ignore-errors`. Uses `mock_modules` and `mock_roles` to pass syntax checks without all dependencies.
## Architecture
### Directory structure
- `playbooks/groups/` — One playbook per service group (multi-host). Filename should be descriptive.
- `playbooks/hosts/` — One playbook per unique host. Filename MUST be `FQDN.yml`.
- `roles/` — 134 roles. Flat structure with some namespacing (`openshift/`, `openshift-apps/`, `awx/`, `rabbit/`).
- `roles/base/` — Applied to ALL managed hosts. Changes here have maximum blast radius.
- `inventory/` — Host definitions, `group_vars/` (150 files), `host_vars/`, and `zzz-inventory.config` (constructed inventory plugin, loads last due to `zzz-` prefix).
- `vars/all/` — Fedora release cycle variables. Changed every ~6 months during branching/release. Incorrect values break builds across the entire infrastructure.
- `vars/global.yml` — Global vars (paths, SSL, base packages).
- `tasks/` — Reusable task snippets included in playbooks.
- `main.yml` — Master playbook importing all group/host playbooks. Used with `-t tag` to run specific tags across all hosts. Nightly `--check --diff` cron runs all playbooks.
### Two main deployment patterns
**OpenShift app pattern** (dominant for new services):
1. Playbook in `playbooks/openshift-apps/<app>.yml` targets `os_control[0]:os_control_stg[0]`
3. App templates in `roles/openshift-apps/<app>/templates/`
4. Uses `gather_facts: false` (runs `oc` commands on control node, not on apps)
**Group playbook pattern** (traditional VM services):
1. Playbook in `playbooks/groups/<group>.yml` with `hosts:` matching inventory group
2. Must include standard vars_files (see below)
### Staging vs Production
Same inventory, not separate inventories. Staging hosts use `_stg` suffixed group_vars files. Controlled by:
- `env` — `"production"` or `"staging"`
- `env_suffix` — `""` for prod, `".stg"` for staging
## Fedora AI-Assisted Contribution Policy
This repository is part of the Fedora Project and subject to the [Fedora AI-Assisted Contributions Policy](https://docs.fedoraproject.org/en-US/council/policy/ai-contribution-policy/). Key requirements:
- **Accountability**: The human contributor is always the author and is fully accountable for the entirety of AI-assisted contributions. All submissions must meet project standards for quality, license compliance, and utility.
- **Transparency**: Use of AI tools MUST be disclosed when the significant part of the contribution is taken from a tool without changes. For git contributions, use an `Assisted-by:` commit message trailer (e.g., `Assisted-by: ChatGPTv5` or `Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>`).
- **No AI-only judgments**: AI MUST NOT be used as the sole or final arbiter for substantive or subjective judgments on contributions, nor for evaluating a person's standing in the community. Automated objective validation (CI/CD, testing, linting) is permitted.
When generating commit messages, always include the `Assisted-by:` trailer naming the specific AI model and version used.
## Coding Conventions
### Required vars_files in all group/host playbooks
- Standard tags: `packages` (installs/removes packages), `config` (installs config files).
- `build` and `rollout` tags use `never` to prevent accidental execution.
- All playbooks must be **idempotent** — they can be run at any time by the nightly cron.
### Common pitfalls
- Forgetting to update multiple files in `vars/all/` together during release transitions (e.g., branching requires `FedoraBranched.yaml`, `00-FedoraCycleNumber.yaml`, `FedoraBranchedBodhi.yaml`, and `Frozen.yaml`).
- Breaking idempotency — generates noise in nightly `--check --diff` and masks real drift.
- OpenShift apps must target `os_control[0]:os_control_stg[0]`, not all control nodes.
### Domain terminology
- **batcave01** — Ansible control host
- **FAS/IPA** — Fedora Account System (identity provider)
- **Koji** — Build system (VM-based, not OpenShift)
- **Bodhi** — Update management (runs on OpenShift)
Contributions to this repository are subject to the Fedora Project
Contributor Agreement. If no license is specified, the MIT license is used, otherwise
the contribution is under the specified acceptable Fedora License.
See https://docs.fedoraproject.org/en-US/legal/fpca/
See <https://docs.fedoraproject.org/en-US/legal/fpca/>
for more information.
Contributing Pull Requests
--------------------------
If found a way to improve this repository or fix an issue found in our
infrastructure tracker (see https://forge.fedoraproject.org/infra/tickets)
infrastructure tracker (see <https://forge.fedoraproject.org/infra/tickets>)
open a pull-request.
You either should have capability to run the playbooks after they have been reviewed,
and merged or find the person responsible and work with them to make sure the changes
will be aplied afterwards.
will be aplied afterwards.
We are currently working on a simple to use list of Point Of Contanct people for the applications
here, untill it is done, you can, look at people that recently edited the ansible files,
@ -120,7 +120,7 @@ or if you belong to sysadmin group, view the /etc/ansible_utils/rbac.yaml locate
where you can see the groups of people that have capabilities to run the relevant playbooks.
For example, to upgrade Release Monitoring, you need to run playbook openshift-apps/release-monitoring.yaml.
People in sysadmin-releasemonitoring have that capability, and you cand find the members in https://accounts.fedoraproject.org/group/sysadmin-releasemonitoring/
People in sysadmin-releasemonitoring have that capability, and you cand find the members in <https://accounts.fedoraproject.org/group/sysadmin-releasemonitoring/>
If the application in question is not on the critical path it should be sufficient,
if person responsible for the application reviews the PR.
@ -131,13 +131,12 @@ at least two different people should review the PR.
If there is any risk at all, that the application of the changes would induce downtime,
work closely with other to ensure that the downtime is properly scheduled:
- there is an issue in https://forge.fedoraproject.org/infra/tickets specifying the downtime
- there is an email sent to the devel-list
- https://status.fedoraproject.org is updated (see https://docs.fedoraproject.org/en-US/infra/sysadmin_guide/status-fedora/)
* there is an issue in <https://forge.fedoraproject.org/infra/tickets> specifying the downtime
* there is an email sent to the devel-list
* <https://status.fedoraproject.org> is updated (see <https://docs.fedoraproject.org/en-US/infra/sysadmin_guide/status-fedora/>)
# This script manages a set of backup files which are prefixed with ISO dates (YYYY-MM-DD).
# - As new files come in, we want to delete the old ones.
# - RETENTION_DAYS decides how old is "old".
# - But if no new files come in (e.g. the backup process is broken), we don't want to
# end up deleting _all_ the files, just because they're old.
# - MIN_KEEP decides how many files to keep.
#
# Usage: ./retain.sh --dry-run <directory>
set -euo pipefail
DRY_RUN=false
DIR=""
# Parse arguments (extremely verbosely to satisfy the LLM reviewing this PR)
while [[ $# -gt 0 ]]; do
case "$1" in
--dry-run)
DRY_RUN=true
shift
;;
-*)
echo "Error: Unknown flag '$1'" >&2
exit 1
;;
*)
if [[ -z "$DIR" ]]; then
DIR="$1"
shift
else
echo "Error: Multiple positional arguments provided. Expected only DIR." >&2
exit 1
fi
;;
esac
done
# Validate required argument
if [[ -z "$DIR" ]]; then
echo "Error: DIR argument is required." >&2
echo "Usage: $0 [--dry-run] DIR" >&2
exit 1
fi
RETENTION_DAYS="${RETENTION_DAYS:-31}"
MIN_KEEP="${MIN_KEEP:-31}"
CUTOFF=$(date -d "${RETENTION_DAYS} days ago" +%Y-%m-%d)
# Collect all dated files (basename matches YYYY-MM-DD-*)
mapfile -t DATED_FILES < <(
find "$DIR" -maxdepth 1 -type f -name "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]-*" \
| sort -r # sort descending by filename (date first)
)
total=${#DATED_FILES[@]}
$DRY_RUN && echo "*** DRY RUN — no files will be deleted ***"
echo ""
if [[ $total -eq 0 ]]; then
echo "No dated files found in '$DIR'."
exit 0
fi
deleted=0
skipped_retention=0
for i in "${!DATED_FILES[@]}"; do
filepath="${DATED_FILES[$i]}"
filename=$(basename "$filepath")
file_date="${filename:0:10}" # extract YYYY-MM-DD
# Always keep the MIN_KEEP most-recent files (indices 0..MIN_KEEP-1)
if [[ $i -lt $MIN_KEEP ]]; then
echo "KEEP (newest ${MIN_KEEP}): $filename"
continue
fi
# Delete if the file's date is before the cutoff
if [[ "$file_date" < "$CUTOFF" ]]; then
echo "DELETE (expired): $filename"
$DRY_RUN || rm -- "$filepath"
deleted="$((deleted + 1))"
else
echo "KEEP (within retention): $filename"
skipped_retention="$((skipped_retention + 1))"
fi
done
echo ""
echo "Deleted: $deleted files (dry-run=$DRY_RUN). Kept by min-count: $(( total < MIN_KEEP ? total : MIN_KEEP )). Kept by date window: $skipped_retention."