-
Notifications
You must be signed in to change notification settings - Fork 272
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
Fix Warmboot Issue when upgraded Image SAI return Switch Internal OID not accounted in previous image. #654
Conversation
Basically Switch Internal OID should always be accounted in Temp and Current Logic Comparison. It should never trigger remove operation. Changes is to always add Switch Internal OID to COLDVIDS (even in case of warm-boot) Signed-off-by: Abhishek Dosi <[email protected]>
Could you explain this more ? i dont understand this issue here |
|
||
m_client->setDummyAsicStateObject(vid); | ||
|
||
m_client->saveColdBootDiscoveredVids(m_switch_vid, coldVids); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when doing discovery on switch when switch is created, all those "default" objects are already discovered and put as cold vids to the database, why this is needed again ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kcudnik Closed as per below comments
@abdosi when switch is created, there is discovery logic that discovers all the oids, it does not matter whether its cold or warm boot |
can we have some kinds of unit test for this? |
@kcudnik : Thanks looks like logic is different in master vs 201911. I will rework this PR for 201911 branch. Master looks fine. |
Ok, so master works fine without any issues? just 201911 is affected? as for unittests, this will be tricky to implement in current test mechanism, since it would require to have 2 different version of syncd (compiled with version A and then B) and cold boot from A to warm boot to B, or to have a new special configuration file for virtual switch that on warm boot it could be specified to "enable" new STP object to be existing on the VS |
I revisited the code-path you mention and issue will be present both in master and 201911. I am verifying on 201911 as of now. Here are two issue in above approach - Issue 1: In Function isNonRemovableRid() we first check for isColdBootDiscoveredRid() and then isSwitchObjectDefaultRid(). In This particular case DefaultRid was dicovered as part of Warm-boot so first check will fail and return. Issue 2: I think my initial change where I add Internal OID to COLDVIDS (irrespective of Cold or Warm boot) make it clean because then populateExisting Object logic will take care of adding this to temp view with the existing logic.
|
@kcudnik can you check my comments above |
ok, thats sounds good, just put a those comments in that change why we populate those tables in redis |
before Cold Bott Discover OID. Also address review Comments.
Signed-off-by: Abhishek Dosi <[email protected]>
… not accounted in previous image. (#654) * Fix the issue sonic-net/sonic-buildimage#5274 Basically Switch Internal OID should always be accounted in Temp and Current Logic Comparison. It should never trigger remove operation. Changes is to always add Switch Internal OID to COLDVIDS (even in case of warm-boot) Signed-off-by: Abhishek Dosi <[email protected]> * Fix the API that check NonRemovableOID to check internal OID first before Cold Bott Discover OID. Also address review Comments. * Address Review Comments Signed-off-by: Abhishek Dosi <[email protected]>
… not accounted in previous image. (sonic-net#654) * Fix the issue sonic-net/sonic-buildimage#5274 Basically Switch Internal OID should always be accounted in Temp and Current Logic Comparison. It should never trigger remove operation. Changes is to always add Switch Internal OID to COLDVIDS (even in case of warm-boot) Signed-off-by: Abhishek Dosi <[email protected]> * Fix the API that check NonRemovableOID to check internal OID first before Cold Bott Discover OID. Also address review Comments. * Address Review Comments Signed-off-by: Abhishek Dosi <[email protected]>
Why I did:
Fix is for the issue as reported in sonic-net/sonic-buildimage#5274
Fix sonic-net/sonic-buildimage#5274
Basically Switch Internal OID should always be accounted in Temp and
Current Logic Comparison. It should never trigger remove operation.
Changes is to always add Switch Internal OID to COLDVIDS (even in case of
warm-boot)
Signed-off-by: Abhishek Dosi [email protected]
How I verfiy:
a) After change above issue is resolved
b) Dump COLDVIDS/ASIC_VIEW/HIDDEN Table and Switch Internal OID's are accounted in all 3 tables