[SSD]Enhance ssd_generic with more error handling to avoid python crash#271
Merged
sujinmkang merged 1 commit intosonic-net:masterfrom Apr 4, 2022
Merged
[SSD]Enhance ssd_generic with more error handling to avoid python crash#271sujinmkang merged 1 commit intosonic-net:masterfrom
sujinmkang merged 1 commit intosonic-net:masterfrom
Conversation
Signed-off-by: Kebo Liu <[email protected]>
sujinmkang
approved these changes
Apr 4, 2022
This was referenced Apr 5, 2022
liat-grozovik
pushed a commit
to sonic-net/sonic-buildimage
that referenced
this pull request
Apr 7, 2022
Update sonic-platform-common submodule to pickup new commits: 01512ec [SSD]Enhance ssd_generic with more error handling to avoid python crash sonic-net/sonic-platform-common#271 ac3e7f1 [y_cable][Broadcom] update the BRCM y_cable driver to release 2.0 sonic-net/sonic-platform-common#263 573717a [Credo][Ycable] Fix Credo firmware download API download_firmware flag sonic-net/sonic-platform-common#269 a844f18 [xcvr] Add get_module_fw_info method to XcvrApi class. sonic-net/sonic-platform-common#267 35bad16 [sfputil]Refactoring read_porttab_mappings sonic-net/sonic-platform-common#264 83c4345 [SSD Generic] Add support for parsing nvme ssd model, health and temperature sonic-net/sonic-platform-common#265 5da31e1 [ycable][credo] Fix the is_link_active API for Credo Ycable sonic-net/sonic-platform-common#260 931c6ea [Y-Cable][Credo] add theading locker to support thread-safe calling, add SKU check for download_firmware API. sonic-net/sonic-platform-common#222 ff3aa75 Fix SFF8472 Enhanced Options sonic-net/sonic-platform-common#259 a8a83e9 [ssd] Allow individual vendor parsers to handle errors sonic-net/sonic-platform-common#252 Signed-off-by: Kebo Liu <[email protected]>
sujinmkang
pushed a commit
that referenced
this pull request
Apr 7, 2022
…id python crash #273 Signed-off-by: Kebo Liu [email protected] Description Backport #271 to 202012 Judge the self._parse_re return value, if it's N/A then stop further string slice handling to avoid a crash. Update the regular expression pattern for Innodisk SSD health, to handle the case that the output of the health section is different when its lifetime reaches the end. Motivation and Context Original code doesn't handle the case that self._parse_re returns N/A, it's assuming that self._parse_re will always return a none N/A value thus further handling the result w/o judge, which could in a crash. On Innodisk SSD, when the SSD remaining lifetime reaches the end, the output of the Health section will be a number w/o %, e.g. Health: 0.00 instead of Health: 95.0% in the normal case, need to update the regular expression to handle this case. How Has This Been Tested? UT test has been added. Tested the change on platforms with different types of SSD.
judyjoseph
pushed a commit
that referenced
this pull request
Apr 11, 2022
#271 Signed-off-by: Kebo Liu [email protected] Description Judge the self._parse_re return value, if it's N/A then stop further string slice handling to avoid a crash. Update the regular expression pattern for Innodisk SSD health, to handle the case that the output of the health section is different when its lifetime reaches the end. Motivation and Context Original code doesn't handle the case that self._parse_re returns N/A, it's assuming that self._parse_re will always return a none N/A value thus further handling the result w/o judge, which could in a crash. On Innodisk SSD, when the SSD remaining lifetime reaches the end, the output of the Health section will be a number w/o %, e.g. Health: 0.00 instead of Health: 95.0% in the normal case, need to update the regular expression to handle this case. How Has This Been Tested? UT test has been added. Tested the change on platforms with different types of SSD.
itamar-talmon
pushed a commit
to itamar-talmon/sonic-platform-common
that referenced
this pull request
Jan 12, 2023
sonic-net#271 Signed-off-by: Kebo Liu [email protected] Description Judge the self._parse_re return value, if it's N/A then stop further string slice handling to avoid a crash. Update the regular expression pattern for Innodisk SSD health, to handle the case that the output of the health section is different when its lifetime reaches the end. Motivation and Context Original code doesn't handle the case that self._parse_re returns N/A, it's assuming that self._parse_re will always return a none N/A value thus further handling the result w/o judge, which could in a crash. On Innodisk SSD, when the SSD remaining lifetime reaches the end, the output of the Health section will be a number w/o %, e.g. Health: 0.00 instead of Health: 95.0% in the normal case, need to update the regular expression to handle this case. How Has This Been Tested? UT test has been added. Tested the change on platforms with different types of SSD.
oleksandrivantsiv
pushed a commit
to oleksandrivantsiv/sonic-platform-common
that referenced
this pull request
Oct 25, 2024
… work (sonic-net#271) This PR is meant to fix gRPC keepalive timeout values. With this change and adding the options to server side, the pings start working for TCP connection for all gRPC channels. This PR is also meant to increase the time intervals between pings to 4 seconds for gRPC connections With this change the TCP connections are always persistent example: admin@sonic:~$ netstat | grep 50075 tcp6 0 0 tmg.dtap.sphybrid:41828 vlan2003.mim-a75s:50075 ESTABLISHED tcp6 0 0 tmg.dtap.sphybrid:43912 192.168.0.3:50075 ESTABLISHED tcp6 0 0 tmg.dtap.sphybrid:43620 win-cfr7mesbc6v.c:50075 ESTABLISHED tcp6 0 0 192.168.0.1:37768 192.168.0.23:50075 ESTABLISHED tcp6 0 0 tmg.dtap.sphybrid:58776 win-cfr7mesbc6v.c:50075 ESTABLISHED tcp6 0 0 192.168.0.1:34634 192.168.0.21:50075 ESTABLISHED tcp6 0 0 tmg.dtap.sphybrid:47672 win-cfr7mesbc6v.c:50075 ESTABLISHED tcp6 0 0 192.168.0.1:42318 192.168.0.7:50075 ESTABLISHED tcp6 0 0 192.168.0.1:48792 co1speutlv104.phx:50075 ESTABLISHED tcp6 0 0 tmg.dtap.sphybrid:34794 dtap15.dtap.sphyb:50075 ESTABLISHED tcp6 0 0 192.168.0.1:56194 192.168.0.13:50075 ESTABLISHED tcp6 0 0 tmg.dtap.sphybrid:43548 win-cfr7mesbc6v.c:50075 ESTABLISHED Signed-off-by: vaibhav-dahiya <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Kebo Liu [email protected]
Description
Judge the
self._parse_rereturn value, if it'sN/Athen stop further string slice handling to avoid a crash.Update the regular expression pattern for Innodisk SSD health, to handle the case that the output of the health section is different when its lifetime reaches the end.
Motivation and Context
Original code doesn't handle the case that
self._parse_rereturnsN/A, it's assuming thatself._parse_rewill always return anone N/Avalue thus further handling the result w/o judge, which could in a crash.On Innodisk SSD, when the SSD remaining lifetime reaches the end, the output of the
Healthsection will be a number w/o%, e.g.Health: 0.00instead ofHealth: 95.0%in the normal case, need to update the regular expression to handle this case.How Has This Been Tested?
Additional Information (Optional)