Task 1: Convert the toggle script for switching koji for external builders into playbook #13161

Closed
opened 2026-01-12 12:37:11 +00:00 by jnsamyak · 4 comments
Owner

Describe the issue

When do you need this? (YYYY/MM/DD)

When is this no longer needed or useful? (YYYY/MM/DD)

If we cannot complete this, what is the impact? [Dependencies/Blocker]


Checklist

  • I have checked existing issues for duplicates
  • I have filled out all the fields above
  • I have provided relevant links or references (if applicable)
## Describe the issue <!-- Provide a clear and detailed description of the issue, task, or feature request. Include context, background information, and what you're trying to accomplish. If there is a related Bugzilla entry or other reference, link it here. --> ## When do you need this? (YYYY/MM/DD) <!-- Provide the date by which this issue should be completed or addressed. If no specific deadline, write "ASAP" or "N/A" --> ## When is this no longer needed or useful? (YYYY/MM/DD) <!-- Provide a sunset date after which this issue becomes obsolete or is no longer needed. If not applicable, write "N/A" --> ## If we cannot complete this, what is the impact? [Dependencies/Blocker] <!-- Describe the consequences or impact if this issue cannot be addressed. What is at risk or what would be affected? --> --- ## Checklist - [x] I have checked existing issues for duplicates - [ ] I have filled out all the fields above - [ ] I have provided relevant links or references (if applicable)
Author
Owner
cf: https://pagure.io/fedora-infra/ansible/pull-request/3040
jnsamyak added this to the Backlog project 2026-02-23 15:41:43 +00:00
Author
Owner

okay so I added this back: infra/ansible#3488; Plan to get this in the sprint.

okay so I added this back: https://forge.fedoraproject.org/infra/ansible/pulls/3488; Plan to get this in the sprint.
Author
Owner

Okay, so I tried testing things in koji staging, looks good, happy to let you folks test it once

ok: [koji01.stg.rdu3.fedoraproject.org] => {
    "msg": "Blocked tcp/80 from 10.16.166.74, 10.16.166.75"
}

Commands to follow (to test it out):

$PLAYBOOK="/srv/web/infra/ansible/playbooks/manual/releng/koji-http-toggle.yml"

# 1. Baseline should show (no table) / (no set) if never blocked
sudo -i ansible-playbook $PLAYBOOK \
  -e "koji_action=status" \
  -e "koji_hosts=koji_stg"

# 2. Block staging Koji from proxies
sudo -i ansible-playbook $PLAYBOOK \
  -e "koji_action=block" \
  -e "koji_hosts=koji_stg"

# 3. Verify nftables state: expect table, set with proxy IPs, drop rule
sudo -i ansible-playbook $PLAYBOOK \
  -e "koji_action=status" \
  -e "koji_hosts=koji_stg"

# 4. Unblock staging
sudo -i ansible-playbook $PLAYBOOK \
  -e "koji_action=unblock" \
  -e "koji_hosts=koji_stg"

# 5. Confirm clean state again
sudo -i ansible-playbook $PLAYBOOK \
  -e "koji_action=status" \
  -e "koji_hosts=koji_stg"
 

Unblock restores access as soon as the nftables set is flushed (even if rule cleanup fails), because an empty set means the drop rule matches nothing.

CC: @patrikp @kevin

Okay, so I tried testing things in koji staging, looks good, happy to let you folks test it once ``` ok: [koji01.stg.rdu3.fedoraproject.org] => { "msg": "Blocked tcp/80 from 10.16.166.74, 10.16.166.75" } ``` Commands to follow (to test it out): ``` $PLAYBOOK="/srv/web/infra/ansible/playbooks/manual/releng/koji-http-toggle.yml" # 1. Baseline should show (no table) / (no set) if never blocked sudo -i ansible-playbook $PLAYBOOK \ -e "koji_action=status" \ -e "koji_hosts=koji_stg" # 2. Block staging Koji from proxies sudo -i ansible-playbook $PLAYBOOK \ -e "koji_action=block" \ -e "koji_hosts=koji_stg" # 3. Verify nftables state: expect table, set with proxy IPs, drop rule sudo -i ansible-playbook $PLAYBOOK \ -e "koji_action=status" \ -e "koji_hosts=koji_stg" # 4. Unblock staging sudo -i ansible-playbook $PLAYBOOK \ -e "koji_action=unblock" \ -e "koji_hosts=koji_stg" # 5. Confirm clean state again sudo -i ansible-playbook $PLAYBOOK \ -e "koji_action=status" \ -e "koji_hosts=koji_stg" ``` Unblock restores access as soon as the nftables set is flushed (even if rule cleanup fails), because an empty set means the drop rule matches nothing. CC: @patrikp @kevin
Author
Owner

Okay, I'll close this one, and we can test it out when the branching happens.

Okay, I'll close this one, and we can test it out when the branching happens.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
releng/tickets#13161
No description provided.