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

Remove operation for SAI_OBJECT_TYPE_VLAN_MEMBER not working, getting SAI_STATUS_ITEM_NOT_FOUND error #175

Open
selldinesh opened this issue Aug 7, 2023 · 2 comments

Comments

@selldinesh
Copy link
Contributor

selldinesh commented Aug 7, 2023

I created a vlan member object using the below code block

commands = [
        {
            "name": "vlan_member_2",
            "op": "create",
            "type": "SAI_OBJECT_TYPE_VLAN_MEMBER",
            "attributes": [
                "SAI_VLAN_MEMBER_ATTR_VLAN_ID",
                "$vlan_10",
                "SAI_VLAN_MEMBER_ATTR_BRIDGE_PORT_ID",
                "$BRIDGE_PORT_2",
                "SAI_VLAN_MEMBER_ATTR_VLAN_TAGGING_MODE",
                "SAI_VLAN_TAGGING_MODE_UNTAGGED",
            ],
        },

    ]
    for command in commands:
        print("-" * 80)
        print(command)
        result = npu.command_processor.process_command(command)
        print(result)

output:
-------------------------------------------------------------------------------- {'name': 'vlan_member_2', 'op': 'create', 'type': 'SAI_OBJECT_TYPE_VLAN_MEMBER', 'attributes': ['SAI_VLAN_MEMBER_ATTR_VLAN_ID', '$vlan_10', 'SAI_VLAN_MEMBER_ATTR_BRIDGE_PORT_ID', '$BRIDGE_PORT_2', 'SAI_VLAN_MEMBER_ATTR_VLAN_TAGGING_MODE', 'SAI_VLAN_TAGGING_MODE_UNTAGGED']} oid:0x270000000005ae SAI_STATUS_SUCCESS --------------------------------------------------------------------------------

Once its created when i try tho remove it, i get the following issue

commands = [
    {
        'name': 'vlan_member_2',
        'op': 'remove',
    },

]

results = [*npu.process_commands(commands)]
print('======= SAI commands RETURN values remove =======')
pprint(results)

Output :

>           assert status[2] == 'SAI_STATUS_SUCCESS', f"remove({obj}) --> {status}"
E           AssertionError: remove(SAI_OBJECT_TYPE_VLAN_MEMBER:oid:0x270000000005ae) --> [b'Sgetresponse', b'[]', 'SAI_STATUS_ITEM_NOT_FOUND']

/usr/local/lib/python3.7/dist-packages/saichallenger/common/sai_client/sai_redis_client/sai_redis_client.py:161: AssertionError
@selldinesh selldinesh changed the title Remove operation for SAI_OBJECT_TYPE_VLAN_MEMBER not working Remove operation for SAI_OBJECT_TYPE_VLAN_MEMBER not working, getting SAI_STATUS_ITEM_NOT_FOUND error Aug 7, 2023
@andriy-kokhan
Copy link
Contributor

Do you remove the port from the default VLAN before adding as untagged member into VLAN 10?
SAI default VLAN

Most likely it's SAI implementation issue. Probably the logs may provide some additional information. Nothing related to SAI-C I guess.

@selldinesh
Copy link
Contributor Author

Do you remove the port from the default VLAN before adding as untagged member into VLAN 10? SAI default VLAN

Most likely it's SAI implementation issue. Probably the logs may provide some additional information. Nothing related to SAI-C I guess.

No, i didnt remove the port from default vlan. I dont think its necessary to remove the port from default vlan.

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

2 participants