-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[config/acl] Get ACL config from DHCP and load it in swss container #432
Conversation
taoyl-ms
commented
Mar 24, 2017
- In DHCP configuration, request ACL service url as a custom option
- In update_graph service, fetch acl.json similar with minigraph.xml
- When starting swss, set ACL according to /etc/sonic/acl.json
function config_acl { | ||
if [ -f "/etc/sonic/acl.json" ]; then | ||
mkdir -p /etc/swss/config.d/acl | ||
rm -rf /etc/swss/config.d/acl/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would prefer to have the acl configuration generation part to be there in config.sh script. we could keep the intermediate acl json files stored here. it doesn't hurt and could be used as references.
as a separate suggestion that we could do it later, i think we could just put the configurations that we need into the config.d folder, copying them from /usr/share/sonic/... folder. in sonic-swss repository, we only have samples there. #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We currently don't have a config.sh for swss docker and I don't see much necessity to add one just for acl. We can split start.sh to config.sh and start.sh later if we added more feature and configuration logic became more complicated. #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree. #Closed
rm -rf /etc/swss/config.d/acl/* | ||
translate_acl -m /etc/sonic/minigraph.xml -o /etc/swss/config.d/acl /etc/sonic/acl.json | ||
for filename in /etc/swss/config.d/acl/*.json; do | ||
[ -e "$filename" ] || break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need this line? #ByDesign
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is no file in /etc/swss/config.d/acl/
, items in for
loop with be executed once with filename
equals to '/etc/swss/config.d/acl/*'
. And it will lead to error in swssconfig. #ByDesign
@@ -14,11 +14,12 @@ | |||
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8; | |||
option snmp-community code 224 = text; | |||
option minigraph-url code 225 = text; | |||
option acl-url code 226 = text; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you update the doc https://github.com/Azure/SONiC/wiki/Configuration-and-Minigraph accordingly #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. #Resolved
…onic-net#432) Get ACL config from DHCP and load it in swss container
* Add speed and buffer set test Signed-off-by: Andriy Moroz <c_andriym@mellanox.com> * Add some comments to the test Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
… automatically (#18010) #### Why I did it src/sonic-platform-common ``` * 538ec67 - (HEAD -> master, origin/master, origin/HEAD) Tx/Rx power values should be rounded up to 3 decimal places (#432) (6 hours ago) [mihirpat1] ``` #### How I did it #### How to verify it #### Description for the changelog
…D automatically (#18301) #### Why I did it src/sonic-platform-daemons ``` * 8a5ca2b - (HEAD -> master, origin/master, origin/HEAD) Add deterministic link bring-up feature for SFF compliant modules (#383) (2 days ago) [longhuan-cisco] * a591c8a - [ycabled][build] Fix sonic_ycabled build failure in Bookworm (#432) (2 days ago) [Arun Saravanan Balachandran] ``` #### How I did it #### How to verify it #### Description for the changelog
… automatically (sonic-net#18010) #### Why I did it src/sonic-platform-common ``` * 538ec67 - (HEAD -> master, origin/master, origin/HEAD) Tx/Rx power values should be rounded up to 3 decimal places (sonic-net#432) (6 hours ago) [mihirpat1] ``` #### How I did it #### How to verify it #### Description for the changelog
…D automatically (sonic-net#18301) #### Why I did it src/sonic-platform-daemons ``` * 8a5ca2b - (HEAD -> master, origin/master, origin/HEAD) Add deterministic link bring-up feature for SFF compliant modules (sonic-net#383) (2 days ago) [longhuan-cisco] * a591c8a - [ycabled][build] Fix sonic_ycabled build failure in Bookworm (sonic-net#432) (2 days ago) [Arun Saravanan Balachandran] ``` #### How I did it #### How to verify it #### Description for the changelog
… automatically (sonic-net#18010) #### Why I did it src/sonic-platform-common ``` * 538ec67 - (HEAD -> master, origin/master, origin/HEAD) Tx/Rx power values should be rounded up to 3 decimal places (sonic-net#432) (6 hours ago) [mihirpat1] ``` #### How I did it #### How to verify it #### Description for the changelog
…D automatically (sonic-net#18301) #### Why I did it src/sonic-platform-daemons ``` * 8a5ca2b - (HEAD -> master, origin/master, origin/HEAD) Add deterministic link bring-up feature for SFF compliant modules (sonic-net#383) (2 days ago) [longhuan-cisco] * a591c8a - [ycabled][build] Fix sonic_ycabled build failure in Bookworm (sonic-net#432) (2 days ago) [Arun Saravanan Balachandran] ``` #### How I did it #### How to verify it #### Description for the changelog
…tomatically (#20045) #### Why I did it src/sonic-linux-kernel ``` * b2f73b6 - (HEAD -> master, origin/master, origin/HEAD) include adm1275 config within kconfig for usage on cisco platform (#432) (35 hours ago) [Gregory Boudreau] ``` #### How I did it #### How to verify it #### Description for the changelog
…tomatically (sonic-net#20045) #### Why I did it src/sonic-linux-kernel ``` * b2f73b6 - (HEAD -> master, origin/master, origin/HEAD) include adm1275 config within kconfig for usage on cisco platform (sonic-net#432) (35 hours ago) [Gregory Boudreau] ``` #### How I did it #### How to verify it #### Description for the changelog
…tomatically (sonic-net#20045) #### Why I did it src/sonic-linux-kernel ``` * b2f73b6 - (HEAD -> master, origin/master, origin/HEAD) include adm1275 config within kconfig for usage on cisco platform (sonic-net#432) (35 hours ago) [Gregory Boudreau] ``` #### How I did it #### How to verify it #### Description for the changelog
…tomatically (sonic-net#20045) #### Why I did it src/sonic-linux-kernel ``` * b2f73b6 - (HEAD -> master, origin/master, origin/HEAD) include adm1275 config within kconfig for usage on cisco platform (sonic-net#432) (35 hours ago) [Gregory Boudreau] ``` #### How I did it #### How to verify it #### Description for the changelog