Skip to content

[device]Add check exception case when read port present fail#4107

Merged
lguohan merged 1 commit intosonic-net:masterfrom
jostar-yang:read_port_exception
Feb 7, 2020
Merged

[device]Add check exception case when read port present fail#4107
lguohan merged 1 commit intosonic-net:masterfrom
jostar-yang:read_port_exception

Conversation

@jostar-yang
Copy link
Contributor

- What I did
Add check exception case when read port present fail
- How I did it
Modify get_psu_presence(). Move read() and close() to "try: ... except IOError:" To avoid when read
port present sysfs fail. This exception will let sfputil.py to exit. So "sfputil show eeprom" can't show other port status.
- How to verify it
et I2C CLK/DAGA short in the board(ex:for port1). Or modify cpld drv and let port1 present sysfs to return fail. Do sfputil show eeprom in shell.
Messgse as below,
..........
File "/usr/share/sonic/device/x86_64-accton_as9716_32d-r0/plugins/sfputil.py", line 129, in get_presence
content = val_file.readline().rstrip()
IOError: [Errno 6] No such device or address..
Add check exception code to sfputil.py. Do the same test. Message as below,
root@sonic:/home/admin# sfputil show eeprom
Error: unable to access file: [Errno 6] No such device or address
Ethernet0: SFP EEPROM not detected
Ethernet4: SFP EEPROM not detected

Ethernet8: SFP EEPROM detected
Connector: No separable connector
Encoding: Unspecified
Extended Identifier: Power Class 1(1.5W max)
Extended RateSelect Compliance: QSFP+ Rate Select Version 1
Identifier: QSFP+ or later
Length Cable Assembly(m): 0
................
.............
- Description for the changelog

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

@lguohan lguohan merged commit a6efbae into sonic-net:master Feb 7, 2020
mssonicbld added a commit that referenced this pull request Jan 10, 2026
…lly (#24979)

#### Why I did it
src/sonic-swss
```
* a63ba5da - (HEAD -> master, origin/master, origin/HEAD) [LPO] Added support for serdes Tx/Rx polarity settings (#4053) (4 hours ago) [Prince George]
* bb691a5d - Merge pull request #3899 from rkavitha-hcl/bulk_neighbor (20 hours ago) [StephenWangGoogle]
|\ 
| failure_prs.log skip_prs.log c123c44c - Bulk support in neighbor manager. (28 hours ago) [mint570]
|/ 
* 505c4b7b - [HFT]: keep STATE_DB session stream_status in sync with profile stream_state (#4107) (34 hours ago) [Ze Gan]
* eed7900c - [countersyncd]: Add benchmark suite for countersyncd and optimize otel actor (#4016) (34 hours ago) [Janet Cui]
* 2de94bb9 - Merge pull request #3868 from rkavitha-hcl/neighbor_changes (2 days ago) [StephenWangGoogle]
|\ 
| failure_prs.log skip_prs.log 3f839f64 - Rename neiighor methods (3 days ago) [kishanps]
|/ 
* 34da384f - Merge pull request #3862 from rkavitha-hcl/acl_actions (3 days ago) [StephenWangGoogle]
|\ 
| failure_prs.log skip_prs.log b17e712d - Merge branch 'master' into acl_actions (3 days ago) [StephenWangGoogle]
| |\ 
| |/ 
|/| 
* | 0e233d18 - [gearsyncd,macsec]: Deterministic MACsec backend selection for gearbox ports (#3926) (3 days ago) [rajshekhar-nexthop]
* | c6b0c3e6 - [portsorch] DOM config change causes interface link to flap (#4056) (3 days ago) [mihirpat1]
| failure_prs.log skip_prs.log f4e65c92 - Merge branch 'master' into acl_actions (4 days ago) [rkavitha-hcl]
| |\ 
| |/ 
|/| 
* | 7297d14c - Merge pull request #3894 from divyagayathri-hcl/acl_vrf_id_oid (4 days ago) [StephenWangGoogle]
|\ \ 
| failure_prs.log skip_prs.log \ d7fc9535 - Merge branch 'master' into acl_vrf_id_oid (4 days ago) [StephenWangGoogle]
| |\ \ 
| |/ / 
|/| | 
* | | 1244a7df - [orchagent] support single ASIC VOQ Fixed-System (#4054) (4 days ago) [saravanan sellappa]
* | | c330c450 - [countersyncd]: Fix netlink fd leakage and deadlock issue (#4043) (4 days ago) [Ze Gan]
* | | ff585509 - Refactor OtelActor and message modules by removing unused code and improving clarity (#4072) (4 days ago) [Ze Gan]
* | | 68f081ae - [hftorch]: Handle exception of HFT instead of exit (#3887) (4 days ago) [Ze Gan]
* | | 4b81a3b8 - [hft]: Fix TAM type capability enable list (#4075) (4 days ago) [Ze Gan]
 / / 
* / 93ea8ef0 - [P4Orch] Update ACL VRF ID to use oid instead of u16. (5 weeks ago) [mint570]
 / 
* af78f1c0 - [P4Orch] Enable ACL Action SET_ACL_META_DATA and packet action COPY_CANCEL and DENY support (4 days ago) [mint570]
```
#### How I did it
#### How to verify it
#### Description for the changelog
jasonbridges pushed a commit to jasonbridges/sonic-buildimage that referenced this pull request Jan 22, 2026
…lly (sonic-net#24979)

#### Why I did it
src/sonic-swss
```
* a63ba5da - (HEAD -> master, origin/master, origin/HEAD) [LPO] Added support for serdes Tx/Rx polarity settings (sonic-net#4053) (4 hours ago) [Prince George]
* bb691a5d - Merge pull request sonic-net#3899 from rkavitha-hcl/bulk_neighbor (20 hours ago) [StephenWangGoogle]
|\ 
| failure_prs.log skip_prs.log c123c44c - Bulk support in neighbor manager. (28 hours ago) [mint570]
|/ 
* 505c4b7b - [HFT]: keep STATE_DB session stream_status in sync with profile stream_state (sonic-net#4107) (34 hours ago) [Ze Gan]
* eed7900c - [countersyncd]: Add benchmark suite for countersyncd and optimize otel actor (sonic-net#4016) (34 hours ago) [Janet Cui]
* 2de94bb9 - Merge pull request sonic-net#3868 from rkavitha-hcl/neighbor_changes (2 days ago) [StephenWangGoogle]
|\ 
| failure_prs.log skip_prs.log 3f839f64 - Rename neiighor methods (3 days ago) [kishanps]
|/ 
* 34da384f - Merge pull request sonic-net#3862 from rkavitha-hcl/acl_actions (3 days ago) [StephenWangGoogle]
|\ 
| failure_prs.log skip_prs.log b17e712d - Merge branch 'master' into acl_actions (3 days ago) [StephenWangGoogle]
| |\ 
| |/ 
|/| 
* | 0e233d18 - [gearsyncd,macsec]: Deterministic MACsec backend selection for gearbox ports (sonic-net#3926) (3 days ago) [rajshekhar-nexthop]
* | c6b0c3e6 - [portsorch] DOM config change causes interface link to flap (sonic-net#4056) (3 days ago) [mihirpat1]
| failure_prs.log skip_prs.log f4e65c92 - Merge branch 'master' into acl_actions (4 days ago) [rkavitha-hcl]
| |\ 
| |/ 
|/| 
* | 7297d14c - Merge pull request sonic-net#3894 from divyagayathri-hcl/acl_vrf_id_oid (4 days ago) [StephenWangGoogle]
|\ \ 
| failure_prs.log skip_prs.log \ d7fc9535 - Merge branch 'master' into acl_vrf_id_oid (4 days ago) [StephenWangGoogle]
| |\ \ 
| |/ / 
|/| | 
* | | 1244a7df - [orchagent] support single ASIC VOQ Fixed-System (sonic-net#4054) (4 days ago) [saravanan sellappa]
* | | c330c450 - [countersyncd]: Fix netlink fd leakage and deadlock issue (sonic-net#4043) (4 days ago) [Ze Gan]
* | | ff585509 - Refactor OtelActor and message modules by removing unused code and improving clarity (sonic-net#4072) (4 days ago) [Ze Gan]
* | | 68f081ae - [hftorch]: Handle exception of HFT instead of exit (sonic-net#3887) (4 days ago) [Ze Gan]
* | | 4b81a3b8 - [hft]: Fix TAM type capability enable list (sonic-net#4075) (4 days ago) [Ze Gan]
 / / 
* / 93ea8ef0 - [P4Orch] Update ACL VRF ID to use oid instead of u16. (5 weeks ago) [mint570]
 / 
* af78f1c0 - [P4Orch] Enable ACL Action SET_ACL_META_DATA and packet action COPY_CANCEL and DENY support (4 days ago) [mint570]
```
#### How I did it
#### How to verify it
#### Description for the changelog
FengPan-Frank pushed a commit to FengPan-Frank/sonic-buildimage that referenced this pull request Mar 6, 2026
…lly (sonic-net#24979)

#### Why I did it
src/sonic-swss
```
* a63ba5da - (HEAD -> master, origin/master, origin/HEAD) [LPO] Added support for serdes Tx/Rx polarity settings (sonic-net#4053) (4 hours ago) [Prince George]
* bb691a5d - Merge pull request sonic-net#3899 from rkavitha-hcl/bulk_neighbor (20 hours ago) [StephenWangGoogle]
|\
| failure_prs.log skip_prs.log c123c44c - Bulk support in neighbor manager. (28 hours ago) [mint570]
|/
* 505c4b7b - [HFT]: keep STATE_DB session stream_status in sync with profile stream_state (sonic-net#4107) (34 hours ago) [Ze Gan]
* eed7900c - [countersyncd]: Add benchmark suite for countersyncd and optimize otel actor (sonic-net#4016) (34 hours ago) [Janet Cui]
* 2de94bb9 - Merge pull request sonic-net#3868 from rkavitha-hcl/neighbor_changes (2 days ago) [StephenWangGoogle]
|\
| failure_prs.log skip_prs.log 3f839f64 - Rename neiighor methods (3 days ago) [kishanps]
|/
* 34da384f - Merge pull request sonic-net#3862 from rkavitha-hcl/acl_actions (3 days ago) [StephenWangGoogle]
|\
| failure_prs.log skip_prs.log b17e712d - Merge branch 'master' into acl_actions (3 days ago) [StephenWangGoogle]
| |\
| |/
|/|
* | 0e233d18 - [gearsyncd,macsec]: Deterministic MACsec backend selection for gearbox ports (sonic-net#3926) (3 days ago) [rajshekhar-nexthop]
* | c6b0c3e6 - [portsorch] DOM config change causes interface link to flap (sonic-net#4056) (3 days ago) [mihirpat1]
| failure_prs.log skip_prs.log f4e65c92 - Merge branch 'master' into acl_actions (4 days ago) [rkavitha-hcl]
| |\
| |/
|/|
* | 7297d14c - Merge pull request sonic-net#3894 from divyagayathri-hcl/acl_vrf_id_oid (4 days ago) [StephenWangGoogle]
|\ \
| failure_prs.log skip_prs.log \ d7fc9535 - Merge branch 'master' into acl_vrf_id_oid (4 days ago) [StephenWangGoogle]
| |\ \
| |/ /
|/| |
* | | 1244a7df - [orchagent] support single ASIC VOQ Fixed-System (sonic-net#4054) (4 days ago) [saravanan sellappa]
* | | c330c450 - [countersyncd]: Fix netlink fd leakage and deadlock issue (sonic-net#4043) (4 days ago) [Ze Gan]
* | | ff585509 - Refactor OtelActor and message modules by removing unused code and improving clarity (sonic-net#4072) (4 days ago) [Ze Gan]
* | | 68f081ae - [hftorch]: Handle exception of HFT instead of exit (sonic-net#3887) (4 days ago) [Ze Gan]
* | | 4b81a3b8 - [hft]: Fix TAM type capability enable list (sonic-net#4075) (4 days ago) [Ze Gan]
 / /
* / 93ea8ef0 - [P4Orch] Update ACL VRF ID to use oid instead of u16. (5 weeks ago) [mint570]
 /
* af78f1c0 - [P4Orch] Enable ACL Action SET_ACL_META_DATA and packet action COPY_CANCEL and DENY support (4 days ago) [mint570]
```
#### How I did it
#### How to verify it
#### Description for the changelog

Signed-off-by: Feng Pan <[email protected]>
dprital pushed a commit that referenced this pull request Mar 19, 2026
…lly (#24979)

#### Why I did it
src/sonic-swss
```
* a63ba5da - (HEAD -> master, origin/master, origin/HEAD) [LPO] Added support for serdes Tx/Rx polarity settings (#4053) (4 hours ago) [Prince George]
* bb691a5d - Merge pull request #3899 from rkavitha-hcl/bulk_neighbor (20 hours ago) [StephenWangGoogle]
|\
| failure_prs.log skip_prs.log c123c44c - Bulk support in neighbor manager. (28 hours ago) [mint570]
|/
* 505c4b7b - [HFT]: keep STATE_DB session stream_status in sync with profile stream_state (#4107) (34 hours ago) [Ze Gan]
* eed7900c - [countersyncd]: Add benchmark suite for countersyncd and optimize otel actor (#4016) (34 hours ago) [Janet Cui]
* 2de94bb9 - Merge pull request #3868 from rkavitha-hcl/neighbor_changes (2 days ago) [StephenWangGoogle]
|\
| failure_prs.log skip_prs.log 3f839f64 - Rename neiighor methods (3 days ago) [kishanps]
|/
* 34da384f - Merge pull request #3862 from rkavitha-hcl/acl_actions (3 days ago) [StephenWangGoogle]
|\
| failure_prs.log skip_prs.log b17e712d - Merge branch 'master' into acl_actions (3 days ago) [StephenWangGoogle]
| |\
| |/
|/|
* | 0e233d18 - [gearsyncd,macsec]: Deterministic MACsec backend selection for gearbox ports (#3926) (3 days ago) [rajshekhar-nexthop]
* | c6b0c3e6 - [portsorch] DOM config change causes interface link to flap (#4056) (3 days ago) [mihirpat1]
| failure_prs.log skip_prs.log f4e65c92 - Merge branch 'master' into acl_actions (4 days ago) [rkavitha-hcl]
| |\
| |/
|/|
* | 7297d14c - Merge pull request #3894 from divyagayathri-hcl/acl_vrf_id_oid (4 days ago) [StephenWangGoogle]
|\ \
| failure_prs.log skip_prs.log \ d7fc9535 - Merge branch 'master' into acl_vrf_id_oid (4 days ago) [StephenWangGoogle]
| |\ \
| |/ /
|/| |
* | | 1244a7df - [orchagent] support single ASIC VOQ Fixed-System (#4054) (4 days ago) [saravanan sellappa]
* | | c330c450 - [countersyncd]: Fix netlink fd leakage and deadlock issue (#4043) (4 days ago) [Ze Gan]
* | | ff585509 - Refactor OtelActor and message modules by removing unused code and improving clarity (#4072) (4 days ago) [Ze Gan]
* | | 68f081ae - [hftorch]: Handle exception of HFT instead of exit (#3887) (4 days ago) [Ze Gan]
* | | 4b81a3b8 - [hft]: Fix TAM type capability enable list (#4075) (4 days ago) [Ze Gan]
 / /
* / 93ea8ef0 - [P4Orch] Update ACL VRF ID to use oid instead of u16. (5 weeks ago) [mint570]
 /
* af78f1c0 - [P4Orch] Enable ACL Action SET_ACL_META_DATA and packet action COPY_CANCEL and DENY support (4 days ago) [mint570]
```
#### How I did it
#### How to verify it
#### Description for the changelog

Signed-off-by: dprital <[email protected]>
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.

3 participants