Include note if attributes fail mid-diagnostics
This commit is contained in:
parent
812fd15011
commit
ce8dddd9b7
1 changed files with 17 additions and 4 deletions
|
|
@ -176,6 +176,13 @@ class State():
|
||||||
if 'Disk Attributes' in disk.tests:
|
if 'Disk Attributes' in disk.tests:
|
||||||
disk.tests['Disk Attributes'].failed = True
|
disk.tests['Disk Attributes'].failed = True
|
||||||
disk.tests['Disk Attributes'].set_status('Failed')
|
disk.tests['Disk Attributes'].set_status('Failed')
|
||||||
|
if not prep:
|
||||||
|
# Mid-diag failure detected
|
||||||
|
LOG.warning('Critical hardware error detected during diagnostics')
|
||||||
|
disk.add_note(
|
||||||
|
'Critical hardware error detected during diagnostics',
|
||||||
|
'YELLOW',
|
||||||
|
)
|
||||||
except hw_obj.SMARTSelfTestInProgressError as err:
|
except hw_obj.SMARTSelfTestInProgressError as err:
|
||||||
if prep:
|
if prep:
|
||||||
std.print_warning(f'SMART self-test(s) in progress for {disk.path}')
|
std.print_warning(f'SMART self-test(s) in progress for {disk.path}')
|
||||||
|
|
@ -198,12 +205,18 @@ class State():
|
||||||
std.color_string('Please manually review SMART data', 'YELLOW'),
|
std.color_string('Please manually review SMART data', 'YELLOW'),
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
# No blocking errors encountered, check for minor attribute failures
|
if (
|
||||||
if ('Disk Attributes' in disk.tests
|
'Disk Attributes' in disk.tests
|
||||||
and not disk.tests['Disk Attributes'].failed
|
and not disk.tests['Disk Attributes'].failed
|
||||||
and not disk.check_attributes(only_blocking=False)):
|
and not disk.check_attributes(only_blocking=False)):
|
||||||
# Mid-diag failure detected
|
# No blocking errors encountered, but found minor attribute failures
|
||||||
LOG.warning('Disk attributes failure detected during diagnostics')
|
if not prep:
|
||||||
|
# Mid-diag failure detected
|
||||||
|
LOG.warning('Attribute(s) failure detected during diagnostics')
|
||||||
|
disk.add_note(
|
||||||
|
'Attribute(s) failure detected during diagnostics',
|
||||||
|
'YELLOW',
|
||||||
|
)
|
||||||
disk.tests['Disk Attributes'].failed = True
|
disk.tests['Disk Attributes'].failed = True
|
||||||
disk.tests['Disk Attributes'].set_status('Failed')
|
disk.tests['Disk Attributes'].set_status('Failed')
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue