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

[syncd] Support ACL action data object in remove dep tree #1065

Merged
merged 1 commit into from
Jun 14, 2022

Conversation

kcudnik
Copy link
Collaborator

@kcudnik kcudnik commented Jun 13, 2022

This is required if some of the attributes on ACL action data
object are OID's and we need to catch their refrence when
removing object and it's dependency tree.

This is required if some of the attributes on ACL action data
object are OID's and we need to catch their refrence when
removing object and it's dependency tree.
@kcudnik kcudnik requested a review from vaibhavhd June 13, 2022 17:23
@@ -2089,7 +2089,8 @@ void ComparisonLogic::removeCurrentObjectDependencyTree(
continue;
}

if (revgraph->attrmetadata->attrvaluetype != SAI_ATTR_VALUE_TYPE_OBJECT_ID)
if (revgraph->attrmetadata->attrvaluetype != SAI_ATTR_VALUE_TYPE_OBJECT_ID &&
revgraph->attrmetadata->attrvaluetype != SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_OBJECT_ID)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this issue be fixed in a more generic fashion? In this approach we always need to hit the issue before fixing it. In future there may be any other OID attr on any other obj, and this issue will be seen again.

What are downsides of logging this as an error/warning and continuing, instead of failing out using THROW.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to update the comment now? // currently we only support reference on OID, not list does not hold true anymore?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens when this object and its dependency tree is removed? Will we lose this object in DB after warmreboot? Will that be a concern?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is how this is solved currently in master branch, and there are currently only 2 types of objects taht are used in attr value, attr and attr action data oid, and those 2 oids are supported in SaiAttr::getOid() function which is executed after that. We can't just log this instead of throw since this is in recursive function removing current object, since the object is removed it needs to remove all it dependencies first, and this needs to be done recursively. cant skip it since it would leave wrong number of references and cause to crash later on

for oid list, this scenario is not supported yet, it would require to remove more complicated logic, we don't have that scenario yet here, let's figure this out when we hit that scenario

if object and dependency tree is removed, it's put on the list to remove when execute it on asic, and those operations will be executed and state from one view will be brought to state in temp view, you will not loos that object in DB, since at the end DB will be looking like OA created it after warm boot. remove is caused here because there are differences in current and temp view which CL tries to fix, and in need to do this by removing some objects and then maybe create them, depends on how complicated views are

@kcudnik
Copy link
Collaborator Author

kcudnik commented Jun 13, 2022

issue was addressed previously on master here: #1025

@yxieca yxieca merged commit bd4b1b5 into sonic-net:202012 Jun 14, 2022
vaibhavhd added a commit to sonic-net/sonic-buildimage that referenced this pull request Jun 15, 2022
Update sonic-sairedis submodule to include cross-branch warmboot fix:

sonic-net/sonic-sairedis#1065: Support ACL action data object in remove dep tree:
This is required if some of the attributes on ACL action data
object are OID's and we need to catch their refrence when
removing object and it's dependency tree.
@kcudnik kcudnik deleted the acldep branch May 13, 2023 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants