disk/hdd-parking failed on non-hdd system and cause the system enters "degraded"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox Provider - Base |
Expired
|
Medium
|
Kent Lin | ||
OEM Priority Project |
Triaged
|
Critical
|
jeremyszu |
Bug Description
Here are two problems.
1. disk/hdd-parking needs to check the system has HDD(s) as extra "requires:"
2. the hdapds should not be installed in non-HDD system OR the hdapds.service should be disabled if there is no HDD.
* plainbox-
* hdapds will create a systemd service "hdapds.service" and if there is no hdd in the system then the system will enter "degraded" mode. [2]
* disk/hdd-parking use the command "command: hdd_parking.py" and it use
```
try:
hdapsd = Popen(
except OSError as err:
```
without checking the hdd, it cause the test case failed[3].
* The DUT is only has nvme[4]
As least, the "disk/hdd-parking" needs to be executed only if the HDD presents.
I suggest to disable "hdapds.service" when there is no HDD in the system if the "plainbox-
[1]
$ apt show plainbox-
Package: plainbox-
...
Recommends: ..., hdapsd, ...
[2]
● hdapsd.service - hdapsd hard drive active protection system daemon
Loaded: loaded (/lib/systemd/
Active: failed (Result: exit-code) since Wed 2021-01-06 18:32:25 CST; 22h ago
Docs: man:hdapsd(8)
Process: 760 ExecStart=
Main PID: 760 (code=exited, status=1/FAILURE)
-- Logs begin at Wed 2020-12-30 20:24:13 CST, end at Thu 2021-01-07 17:35:58 CST. --
systemd[1]: Started hdapsd hard drive active protection system daemon.
hdapsd[760]: Wed Jan 6 18:32:25 2021: Could not detect any devices.
hdapsd[760]: Wed Jan 6 18:32:25 2021: Starting hdapsd
hdapsd[760]: Wed Jan 6 18:32:25 2021: WARNING: You did not supply any devices to protect, trying autodetection.
hdapsd[760]: Usage: hdapsd [OPTIONS]
hdapsd[760]: -c --cfgfile=<cfgfile> Load configuration from <cfgfile>.
hdapsd[760]: By default, configuration is read from /etc/hdapsd.conf
hdapsd[760]: -d --device=<device> <device> is likely to be hda or sda.
hdapsd[760]: Can be given multiple times
hdapsd[760]: to protect multiple devices.
hdapsd[760]: -f --force Force unloading heads, even if kernel thinks
hdapsd[760]: differently (on pre ATA7 drives).
hdapsd[760]: This only works when adding devices by hand (-d).
hdapsd[760]: -r --force-rotational Autodetect drives as rotational, even if
hdapsd[760]: kernel thinks they are not.
hdapsd[760]: -s --sensitivity=
hdapsd[760]: Defaults to 15, higher value means less
hdapsd[760]: sensitive.
hdapsd[760]: -a --adaptive Adaptive threshold (automatic increase
hdapsd[760]: when the built-in keyboard/mouse are used).
hdapsd[760]: -v --verbose Get verbose statistics.
hdapsd[760]: -b --background Run the process in the background.
hdapsd[760]: -p --pidfile[
hdapsd[760]: in background.
hdapsd[760]: If <pidfile> is not specified,
hdapsd[760]: it's set to /var/run/
hdapsd[760]: -t --dry-run Don't actually park the drive.
hdapsd[760]: -y --poll-sysfs Force use of sysfs interface to
hdapsd[760]: accelerometer.
hdapsd[760]: -H --hardware-logic Use the hardware fall detection logic instead of
hdapsd[760]: the software one (-s/--sensitivity and -a/--adaptive
hdapsd[760]: have no effect in this mode).
hdapsd[760]: -S --software-logic Use the software fall detection logic even if the
hdapsd[760]: hardware one is available.
hdapsd[760]: -L --no-leds Don't blink the LEDs.
hdapsd[760]: -l --syslog Log to syslog instead of stdout/stderr.
hdapsd[760]: -V --version Display version information and exit.
hdapsd[760]: -h --help Display this message and exit.
hdapsd[760]: You can send SIGUSR1 to deactivate hdapsd for 8 seconds.
hdapsd[760]: Send bugs, comments and suggestions to <email address hidden>
systemd[1]: hdapsd.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: hdapsd.service: Failed with result 'exit-code'.
[3]
$ cat com.canonical.
Starting HDD protection test - move the system around on all axis. No particular force should be required.
Tue Jan 5 01:52:02 2021: Starting hdapsd
Tue Jan 5 01:52:02 2021: WARNING: You did not supply any devices to protect, trying autodetection.
Usage: hdapsd [OPTIONS]
-c --cfgfile=<cfgfile> Load configuration from <cfgfile>.
-d --device=<device> <device> is likely to be hda or sda.
-f --force Force unloading heads, even if kernel thinks
-r --force-rotational Autodetect drives as rotational, even if
-s --sensitivity=
-a --adaptive Adaptive threshold (automatic increase
-v --verbose Get verbose statistics.
-b --background Run the process in the background.
-p --pidfile[
-t --dry-run Don't actually park the drive.
-y --poll-sysfs Force use of sysfs interface to
-H --hardware-logic Use the hardware fall detection logic instead of
-S --software-logic Use the software fall detection logic even if the
-L --no-leds Don't blink the LEDs.
-l --syslog Log to syslog instead of stdout/stderr.
-V --version Display version information and exit.
-h --help Display this message and exit.
You can send SIGUSR1 to deactivate hdapsd for 8 seconds.
Send bugs, comments and suggestions to <email address hidden>
[4]
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
...
nvme0n1 259:0 0 953.9G 0 disk
|-nvme0n1p1 259:1 0 512.1M 0 part /var/lib/
|-nvme0n1p2 259:2 0 4.3G 0 part
`-nvme0n1p3 259:3 0 949G 0 part /var/lib/
tags: | added: oem-priority originate-from-1910194 stella |
Changed in oem-priority: | |
assignee: | nobody → jeremyszu (os369510) |
status: | New → Triaged |
importance: | Undecided → High |
importance: | High → Critical |
tags: | added: originate-from-1929666 |
Changed in plainbox-provider-checkbox: | |
assignee: | nobody → Kent Lin (kent-jclin) |
milestone: | none → 0.66.0 |
tags: | removed: originate-from-1977791 |
Changed in plainbox-provider-checkbox: | |
milestone: | 2.0.0 → 2.1.0 |
Hi Pierre,
could you please help to take a look at this issue?