Skip to content

[mlnx] refactor and fix mlnx-sfpd shutdown#2907

Merged
lguohan merged 3 commits intosonic-net:masterfrom
stepanblyschak:mlnx-sfpd-fix-shutdown
May 17, 2019
Merged

[mlnx] refactor and fix mlnx-sfpd shutdown#2907
lguohan merged 3 commits intosonic-net:masterfrom
stepanblyschak:mlnx-sfpd-fix-shutdown

Conversation

@stepanblyschak
Copy link
Collaborator

Signed-off-by: Stepan Blyschak [email protected]

- What I did
Fix mlnx-sfpd shutdown flow as it does not handles SIGTERM, SIGINT correctly and supervisord kills mlnx-sfpd with SIGKILL after timeout

- How I did it
Use select, select will raise exception if interrupted with signal

- How to verify it

supervisorctl stop mlnx-sfpd
sudo config reload -y
sudo reboot
sudo warm-reboot

TODO: test cable plug in/plug out

- Description for the changelog
[mlnx] fix mlnx-sfpd shutdown

- A picture of a cute animal (not mandatory but encouraged)

Stepan Blyschak added 2 commits May 16, 2019 15:30
@lguohan lguohan merged commit d29a496 into sonic-net:master May 17, 2019
yxieca pushed a commit that referenced this pull request May 20, 2019
* [mlnx] fix mlnx-sfpd shutdown

Signed-off-by: Stepan Blyschak <[email protected]>

* fix type and handle only EINTR and EAGAIN errors from select

Signed-off-by: Stepan Blyschak <[email protected]>

* handle select.error as well during init/run

Signed-off-by: Stepan Blyschak <[email protected]>
MichelMoriniaux pushed a commit to criteo-forks/sonic-buildimage that referenced this pull request May 28, 2019
* [mlnx] fix mlnx-sfpd shutdown

Signed-off-by: Stepan Blyschak <[email protected]>

* fix type and handle only EINTR and EAGAIN errors from select

Signed-off-by: Stepan Blyschak <[email protected]>

* handle select.error as well during init/run

Signed-off-by: Stepan Blyschak <[email protected]>
SX_TRAP_ID_PMPE,
self.user_channel_p)
if rc != SX_STATUS_SUCCESS:
raise RuntimeError("sx_api_host_ifc_trap_id_register_set exited with error, rc {}".format(c))
Copy link
Collaborator

Choose a reason for hiding this comment

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

c [](start = 102, length = 1)

c is not existing

@stepanblyschak stepanblyschak deleted the mlnx-sfpd-fix-shutdown branch September 23, 2022 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants