Skip to content

On some systems daemons wont look at '/usr/sbin/smartctl'  #90

@dann1kid

Description

@dann1kid

Describe the bug
Using systemd daemon from root does not see the location of smartctl.
If you specify SMARTCTL_PATH manually, it works

Raw outputs

ноя 05 14:13:50 localhost.localdomain python[970628]:   File "/opt/client/.venv/lib/python3.8/site-packages/apscheduler/executors/base.py", line 125, in run_job
ноя 05 14:13:50 localhost.localdomain python[970628]:     retval = job.func(*job.args, **job.kwargs)
ноя 05 14:13:50 localhost.localdomain python[970628]:   File "/opt/client/redadm_client/adapters/inventorisation/inventrorisation.py", line 144, in push_report_broker
ноя 05 14:13:50 localhost.localdomain python[970628]:     data = R8DataCollector().collect_data()
ноя 05 14:13:50 localhost.localdomain python[970628]:   File "/opt/client/redadm_client/adapters/inventorisation/inventrorisation.py", line 129, in collect_data
ноя 05 14:13:50 localhost.localdomain python[970628]:     hdd_data = self.hdd_data_index()
ноя 05 14:13:50 localhost.localdomain python[970628]:   File "/opt/client/redadm_client/adapters/inventorisation/inventrorisation.py", line 52, in hdd_data_index
ноя 05 14:13:50 localhost.localdomain python[970628]:     data = DeviceList()
ноя 05 14:13:50 localhost.localdomain python[970628]:   File "/opt/client/.venv/lib/python3.8/site-packages/pySMART/device_list.py", line 64, in __init__
ноя 05 14:13:50 localhost.localdomain python[970628]:     self.initialize(catch_errors)
ноя 05 14:13:50 localhost.localdomain python[970628]:   File "/opt/client/.venv/lib/python3.8/site-packages/pySMART/device_list.py", line 113, in initialize
ноя 05 14:13:50 localhost.localdomain python[970628]:     for line in self.smartctl.scan():
ноя 05 14:13:50 localhost.localdomain python[970628]:   File "/opt/client/.venv/lib/python3.8/site-packages/pySMART/smartctl.py", line 191, in scan
ноя 05 14:13:50 localhost.localdomain python[970628]:     return self.generic_call(['--scan-open'])[0]
ноя 05 14:13:50 localhost.localdomain python[970628]:   File "/opt/client/.venv/lib/python3.8/site-packages/pySMART/smartctl.py", line 102, in generic_call
ноя 05 14:13:50 localhost.localdomain python[970628]:     raise FileNotFoundError("Command smartctl doesn't exist!")
ноя 05 14:13:50 localhost.localdomain python[970628]: FileNotFoundError: Command smartctl doesn't exist!
ноя 05 14:13:52 localhost.localdomain python[970628]: time     : [2024-11-05 14:13:52]

on call DeviceList()

Environmental setup:

  • smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.34-1.red80.x86_64] (local build)
  • pySMART-1.3.0

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions