-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Update smartmontool version >= v7.4 #17635
Conversation
echo "deb http://deb.debian.org/debian bookworm-backports main" | sudo tee -a $FILESYSTEM_ROOT/etc/apt/sources.list > /dev/null | ||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sources.list is generated based on this template:
deb [arch={{ ARCHITECTURE }}] {{ mirror_url }} {{ DISTRIBUTION }}-backports main contrib {{ nonfree_component }} |
So you just need to install this package and copy config file without any additional actions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@k-v1 your suggestion is not working
Here is the latest build failure :- https://dev.azure.com/mssonic/be1b070f-be15-4154-aade-b1d3bfb17054/_apis/build/builds/457492/logs/58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default all SONiC builds on github use these options:
SONIC_VERSION_CONTROL_COMPONENTS=deb,py2,py3,web,git,docker
and
MIRROR_SNAPSHOT=y
It means we use not default debian mirror like deb.debian.org
but snapshot from here https://github.com/sonic-net/sonic-buildimage/blob/master/files/build/versions/default/versions-mirror
You build failed because your version of smartmontools (smartmontools=7.4-2~bpo12+1) is not available for current snapshot (http://packages.trafficmanager.net/snapshot/debian/20231027T000138Z bookworm-backports).
So my suggestion is correct and you may also remove apt-get update
from your patch.
But you probably need ask help from someone (maybe @xumia) to update version of debian snapshot in files/build/versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I'm not sure it's correct to lock version if you install this package from debian mirror.
If you need a specific version of smartmontools like 7.4-2 you should build the package from source.
If you need to install this package from debian bookworm-backports you should use command apt-get -y install -t bookworm-backports smartmontools
(without version).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the version upgrade pipeline has been failing on master branch at least since October, because Barefoot is failing to build.
@xumia @lguohan can we disable the Barefoot build for 202311 and master, considering that platform has been failing to build for months? Looks like the SAI library for that platform needs to be updated.
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install smartmontools | ||
echo "deb http://deb.debian.org/debian bookworm-backports main" | sudo tee -a $FILESYSTEM_ROOT/etc/apt/sources.list > /dev/null | ||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get update | ||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -t bookworm-backports smartmontools=7.4-2~bpo12+1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
last time we updated smartmontools, it brought many dependencies which was hard to manage later.
in this case, what else dependency package it got installed? can you share the log?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lguohan this is for 202311 for comparison, let me share for master (bookworm)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lguohan on master(bookworm) running
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you get the version to see what else we are bringing from backport repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
root@str3-7060-acs-1:~# apt-cache show smartmontools | grep Depends Depends: debianutils (>= 2.2), lsb-base (>= 3.2-14), libc6 (>= 2.27), libcap-ng0 (>= 0.7.9), libgcc-s1 (>= 3.0), libselinux1 (>= 3.1~), libstdc++6 (>= 5.2), libsystemd0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lguohan below is the dependent versions in 202305
admin@str3-7060-acs-2:~$ apt-cache show smartmontools | grep Depends
Depends: debianutils (>= 2.2), lsb-base (>= 3.2-14), libc6 (>= 2.27), libcap-ng0 (>= 0.7.9), libgcc-s1 (>= 3.0), libselinux1 (>= 3.1~), libstdc++6 (>= 5.2), libsystemd0 admin@str3-7060-acs-2:~$
Why I did it Update smartmontool verson to 7.4. This is done to prevent smartmontools service to exit with non-zero exit status on platform that does not have a SSD/disk to be monitored. Until Debian Bullseye (which had smartmontools 7.2), Debian had a patch applied that changed the default quit mode to never exit. A bug report was filed on Debian, saying that the source code patch isn't needed and could just be done via command line options, and also that smartmontools 7.3 has a new built-in option to exit with 0 if there are no monitorable devices found (which prevents systemd from treating it as a service failure). Because of that, Debian Bookworm (which also upgraded to 7.3) removed the patch and restored the default behavior of exiting with exit code 17 if there are no devices found. Smartmontools v7.3 has this issue, because of which smartd exits with non-zero exit status even with "-q" option. How I did it Update the smartmontools to version 7.4 which has the fix for exiting gracefully if no monitoring device is found Added smartd option "-q nodev0" to allow smartd to exit with status 0 if no monitoring device found
Why I did it Update smartmontool verson to 7.4. This is done to prevent smartmontools service to exit with non-zero exit status on platform that does not have a SSD/disk to be monitored. Until Debian Bullseye (which had smartmontools 7.2), Debian had a patch applied that changed the default quit mode to never exit. A bug report was filed on Debian, saying that the source code patch isn't needed and could just be done via command line options, and also that smartmontools 7.3 has a new built-in option to exit with 0 if there are no monitorable devices found (which prevents systemd from treating it as a service failure). Because of that, Debian Bookworm (which also upgraded to 7.3) removed the patch and restored the default behavior of exiting with exit code 17 if there are no devices found. Smartmontools v7.3 has this issue, because of which smartd exits with non-zero exit status even with "-q" option. How I did it Update the smartmontools to version 7.4 which has the fix for exiting gracefully if no monitoring device is found Added smartd option "-q nodev0" to allow smartd to exit with status 0 if no monitoring device found
Why I did it
Update smartmontool verson to 7.4. This is done to prevent smartmontools service to exit with non-zero exit status on platform that does not have a SSD/disk to be monitored.
Until Debian Bullseye (which had smartmontools 7.2), Debian had a patch applied that changed the default quit mode to never exit. A bug report was filed on Debian, saying that the source code patch isn't needed and could just be done via command line options, and also that smartmontools 7.3 has a new built-in option to exit with 0 if there are no monitorable devices found (which prevents systemd from treating it as a service failure). Because of that, Debian Bookworm (which also upgraded to 7.3) removed the patch and restored the default behavior of exiting with exit code 17 if there are no devices found.
Smartmontools v7.3 has this issue, because of which smartd exits with non-zero exit status even with "-q" option.
Work item tracking
How I did it
How to verify it
smartd running version is now v7.4 (stable on bookworm is v7.3)
Smartd is now exiting successfully (exit status=0) if no SSD device found
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)