[config/acl] Get ACL config from DHCP and load it in swss container#432
[config/acl] Get ACL config from DHCP and load it in swss container#432taoyl-ms merged 2 commits intosonic-net:masterfrom
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.
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.
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
| 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.
why do we need this line? #ByDesign
There was a problem hiding this comment.
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
| 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.
can you update the doc https://github.com/Azure/SONiC/wiki/Configuration-and-Minigraph accordingly #Resolved
There was a problem hiding this comment.
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
…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
…t#432) Signed-off-by: Mihir Patel <patelmi@microsoft.com>