diff --git a/cfgmgr/vlanmgr.cpp b/cfgmgr/vlanmgr.cpp index c23a23cf14..5e1c823982 100644 --- a/cfgmgr/vlanmgr.cpp +++ b/cfgmgr/vlanmgr.cpp @@ -221,7 +221,17 @@ bool VlanMgr::addHostVlanMember(int vlan_id, const string &port_alias, const str cmds << BASH_CMD " -c " << shellquote(inner.str()); std::string res; - EXEC_WITH_ERROR_THROW(cmds.str(), res); + try + { + EXEC_WITH_ERROR_THROW(cmds.str(), res); + } + catch (const std::runtime_error& e) + { + if (!isMemberStateOk(port_alias)) + return false; + else + EXEC_WITH_ERROR_THROW(cmds.str(), res); + } return true; } @@ -632,6 +642,12 @@ void VlanMgr::doVlanMemberTask(Consumer &consumer) m_vlanMemberReplay.erase(kfvKey(t)); } + else + { + SWSS_LOG_INFO("Netdevice for %s not ready, delaying", kfvKey(t).c_str()); + it++; + continue; + } } else if (op == DEL_COMMAND) {