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

DASH: configuration reordering leads to incorrect ACL configuration #3069

Open
Yakiv-Huryk opened this issue Mar 7, 2024 · 0 comments
Open
Assignees

Comments

@Yakiv-Huryk
Copy link
Contributor

When we send a DASH config to a gnmi server, the order in which the configuration arrives to the orchagent is not defined.
This is an issue for ACL configuration, for example:

  1. DASH_ACL_GROUP_TABLE:eni0 - create an ACL group
  2. DASH_ACL_RULE_TABLE:eni0:rule0 – create a rule
  3. DASH_ACL_OUT_TABLE:eni0:1 – bind a group to ENI

This can get reordered so the bind(3) happens before rule creation(2), which is not allowed according to the requirements:
User can add/remove rules in a group as long as it is not currently bound to an ENI

Example of reordering:

DASH ACL config
[
    {
        "DASH_ACL_GROUP_TABLE:eni0g": {
            "ip_version": "ipv4",
            "guid": "3bf2464e-0282-434f-a943-e6e033a945ab"
        },
        "OP": "SET"
    },
    {
        "DASH_ACL_RULE_TABLE:eni0g:rule0": {
            "priority": 0,
            "action": "allow",
            "terminating": "true",
            "src_addr": "33.33.33.1/32",
            "dst_addr": "33.33.33.2/32",
            "src_port": "0-65535",
            "dst_port": "33"
        },
        "OP": "SET"
    },
    {
        "DASH_ACL_OUT_TABLE:eni0:1": {
            "acl_group_id": "eni0g"
        },
        "OP": "SET"
    }
]
swss.rec
2024-03-05.14:29:49.524614|DASH_ACL_RULE_TABLE:eni0g:rule0|SET|pb:*
2!!
:!!
2024-03-05.14:29:49.524953|DASH_ACL_OUT_TABLE:eni0:1|SET|pb:
        eni0g
2024-03-05.14:29:49.544711|DASH_ACL_GROUP_TABLE:eni0g|SET|pb:
X̧Wr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants