Skip to content

[Mellanox]Check dmi file permission before access in platform API #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

dgsudharsan
Copy link
Owner

Signed-off-by: Sudharsan Dhamal Gopalarathnam [email protected]

Why I did it

During the system boot up when 'show platform status' or 'show version' command is executed before STATE_DB CHASSIS_INFO table is populated, the show will try to fallback to use the platform API. The DMI file in mellanox platforms require root permission for access. So if the show commands are executed as admin or any other user, the following error log will appear in the syslog

Jun 28 17:21:25.612123 sonic ERR show: Fail to decode DMI /sys/firmware/dmi/entries/2-0/raw due to PermissionError(13, 'Permission denied')

How I did it

Check the file permission before accessing it.

How to verify it

Added UT to verify.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205

Description for the changelog

Link to config_db schema for YANG module changes

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

Signed-off-by: Sudharsan Dhamal Gopalarathnam <[email protected]>
@dgsudharsan dgsudharsan closed this Jul 1, 2022
dgsudharsan pushed a commit that referenced this pull request Feb 1, 2023
Why I did it
[FIPS] Upgrade Open-SymCrypt version to 0.6

Improve the SymCrypt performance
Support to download the debug packages from storage account in version 0.6.
How I did it
Upgrade to symcrypt-openssl from version 0.4 to version 0.6

Changes in https://github.com/sonic-net/sonic-fips:
0c29b23 Upgrade the submodules: SymCrypt and SymCrypt-OpenSSL #40
80022f3 Fix the ARM64 build failure
2e76a3d Disable the unsupported tests

Other changes will be added as well:
55b8e0a Merge pull request #35 from xumia/change-license
120c1a7 Upgrade SymCrypt and SymCrypt-OpenSSL
2f9c084 Merge pull request #39 from liuh-80/dev/liuh/update-openssh-version
a3be6c5 Revert openssh version
e02fa1e Update fips version

How to verify it
dgsudharsan pushed a commit that referenced this pull request Feb 9, 2023
Why I did it
[FIPS] Upgrade Open-SymCrypt version to 0.6

Improve the SymCrypt performance
Support to download the debug packages from storage account in version 0.6.
How I did it
Upgrade to symcrypt-openssl from version 0.4 to version 0.6

Changes in https://github.com/sonic-net/sonic-fips:
0c29b23 Upgrade the submodules: SymCrypt and SymCrypt-OpenSSL #40
80022f3 Fix the ARM64 build failure
2e76a3d Disable the unsupported tests

Other changes will be added as well:
55b8e0a Merge pull request #35 from xumia/change-license
120c1a7 Upgrade SymCrypt and SymCrypt-OpenSSL
2f9c084 Merge pull request #39 from liuh-80/dev/liuh/update-openssh-version
a3be6c5 Revert openssh version
e02fa1e Update fips version

How to verify it
dgsudharsan pushed a commit that referenced this pull request Feb 16, 2023
Why I did it
[FIPS] Upgrade Open-SymCrypt version to 0.6

Improve the SymCrypt performance
Support to download the debug packages from storage account in version 0.6.
How I did it
Upgrade to symcrypt-openssl from version 0.4 to version 0.6

Changes in https://github.com/sonic-net/sonic-fips:
0c29b23 Upgrade the submodules: SymCrypt and SymCrypt-OpenSSL #40
80022f3 Fix the ARM64 build failure
2e76a3d Disable the unsupported tests

Other changes will be added as well:
55b8e0a Merge pull request #35 from xumia/change-license
120c1a7 Upgrade SymCrypt and SymCrypt-OpenSSL
2f9c084 Merge pull request #39 from liuh-80/dev/liuh/update-openssh-version
a3be6c5 Revert openssh version
e02fa1e Update fips version

How to verify it
@dgsudharsan dgsudharsan deleted the dmi_permission branch March 9, 2023 01:49
dgsudharsan pushed a commit that referenced this pull request Apr 21, 2023
67a3bdf show counters wrong cli output fixed (#36)
5b3eea1 Update package cache, and bail on the first error (#35)
1d221b0 dhcpv6 relay UT code coverage improve (#32)
514b084 dhcpv6 packet handling code refine (#30)

Signed-off-by: Vivek Reddy <[email protected]>
dgsudharsan pushed a commit that referenced this pull request Feb 22, 2024
…tomatically (sonic-net#17953)

#### Why I did it
src/sonic-platform-pde
```
* f2cc748 - (HEAD -> master, origin/master, origin/HEAD) Merge pull request #35 from nonodark/local (21 hours ago) [賓少鈺]
* 607e920 - Fix 'Chassis' object has no attribute 'get_num_psu' in test_psu.py (3 weeks ago) [nonodark]
```
#### How I did it
#### How to verify it
#### Description for the changelog
dgsudharsan pushed a commit that referenced this pull request Mar 17, 2025
…lly (sonic-net#634)

#### Why I did it
src/sonic-swss
```
* b2a7b03 - (HEAD -> 202412, origin/202412) [code sync] Merge code from sonic-net/sonic-swss:202411 to 202412 (#36) (7 hours ago) [mssonicbld]
* 84485cd - [code sync] Merge code from sonic-net/sonic-swss:202411 to 202412 (#35) (31 hours ago) [mssonicbld]
* 6e83557 - [code sync] Merge code from sonic-net/sonic-swss:202411 to 202412 (#34) (2 days ago) [mssonicbld]
```
#### How I did it
#### How to verify it
#### Description for the changelog
dgsudharsan pushed a commit that referenced this pull request Mar 17, 2025
… automatically (sonic-net#681)

#### Why I did it
src/sonic-platform-common
```
* de1c3d4 - (HEAD -> 202412, origin/202412) [code sync] Merge code from sonic-net/sonic-platform-common:202411 to 202412 (#35) (21 hours ago) [mssonicbld]
```
#### How I did it
#### How to verify it
#### Description for the changelog
dgsudharsan pushed a commit that referenced this pull request Mar 17, 2025
…tically (sonic-net#753)

#### Why I did it
src/sonic-sairedis
```
* 0c1750e - (HEAD -> 202412, origin/HEAD, origin/202412) Merge pull request #32 from r12f/cherry-pick-1509 (9 hours ago) [Riff]
|\ 
| failure_prs.log skip_prs.log 995e71f - [sairedis/syncd] Implement bulk get support (sonic-net#1509) (19 hours ago) [Stepan Blyshchak]
* | 2f4d39d - Fixing the sairedis build issue caused at https://github.com/sonic-ne… (#33) (18 hours ago) [mssonicbld]
* | 1da1f58 - Fix counter issues on VS platform (#35) (18 hours ago) [mssonicbld]
|/ 
* 4d1b885 - Merge pull request #28 from r12f/cherry-pick-1234 (20 hours ago) [Riff]
* 3c5f3e1 - sonic-sairedis : Wred stats feature changes on Sai-redis and Syncd (sonic-net#1234) (30 hours ago) [r12f]
```
#### How I did it
#### How to verify it
#### Description for the changelog
dgsudharsan pushed a commit that referenced this pull request Mar 17, 2025
…tomatically (sonic-net#863)

#### Why I did it
src/sonic-linux-kernel
```
* 8b45626 - (HEAD -> 202412, origin/HEAD, origin/202412) [code sync] Merge code from sonic-net/sonic-linux-kernel:202411 to 202412 (#35) (21 hours ago) [mssonicbld]
```
#### How I did it
#### How to verify it
#### Description for the changelog
dgsudharsan pushed a commit that referenced this pull request Mar 17, 2025
…omatically (sonic-net#888)

#### Why I did it
src/sonic-swss-common
```
* 827e759 - (HEAD -> 202412, origin/HEAD, origin/202412) [FC] remove FLEX_COUNTER_DELAY_STATUS_FIELD (sonic-net#982) (#35) (21 hours ago) [mssonicbld]
```
#### How I did it
#### How to verify it
#### Description for the changelog
dgsudharsan pushed a commit that referenced this pull request Mar 31, 2025
…tically (sonic-net#22143)

#### Why I did it
src/sonic-dash-api
```
* 827c052 - (HEAD -> master, origin/master, origin/HEAD) Build debug symbols (#35) (3 hours ago) [Lawrence Lee]
```
#### How I did it
#### How to verify it
#### Description for the changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants