-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[yang-models] required service field for control plane ACL table #9294
Comments
The
Although the config on the switch are valid after each application of the above steps according to YANG models. There is a problem with src/sonic-host-services/scripts/caclmgrd, specifically this code snippet: # Ignore non-control-plane ACL tables
if table_data["type"] != self.ACL_TABLE_TYPE_CTRLPLANE:
continue
acl_services = table_data["services"]
There are 2 ways to fix this issue:
@qiluo-msft please let me know if my understanding is not correct, or if you have any concerns |
…9295) #### Why I did it Fixing issue #9294 #### How I did it Updating ACL yang model #### How to verify it Validating issue with `config patch-apply` is fixed. - Start a KVM - Add file `add-ctrl-plane-tbl.json-patch ` with content: ```json [ { "op": "add", "path": "/ACL_TABLE/ACTRLPLANETABLE", "value": { "policy_desc": "ACTRLPLANETABLE", "services": [ "SSH" ], "stage": "ingress", "type": "CTRLPLANE" } } ] ``` - Run `sudo config apply-patch add-ctrl-plane-tbl.json-patch` Before: ``` Patch Applier: The patch was sorted into 4 changes: Patch Applier: * [{"op": "add", "path": "/ACL_TABLE/ACTRLPLANETABLE", "value": {"type": "CTRLPLANE"}}] Patch Applier: * [{"op": "add", "path": "/ACL_TABLE/ACTRLPLANETABLE/policy_desc", "value": "ACTRLPLANETABLE"}] Patch Applier: * [{"op": "add", "path": "/ACL_TABLE/ACTRLPLANETABLE/services", "value": ["SSH"]}] Patch Applier: * [{"op": "add", "path": "/ACL_TABLE/ACTRLPLANETABLE/stage", "value": "ingress"}] ``` After: ``` Patch Applier: The patch was sorted into 1 change: Patch Applier: * [{"op": "add", "path": "/ACL_TABLE/ACTRLPLANETABLE", "value": {"policy_desc": "ACTRLPLANETABLE", "services": ["SSH"], "stage": "ingress", "type": "CTRLPLANE"}}] ``` #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 #### Description for the changelog <!-- Write a short (one line) summary that describes the changes in this pull request for inclusion in the changelog: --> #### A picture of a cute animal (not mandatory but encouraged)
Fixed by #9295 |
…9295) #### Why I did it Fixing issue #9294 #### How I did it Updating ACL yang model #### How to verify it Validating issue with `config patch-apply` is fixed. - Start a KVM - Add file `add-ctrl-plane-tbl.json-patch ` with content: ```json [ { "op": "add", "path": "/ACL_TABLE/ACTRLPLANETABLE", "value": { "policy_desc": "ACTRLPLANETABLE", "services": [ "SSH" ], "stage": "ingress", "type": "CTRLPLANE" } } ] ``` - Run `sudo config apply-patch add-ctrl-plane-tbl.json-patch` Before: ``` Patch Applier: The patch was sorted into 4 changes: Patch Applier: * [{"op": "add", "path": "/ACL_TABLE/ACTRLPLANETABLE", "value": {"type": "CTRLPLANE"}}] Patch Applier: * [{"op": "add", "path": "/ACL_TABLE/ACTRLPLANETABLE/policy_desc", "value": "ACTRLPLANETABLE"}] Patch Applier: * [{"op": "add", "path": "/ACL_TABLE/ACTRLPLANETABLE/services", "value": ["SSH"]}] Patch Applier: * [{"op": "add", "path": "/ACL_TABLE/ACTRLPLANETABLE/stage", "value": "ingress"}] ``` After: ``` Patch Applier: The patch was sorted into 1 change: Patch Applier: * [{"op": "add", "path": "/ACL_TABLE/ACTRLPLANETABLE", "value": {"policy_desc": "ACTRLPLANETABLE", "services": ["SSH"], "stage": "ingress", "type": "CTRLPLANE"}}] ``` #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 #### Description for the changelog <!-- Write a short (one line) summary that describes the changes in this pull request for inclusion in the changelog: --> #### A picture of a cute animal (not mandatory but encouraged)
Description
This issue is found by config apply-patch development.
I see the difference in redis monitor log:
Checking the source code src/sonic-host-services/scripts/caclmgrd, it subscribes ACL_TABLE_TABLE and ACL_RULE_TABLE. I believe the non-atomic HMSET operations by
config apply-patch
mess the caclmgrd logic.Steps to reproduce the issue:
Describe the results you received:
Describe the results you expected:
Output of
show version
:Output of
show techsupport
:Additional information you deem important (e.g. issue happens only occasionally):
The text was updated successfully, but these errors were encountered: