Skip to content

Commit 66c1a3d

Browse files
authored
[syncd] Check warm vids right after discover (sonic-net#907)
Will list all RIDs that are not present in rid2vid map right after warm boot.
1 parent 1020de7 commit 66c1a3d

File tree

6 files changed

+10
-1058
lines changed

6 files changed

+10
-1058
lines changed

syncd/SaiSwitch.cpp

+10-8
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ SaiSwitch::SaiSwitch(
5353

5454
helperDiscover();
5555

56+
if (warmBoot)
57+
{
58+
checkWarmBootDiscoveredRids();
59+
}
60+
5661
helperSaveDiscoveredObjectsToRedis();
5762

5863
helperInternalOids();
@@ -70,11 +75,6 @@ SaiSwitch::SaiSwitch(
7075
{
7176
saiGetMacAddress(m_default_mac_address);
7277
}
73-
74-
if (warmBoot)
75-
{
76-
checkWarmBootDiscoveredRids();
77-
}
7878
}
7979

8080
/*
@@ -1184,8 +1184,11 @@ void SaiSwitch::checkWarmBootDiscoveredRids()
11841184
if (rid2vid.find(rid) != rid2vid.end())
11851185
continue;
11861186

1187-
SWSS_LOG_ERROR("RID %s is missing from current RID2VID map after WARM boot!",
1188-
sai_serialize_object_id(rid).c_str());
1187+
auto ot = m_vendorSai->objectTypeQuery(rid);
1188+
1189+
SWSS_LOG_ERROR("RID %s (%s) is missing from current RID2VID map after WARM boot!",
1190+
sai_serialize_object_id(rid).c_str(),
1191+
sai_serialize_object_type(ot).c_str());
11891192

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

unittest/lib/tests

-210
This file was deleted.

0 commit comments

Comments
 (0)