move SMART error handling into get_disks

because we never ever want to die in get_disks because of a
single disk, but the nodes/xyz/disks/smart API path is
allowed to fail if a disk device is unsupported by smartctl
or something else goes wrong.
This commit is contained in:
Fabian Grünbichler
2016-09-28 13:42:22 +02:00
committed by Dietmar Maurer
parent d547f26c7d
commit acd3d91649
2 changed files with 34 additions and 35 deletions

View File

@ -138,6 +138,8 @@ __PACKAGE__->register_method ({
$result = PVE::Diskmanage::get_smart_data($disk);
}
$result->{health} = 'UNKOWN' if !defined $result->{health};
return $result;
}});