File tree 2 files changed +15
-1
lines changed
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -931,7 +931,7 @@ bool PortHelper::validatePortConfig(PortConfig &port) const
931
931
932
932
if (!port.admin_status .is_set )
933
933
{
934
- SWSS_LOG_NOTICE (
934
+ SWSS_LOG_INFO (
935
935
" Missing non mandatory field(%s): setting default value(%s)" ,
936
936
PORT_ADMIN_STATUS,
937
937
PORT_STATUS_DOWN
Original file line number Diff line number Diff line change @@ -683,6 +683,11 @@ void PortsOrch::setPortConfigState(port_config_state_t value)
683
683
684
684
bool PortsOrch::addPortBulk (const std::vector<PortConfig> &portList)
685
685
{
686
+ // The method is used to create ports in a bulk mode.
687
+ // The action takes place when:
688
+ // 1. Ports are being initialized at system start
689
+ // 2. Ports are being added/removed by a user at runtime
690
+
686
691
SWSS_LOG_ENTER ();
687
692
688
693
if (portList.empty ())
@@ -4036,6 +4041,15 @@ void PortsOrch::doPortTask(Consumer &consumer)
4036
4041
}
4037
4042
else if (op == DEL_COMMAND)
4038
4043
{
4044
+ Port p;
4045
+ if (!getPort (pCfg.key , p))
4046
+ {
4047
+ SWSS_LOG_ERROR (" Failed to remove port: alias %s doesn't exist" , pCfg.key .c_str ());
4048
+ m_portConfigMap.erase (pCfg.key );
4049
+ it = taskMap.erase (it);
4050
+ continue ;
4051
+ }
4052
+
4039
4053
const auto &alias = pCfg.key ;
4040
4054
4041
4055
if (m_port_ref_count[alias] > 0 )
You can’t perform that action at this time.
0 commit comments