Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix frr download issue #174

Merged
merged 3 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions roles/sonic/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
branch_name: "202211"
base_url: "https://sonic-build.azurewebsites.net/api/sonic/artifacts?branchName={{ branch_name }}&platform=vs"
frr_pythontools_url: "{{ base_url }}&target=target%2Fdebs%2Fbullseye%2Ffrr-pythontools_8.2.2-sonic-0_all.deb"
base_url: "https://raw.githubusercontent.com/FRRouting/frr"
branch_name: "frr-8.2.2"
frr_python_url: "{{ base_url }}/{{ branch_name }}/tools/frr-reload.py"
frr_url: "{{ base_url }}/{{ branch_name }}/tools/frr-reload"
35 changes: 19 additions & 16 deletions roles/sonic/tasks/frr-reload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,34 @@
port: 2605
state: started

- name: Download frr-pythontools
- name: Download frr-reload.py
community.docker.docker_container_exec:
container: bgp
argv:
- curl
- --location
- "{{ frr_pythontools_url }}"
- "{{ frr_python_url }}"
- --output
- frr-pythontools.deb
chdir: /root
- frr-reload.py
chdir: /usr/lib/frr

- name: Install frr-pythontools
- name: Download frr-reload
community.docker.docker_container_exec:
container: bgp
argv:
- dpkg
- -i
- frr-pythontools.deb
chdir: /root
- curl
- --location
- "{{ frr_url }}"
- --output
- frr-reload
chdir: /usr/lib/frr

- name: Place frr-reload
community.docker.docker_container_copy_into:
- name: Change frr file permissions
community.docker.docker_container_exec:
container: bgp
content: |
#!/bin/sh
exec python3 /usr/lib/frr/frr-reload.py --reload /etc/frr/frr.conf
container_path: /usr/lib/frr/frr-reload
mode: "0755"
argv:
- chmod
- "0755"
- frr-reload.py
- frr-reload
chdir: /usr/lib/frr