Skip to content

Commit

Permalink
Fix frr download issue (#174)
Browse files Browse the repository at this point in the history
* Fix frr download issue

* change permission of python file

* Prettify
  • Loading branch information
simcod authored Jul 4, 2024
1 parent ce99483 commit 104df63
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 19 deletions.
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

0 comments on commit 104df63

Please sign in to comment.