plugin_disk: disabled both set_apm, set_spindown if there is no hdparm
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
parent
f35bdee22e
commit
468c12502e
1 changed files with 3 additions and 2 deletions
|
|
@ -113,8 +113,9 @@ class DiskPlugin(hotplug.Plugin):
|
|||
if rc == 0:
|
||||
cnt = 0
|
||||
elif rc == errno.ENOENT:
|
||||
cnt = consts.ERROR_THRESHOLD + 1
|
||||
log.info("hdparm command not found, ignoring future set_%s commands" % s)
|
||||
self._spindown_errcnt = self._apm_errcnt = consts.ERROR_THRESHOLD + 1
|
||||
log.info("hdparm command not found, ignoring future set_apm / set_spindown commands")
|
||||
return
|
||||
else:
|
||||
cnt += 1
|
||||
if cnt == consts.ERROR_THRESHOLD:
|
||||
|
|
|
|||
Loading…
Reference in a new issue