Skip to content

Commit

Permalink
[syncd] Check warm vids right after discover (#907)
Browse files Browse the repository at this point in the history
Will list all RIDs that are not present in rid2vid map right after warm boot.
  • Loading branch information
kcudnik authored Aug 27, 2021
1 parent 1020de7 commit 66c1a3d
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 1,058 deletions.
18 changes: 10 additions & 8 deletions syncd/SaiSwitch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ SaiSwitch::SaiSwitch(

helperDiscover();

if (warmBoot)
{
checkWarmBootDiscoveredRids();
}

helperSaveDiscoveredObjectsToRedis();

helperInternalOids();
Expand All @@ -70,11 +75,6 @@ SaiSwitch::SaiSwitch(
{
saiGetMacAddress(m_default_mac_address);
}

if (warmBoot)
{
checkWarmBootDiscoveredRids();
}
}

/*
Expand Down Expand Up @@ -1184,8 +1184,11 @@ void SaiSwitch::checkWarmBootDiscoveredRids()
if (rid2vid.find(rid) != rid2vid.end())
continue;

SWSS_LOG_ERROR("RID %s is missing from current RID2VID map after WARM boot!",
sai_serialize_object_id(rid).c_str());
auto ot = m_vendorSai->objectTypeQuery(rid);

SWSS_LOG_ERROR("RID %s (%s) is missing from current RID2VID map after WARM boot!",
sai_serialize_object_id(rid).c_str(),
sai_serialize_object_type(ot).c_str());

success = false;
}
Expand All @@ -1198,4 +1201,3 @@ void SaiSwitch::checkWarmBootDiscoveredRids()
SWSS_LOG_NOTICE("all discovered RIDs are present in current RID2VID map for switch VID %s",
sai_serialize_object_id(m_switch_vid).c_str());
}

210 changes: 0 additions & 210 deletions unittest/lib/tests

This file was deleted.

Loading

0 comments on commit 66c1a3d

Please sign in to comment.