From 0107ebeb493354669622382e2f42e051dd938f8f Mon Sep 17 00:00:00 2001 From: Yevhen Fastiuk Date: Fri, 9 Jun 2023 22:48:15 +0300 Subject: [PATCH] Report ready state to Sysmonitor daemon Signed-off-by: Yevhen Fastiuk --- portsyncd/portsyncd.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/portsyncd/portsyncd.cpp b/portsyncd/portsyncd.cpp index d9f69ba754..020f312e42 100644 --- a/portsyncd/portsyncd.cpp +++ b/portsyncd/portsyncd.cpp @@ -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)) @@ -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 feature_attrs = { app_state }; + feature.set("swss", feature_attrs); + g_init = true; } }