diff --git a/portsyncd/portsyncd.cpp b/portsyncd/portsyncd.cpp index 045922414f..5cd06a511f 100644 --- a/portsyncd/portsyncd.cpp +++ b/portsyncd/portsyncd.cpp @@ -193,6 +193,17 @@ bool handlePortConfigFromConfigDB(ProducerStateTable &p, DBConnector &cfgDb, boo return false; } + for ( auto &k : keys ) + { + // if any port doesn't have lanes data, return false and try from PortConfigFile + std::string lanes; + if (!table.hget(k, "lanes", lanes)) + { + cout << "To use port configuration file, no port lanes configuration in ConfigDB for " << k << endl; + return false; + } + } + for ( auto &k : keys ) { table.get(k, ovalues);