Skip to content

Commit

Permalink
Increase Redis Timeout value for Switch Create Opration for Packet (s…
Browse files Browse the repository at this point in the history
…onic-net#2243)

What I did:-

Increase Redis Timeout for Switch Creation Operation for chassis-packet.

Why I did:-

Seeing OA crash as SAI/SDK can take more than 1 min for initialization.

How I verify:

Manual Verification.
  • Loading branch information
abdosi authored May 16, 2022
1 parent 1723aac commit 11829a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions orchagent/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ void getCfgSwitchType(DBConnector *cfgDb, string &switch_type)
switch_type = "switch";
}

if (switch_type != "voq" && switch_type != "fabric" && switch_type != "switch")
if (switch_type != "voq" && switch_type != "fabric" && switch_type != "chassis-packet" && switch_type != "switch")
{
SWSS_LOG_ERROR("Invalid switch type %s configured", switch_type.c_str());
//If configured switch type is none of the supported, assume regular switch
Expand Down Expand Up @@ -570,15 +570,15 @@ int main(int argc, char **argv)
attr.value.u64 = gSwitchId;
attrs.push_back(attr);

if (gMySwitchType == "voq" || gMySwitchType == "fabric")
if (gMySwitchType == "voq" || gMySwitchType == "fabric" || gMySwitchType == "chassis-packet")
{
/* We set this long timeout in order for orchagent to wait enough time for
* response from syncd. It is needed since switch create takes more time
* than default time to create switch if there are lots of front panel ports
* and systems ports to initialize
*/

if (gMySwitchType == "voq")
if (gMySwitchType == "voq" || gMySwitchType == "chassis-packet")
{
attr.value.u64 = (5 * SAI_REDIS_DEFAULT_SYNC_OPERATION_RESPONSE_TIMEOUT);
}
Expand Down Expand Up @@ -608,7 +608,7 @@ int main(int argc, char **argv)
}
SWSS_LOG_NOTICE("Create a switch, id:%" PRIu64, gSwitchId);

if (gMySwitchType == "voq" || gMySwitchType == "fabric")
if (gMySwitchType == "voq" || gMySwitchType == "fabric" || gMySwitchType == "chassis-packet")
{
/* Set syncd response timeout back to the default value */
attr.id = SAI_REDIS_SWITCH_ATTR_SYNC_OPERATION_RESPONSE_TIMEOUT;
Expand Down

0 comments on commit 11829a0

Please sign in to comment.