Skip to content

Commit

Permalink
Report ready state to Sysmonitor daemon
Browse files Browse the repository at this point in the history
Signed-off-by: Yevhen Fastiuk <[email protected]>
  • Loading branch information
fastiuk committed May 16, 2024
1 parent c36333c commit 0107ebe
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions portsyncd/portsyncd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ int main(int argc, char **argv)
DBConnector appl_db("APPL_DB", 0);
DBConnector state_db("STATE_DB", 0);
ProducerStateTable p(&appl_db, APP_PORT_TABLE_NAME);
Table feature(&state_db, "FEATURE");

Table cfgDeviceMetaDataTable(&cfgDb, CFG_DEVICE_METADATA_TABLE_NAME);
if (!cfgDeviceMetaDataTable.hget("localhost", "switch_type", g_switchType))
Expand Down Expand Up @@ -134,6 +135,13 @@ int main(int argc, char **argv)
p.set("PortInitDone", attrs);
SWSS_LOG_NOTICE("PortInitDone");

/*
* Notify "System ready" feature that we are ok.
*/
FieldValueTuple app_state("up_status", "true");
vector<FieldValueTuple> feature_attrs = { app_state };
feature.set("swss", feature_attrs);

g_init = true;
}
}
Expand Down

0 comments on commit 0107ebe

Please sign in to comment.