[LLDP] Add lldpmgrd Daemon to Manage LLDP Configuration#1428
[LLDP] Add lldpmgrd Daemon to Manage LLDP Configuration#1428jleveque merged 7 commits intosonic-net:masterfrom jleveque:lldpmgrd
Conversation
rules/docker-lldp-sv2.mk
Outdated
There was a problem hiding this comment.
Do you need LIBSWSSCOMMON here?
There was a problem hiding this comment.
it uses python-binding of libswsscommon for getting table notification from redis db.
dockers/docker-lldp-sv2/lldpmgrd
Outdated
There was a problem hiding this comment.
What about removing of an interface. Do you catch such case?
There was a problem hiding this comment.
No. We decided this was unnecessary.
dockers/docker-lldp-sv2/lldpmgrd
Outdated
There was a problem hiding this comment.
probably it's better to get exit code from the command too.
There was a problem hiding this comment.
I'm already checking the return code from the command on line 145 (if proc.returncode != 0:)
dockers/docker-lldp-sv2/lldpmgrd
Outdated
There was a problem hiding this comment.
I think 'if not status' would be better here
dockers/docker-lldp-sv2/lldpmgrd
Outdated
|
|
@pavel-shirshov: I understand that Docker sends a SIGKILL after 10 seconds, I'm just stating that with the current implementation of this daemon, the LLDP docker will always take the full 10 seconds to stop. |
dockers/docker-lldp-sv2/lldpmgrd
Outdated
There was a problem hiding this comment.
Are you sure you always have "state" in fvp_dict?
Probably better
"state" in fvp_dict and fvp_dict["state"] == "ok"
?
There was a problem hiding this comment.
It should always be there, but it can't hurt to check. Will update shortly.
dockers/docker-lldp-sv2/lldpmgrd
Outdated
There was a problem hiding this comment.
to be complete, we should also listen to CFG_DEVICE_NEIGHBOR_TABLE_NAME change, since if user configure this table, we may need to update the message we send out. I understand this is not an issue now, but we should add an comment to mark as TODO.
There was a problem hiding this comment.
I do not think we should return here, in case there is no description, we should send "ldpcli configure ports {0} lldp portidsubtype local {1}". this will ensure we send out the correct port name instead of mac address.
dockers/docker-lldp-sv2/lldpmgrd
Outdated
There was a problem hiding this comment.
to be complete, we should also listen to PORT_TABLE_NAME change, same reason as above.
dockers/docker-lldp-sv2/lldpmgrd
Outdated
There was a problem hiding this comment.
In case there is no alias, then we should use port name to send out.
lguohan
left a comment
There was a problem hiding this comment.
need to handle no alias case, need to handle no neighbor description case.
- Remove reconfigure.sh
…, omit description
| of the Redis State database. When we are notified of the creation of an | ||
| interface, update LLDP configuration accordingly. | ||
| """ | ||
| # Subscribe to PORT table notifications in the State DB |
There was a problem hiding this comment.
as I noted in my previous comments, we should also listen CFG_PORT_TABLE and CFG_NEIGBHRO_TABLE in case port alias change or neighbor info change, then we can send updated information to the neighbor. We do not need to do this now, but we should mark it as TODO in the comment.
There was a problem hiding this comment.
I added a TODO in the file header comment (lines 12-13). I think you missed it.
|
as I noted in my previous comments, we should also listen CFG_PORT_TABLE and CFG_NEIGBHRO_TABLE in case port alias change or neighbor info change, then we can send updated information to the neighbor. We do not need to do this now, but we should mark it as TODO in the comment. |
Commits include: * src/sonic-utilities c7e46c9...42cab68 (3): > [consutil] Look for udevprefix.conf file under platform dir, not plugins (#1431) > [ci]: download from sonic-buildimage.vs artifact (#1428) > [storyteller] sort output by time and improve lag support (#1430)
sonic-net#6768 change the kvm artifact name from kvm to vs Signed-off-by: Guohan Lu <[email protected]>
Update SAI submodule v1.9 with the following fixes 7594e53 (HEAD, origin/v1.9) Skip brcm teardown assertion (sonic-net#1423) (sonic-net#1428) 0c33f4a [FIX]Fix the circular reference issue when build sai header py (sonic-net#1427) 7e0fc24 Add support for building under Doxygen 1.9.1 (sonic-net#1414) (sonic-net#1424) 8ecf3ef [Fix]Correct enum check on branch 1.9 (sonic-net#1418) e2b2f39 Add Thrift 0.14.1 compatibility (sonic-net#1403) (sonic-net#1416)
jinja2.exceptions.UndefinedError: 'PORT' is undefinedif PORT table wasn't available at the timesel.select()blocks and is not interrupted by signals, therefore callingdocker stop lldpwill not return until it times out after 10 seconds.