Question about removing newly-redundant code in disk_smart

Roderick W. Smith rod.smith at canonical.com
Wed Jan 6 19:14:05 UTC 2016


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

The server certification team has long faced a minor annoyance in that
the disk_smart test returns the same "passed" result on disks that
support SMART and pass the test as on disks that don't support SMART.
(The latter are common on RAID setups, where the RAID controller
manages SMART.) Jeff has therefore asked that the test be tweaked to
perform tests for SMART support as part of the disk/smart "requires:"
section in disk.txt.in. I've got some working preliminary code, which
I've achieved by copying (with some changes) some of the preliminary
checks for SMART support from the disk_smart script to the
block_device_resource script and adding a new "requires:" test to
disk/smart in disk.txt.in ("block_device.`ls /sys$path/block`_smart ==
'True'").

As far as I can tell, nothing but disk.txt.in calls disk_smart.
Therefore, it seems sensible to remove the redundant code from
disk_smart, lest it become confusing where the important tests are
occurring. I wanted to check before I do this, though, to be sure I
don't create problems because I've missed something -- particularly if
a client-side configuration is calling the tests in a different way
that I may be missing. Thus, I'm asking for advice on this before I
modify disk_smart. Any suggestions?

My current branch for this is at:

https://launchpad.net/~rodsmith/checkbox/early-smart-test

This version leaves disk_smart unchanged, so the checks for SMART
capabilities are duplicated. If I get confirmation that disk_smart
isn't called from elsewhere, I'll modify it to remove the redundancy
and submit a merge request.

- -- 
Rod Smith
Server and Cloud Certification Engineer
rod.smith at canonical.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQEcBAEBAgAGBQJWjWd9AAoJEFgyRI+V0FjmH80H/iWimBYt1DhZcS5oBMlroLnG
pYAL7mNf6y0m5/WlE25e6/Wq+8Oxi1/peUsdMKZHraUWN7BJAM3fG5+wUqN+R7zm
RYlRN1MWROA30vPYlkzaT3Ah86vJp7dY6enm2LKY1wnQVKalx1MI8Vt6qepJTd3q
Q3umTTCHwS3TaM3WSaq0cKbAW5CHJ8c89fbusyGIay4T+C0/rLi3/PWBG5BJ3am+
8omlhdKETY1rz3MMG+xWHreEW1DuDLxALRuJpxSQwOfrIu+RkTVcDpcpYuO78tw5
KKHXrUOg8b+9SFgit6Kjff/5ek84IZpBBLR8MfBfpxasVIftrWq87XAs9/pOd9w=
=sdzJ
-----END PGP SIGNATURE-----



More information about the Checkbox-devel mailing list