Draggon / hassio-hdd-tools

27 stars 13 forks source link

Addon has stopped working with supervisor update to 2021.02.11 #12

Closed nepozs closed 3 years ago

nepozs commented 3 years ago

It looks like this issue is connected with "deprecated add-on config": https://github.com/Draggon/hassio-hdd-tools/issues/9

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[Fri Feb 19 21:28:24 CET 2021][Info] HDD Tools start
[Fri Feb 19 21:28:24 CET 2021][Info] Configuration - performance check enabled: false
[Fri Feb 19 21:28:24 CET 2021][Info] Configuration - disk path: /dev/sda
[Fri Feb 19 21:28:24 CET 2021][Info] Configuration - check period: 1
[Fri Feb 19 21:28:24 CET 2021][Info] Configuration - output file: temp.log
[Fri Feb 19 21:28:24 CET 2021][Info] Configuration - attributes property: ata_smart_attributes.table
[Fri Feb 19 21:28:24 CET 2021][Info] Init run
jq: error (at <stdin>:1): Cannot iterate over null (null)
jq: error (at <stdin>:1): null (null) has no keys
jq: error: syntax error, unexpected $end (Unix shell quoting issues?) at <top-level>, line 1:
.attributes +=               
jq: 1 compile error
[Fri Feb 19 21:28:25 CET 2021][INFO] Sensor value: null°
[Fri Feb 19 21:28:25 CET 2021][DEBUG] Sensor data which would be pushed to home-assistant and exposed as "sensor.hdd_temp": 
[Fri Feb 19 21:28:25 CET 2021][DEBUG] debug is enabled, sensor data is not published to home-assistant!
[Fri Feb 19 21:28:25 CET 2021][Info] Cron tab update
[Fri Feb 19 21:28:25 CET 2021][Info] Apply cron tab
[Fri Feb 19 21:28:25 CET 2021][Info] Device /dev/sda found - staring CRON

System Health

version core-2021.2.3
installation_type Home Assistant OS
dev false
hassio true
docker true
virtualenv false
python_version 3.8.7
os_name Linux
os_version 5.4.94
arch x86_64
timezone Europe/Warsaw
Home Assistant Community Store GitHub API | ok -- | -- Github API Calls Remaining | 3792 Installed Version | 1.11.3 Stage | running Available Repositories | 815 Installed Repositories | 67
AccuWeather can_reach_server | ok -- | -- remaining_requests | 49
Airly can_reach_server | ok -- | --
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Hass.io host_os | Home Assistant OS 5.11 -- | -- update_channel | stable supervisor_version | supervisor-2021.02.11 docker_version | 19.03.13 disk_total | 219.4 GB disk_used | 27.9 GB healthy | true supported | true board | intel-nuc supervisor_api | ok version_api | ok installed_addons | Home Assistant Google Drive Backup (0.103.1), Log Viewer (0.9.1), Check Home Assistant configuration (3.6.0), chrony (2.0.0), Samba share (9.3.0), Terminal & SSH (9.0.1), motionEye (0.11.0), AppDaemon 3 (5.0.1), ESPHome (1.16.1), Example (4.0.4), Node-RED (8.1.1), Bitwarden RS (0.8.0), ESPHome (dev) (dev), Glances (0.11.1), Grocy (0.11.0), Folding@home (0.2.0), File editor (5.2.0), Spotify Connect (0.8.2), Portainer (1.4.0), ZeroTier One (0.10.3), Mosquitto broker (5.1), ADB - Android Debug Bridge (0.7.0), FTP (4.0.1), SSH & Web Terminal (8.0.2), Local VLC (18), HDD Tools (0.46)
Lovelace dashboards | 2 -- | -- resources | 36 views | 19 mode | storage
McGiverGim commented 3 years ago

True. Same error here.

McGiverGim commented 3 years ago

The log files produces this:

{
  "json_format_version": [
    1,
    0
  ],
  "smartctl": {
    "version": [
      7,
      2
    ],
    "svn_revision": "5155",
    "platform_info": "aarch64-linux-5.4.83-v8",
    "build_info": "(local build)",
    "argv": [
      "smartctl",
      "-a",
      "--json",
      "/dev/sda"
    ],
    "exit_status": 2
  },
  "device": {
    "name": "/dev/sda",
    "info_name": "/dev/sda [SAT]",
    "type": "sat",
    "protocol": "ATA"
  }
}

The exit status 2, if I'm not wrong:

Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data structure (see '-b' option above).

Maybe it is related to this: https://github.com/Draggon/hassio-hdd-tools/issues/9

The devices configuration is deprecated and maybe it works again after fixing that.

McGiverGim commented 3 years ago

It seems simply since the change of the supervisor something has changed in the permissions to the device:

ash-5.1# smartctl -a /dev/sda
smartctl 7.2 2020-12-30 r5155 [aarch64-linux-5.4.83-v8] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

Read Device Identity failed: Operation not permitted

I don't know what needs to be changed to fix this...