Skip to content
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");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be some code to set it "false"?

  1. when orchagent starts
  2. when orchagent exited gracefully
  3. when orchagent receive a signal and exited
  4. etc.

vector<FieldValueTuple> feature_attrs = { app_state };
feature.set("swss", feature_attrs);

g_init = true;
}
}
Expand Down