Skip to content
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

Ipmitool bookworm: Fix and patch enterprise-numbers URL #17878

Merged
merged 11 commits into from
Feb 27, 2024

Conversation

rajib-dutta1
Copy link
Contributor

@rajib-dutta1 rajib-dutta1 commented Jan 23, 2024

ipmitool_1.8.19-4_amd64.deb.log

Why I did it

ipmitool utility is used to access various HW sensors. Some platforms use "ipmitool raw " to read specific addresses.

ipmitool_1.8.19-4_amd64.deb, that is part of bookworm has a defect. The package is missing file enterprise.txt that is expected by the "raw read" code path.
It is so because the file the .deb tries to download at the build time does not have the necessary extension as it is available on remote server: https://www.iana.org/assignments/enterprise-numbers.txt

Work item tracking

NA

How I did it

The defect had been fixed using coding changes in next unstable version of Linux. It is expected to be available in future stable version of the OS. Hence to keep the changes to minimal, the .dsc file is downloaded and only the Makefile is modified to download the correct file. To make is work as patch necessary changes are made.

How to verify it

Build log is attached and installation of the file is noted line #2274
When using vanilla bookworm on platforms like 5212 or 5224:

root@sonic:~# ipmitool raw 0x04 0x2d 0x31
IANA PEN registry open failed: No such file or directory
00 c0 01 80

When fixed we should not see the above error:

root@sonic:/home/admin# ipmitool raw 0x04 0x2d 0x31
00 c0 00 80

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

None

Tested branch (Please provide the tested image version)

bookworm

Description for the changelog

This change is to address ipmitool raw read issue. This patch must be removed once it is available in next stable Linux release that contains the fix.

ipmitool/ipmitool@1edb0e2

PR#17878

Link to config_db schema for YANG module changes

NA

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

Copy link

linux-foundation-easycla bot commented Jan 23, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@rajib-dutta1 rajib-dutta1 marked this pull request as draft January 23, 2024 01:42
@rajib-dutta1 rajib-dutta1 marked this pull request as ready for review January 23, 2024 18:57

IPMITOOL_DBG = ipmitool-dbgsym_$(IPMITOOL_VERSION_FULL)_$(CONFIGURED_ARCH).deb
$(eval $(call add_derived_package,$(IPMITOOL),$(IPMITOOL_DBG)))

Copy link
Contributor

Choose a reason for hiding this comment

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

can you please remove the empty lines?.

slave.mk Outdated
@@ -441,7 +441,6 @@ $(info "ENABLE_BOOTCHART : "$(ENABLE_BOOTCHART)")
$(info "INCLUDE_FIPS" : "$(INCLUDE_FIPS)")
$(info "ENABLE_TRANSLIB_WRITE" : "$(ENABLE_TRANSLIB_WRITE)")
$(info "ENABLE_NATIVE_WRITE" : "$(ENABLE_NATIVE_WRITE)")
$(info "ENABLE_DIALOUT" : "$(ENABLE_DIALOUT)")
Copy link
Contributor

Choose a reason for hiding this comment

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

Why ENABLE_DIALOUT is removed?.

@jeff-yin
Copy link
Collaborator

@aravindmani-1 can you please re-review?
@saiarcot895 can you also review? This is for Bookworm related issues.

@@ -101,6 +101,10 @@ sudo mkdir -p $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM
sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/ifupdown2_*.deb || \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f

# Install a patched version of ipmitool (and its dependencies via 'apt-get -y install -f')
sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/ipmitool_*.deb || \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f
Copy link
Contributor

Choose a reason for hiding this comment

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

In build_debian.sh, can you remove the ipmitool package installation from there, to make sure this version is the only version that gets installed?

Copy link
Contributor Author

@rajib-dutta1 rajib-dutta1 Feb 13, 2024

Choose a reason for hiding this comment

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

I pushed the changed asked above.

root@sonic:/home/admin# show ver

SONiC Software Version: SONiC.master.0-dirty-20240209.233855
SONiC OS Version: 12
Distribution: Debian 12.4
Kernel: 6.1.0-11-2-amd64
Build commit: bd47fd1
Build date: Sat Feb 10 01:35:50 UTC 2024
Built by: commbuild@rajvm

Platform: x86_64-dellemc_s5212f_c3538-r0
HwSKU: DellEMC-S5212f-P-25G
ASIC: broadcom
ASIC Count: 1
Serial Number: CQY67C3
Model Number: 0VK93C
Hardware Revision: 01
Uptime: 07:59:58 up 4 min, 1 user, load average: 5.00, 4.12, 1.78
Date: Tue 13 Feb 2024 07:59:58

root@sonic:/home/admin# ipmitool raw 0x04 0x2d 0x31
Get Device ID command failed: 0xb1 Unknown (0xB1)
Received a response with unexpected ID 0 vs. 1
00 c0 01 80
root@sonic:/home/admin# ipmitool raw 0x04 0x2d 0x31
00 c0 01 80

root@sonic:/home/admin# dpkg -l ipmitool
||/ Name Version Architecture Description
+++-==============-============-============-==================================>
ii ipmitool 1.8.19-4 amd64 utility for IPMI control with kern>

@saiarcot895
Copy link
Contributor

Can you update the title to show what is being fixed?

@rajib-dutta1 rajib-dutta1 changed the title Ipmitool bookworm Ipmitool bookworm: Fix enterprise-numbers URL Feb 14, 2024
@rajib-dutta1
Copy link
Contributor Author

Can you update the title to show what is being fixed?

Done.

@rajib-dutta1 rajib-dutta1 changed the title Ipmitool bookworm: Fix enterprise-numbers URL Ipmitool bookworm: Fix and patch enterprise-numbers URL Feb 14, 2024
@jeff-yin
Copy link
Collaborator

@saiarcot895 #18094 is merged and it looks like the pipelines have passed. Can this be merged?

@jeff-yin
Copy link
Collaborator

@qiluo-msft @lguohan @xumia please review/approve/merge, thanks. This is needed as part of the bookworm upgrade.

@qiluo-msft qiluo-msft merged commit 4753953 into sonic-net:master Feb 27, 2024
19 checks passed
vivekrnv pushed a commit to vivekrnv/sonic-buildimage that referenced this pull request Mar 8, 2024
)

### Why I did it

ipmitool utility is used to access various HW sensors. Some platforms use "ipmitool raw " to read specific addresses. 

ipmitool_1.8.19-4_amd64.deb, that is part of bookworm has a defect. The package is missing file enterprise.txt that is expected by the "raw read" code path. 
It is so because the file the .deb tries to download at the build time does not have the necessary extension as it is available on remote server: https://www.iana.org/assignments/enterprise-numbers.txt

### How I did it

The defect had been fixed using coding changes in next unstable version of Linux. It is expected to be available in future stable version of the OS. Hence to keep the changes to minimal, the .dsc file is downloaded and only the Makefile is modified to download the correct file. To make is work as patch necessary changes are made.

#### How to verify it
Build log is attached and installation of the file is noted line sonic-net#2274
When using vanilla bookworm on platforms like 5212 or 5224:
-------------------------------------------------------------------
root@sonic:~# ipmitool raw 0x04 0x2d 0x31
IANA PEN registry open failed: No such file or directory
00 c0 01 80

When fixed we should not see the above error:
--------------------------------------------------
root@sonic:/home/admin# ipmitool raw 0x04 0x2d 0x31
 00 c0 00 80

### Description for the changelog

This change is to address ipmitool raw read issue. This patch must be removed once it is available in next stable Linux release that contains the fix. 

ipmitool/ipmitool@1edb0e2
sonic-otn pushed a commit to Weitang-Zheng/sonic-buildimage that referenced this pull request Mar 11, 2024
)

### Why I did it

ipmitool utility is used to access various HW sensors. Some platforms use "ipmitool raw " to read specific addresses. 

ipmitool_1.8.19-4_amd64.deb, that is part of bookworm has a defect. The package is missing file enterprise.txt that is expected by the "raw read" code path. 
It is so because the file the .deb tries to download at the build time does not have the necessary extension as it is available on remote server: https://www.iana.org/assignments/enterprise-numbers.txt

### How I did it

The defect had been fixed using coding changes in next unstable version of Linux. It is expected to be available in future stable version of the OS. Hence to keep the changes to minimal, the .dsc file is downloaded and only the Makefile is modified to download the correct file. To make is work as patch necessary changes are made.

#### How to verify it
Build log is attached and installation of the file is noted line sonic-net#2274
When using vanilla bookworm on platforms like 5212 or 5224:
-------------------------------------------------------------------
root@sonic:~# ipmitool raw 0x04 0x2d 0x31
IANA PEN registry open failed: No such file or directory
00 c0 01 80

When fixed we should not see the above error:
--------------------------------------------------
root@sonic:/home/admin# ipmitool raw 0x04 0x2d 0x31
 00 c0 00 80

### Description for the changelog

This change is to address ipmitool raw read issue. This patch must be removed once it is available in next stable Linux release that contains the fix. 

ipmitool/ipmitool@1edb0e2
saksarav-nokia pushed a commit to saksarav-nokia/sonic-buildimage that referenced this pull request Mar 12, 2024
)

### Why I did it

ipmitool utility is used to access various HW sensors. Some platforms use "ipmitool raw " to read specific addresses. 

ipmitool_1.8.19-4_amd64.deb, that is part of bookworm has a defect. The package is missing file enterprise.txt that is expected by the "raw read" code path. 
It is so because the file the .deb tries to download at the build time does not have the necessary extension as it is available on remote server: https://www.iana.org/assignments/enterprise-numbers.txt

### How I did it

The defect had been fixed using coding changes in next unstable version of Linux. It is expected to be available in future stable version of the OS. Hence to keep the changes to minimal, the .dsc file is downloaded and only the Makefile is modified to download the correct file. To make is work as patch necessary changes are made.

#### How to verify it
Build log is attached and installation of the file is noted line sonic-net#2274
When using vanilla bookworm on platforms like 5212 or 5224:
-------------------------------------------------------------------
root@sonic:~# ipmitool raw 0x04 0x2d 0x31
IANA PEN registry open failed: No such file or directory
00 c0 01 80

When fixed we should not see the above error:
--------------------------------------------------
root@sonic:/home/admin# ipmitool raw 0x04 0x2d 0x31
 00 c0 00 80

### Description for the changelog

This change is to address ipmitool raw read issue. This patch must be removed once it is available in next stable Linux release that contains the fix. 

ipmitool/ipmitool@1edb0e2
saiarcot895 added a commit to saiarcot895/sonic-buildimage that referenced this pull request Sep 25, 2024
…c-net#17878)"

The latest version of ipmitool in Debian has the enterprise-numbers.txt
file. Don't compile this package locally anymore.

This reverts commit 4753953.
@saiarcot895 saiarcot895 mentioned this pull request Sep 25, 2024
11 tasks
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.

6 participants