New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance SMART return code handling #1107

Closed
phillxnet opened this Issue Jan 17, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@phillxnet
Member

phillxnet commented Jan 17, 2016

I have observed another return code from smartctl execution that if not caught leads to a failure to populate the smart tabs when the data is otherwise available and the command also executes as expected. This is akin to the circumstance addressed in pull request #957 only this time the command is:-

smartctl -l selftest -l selective /dev/sdb

and the exit code is 128

$?
-bash: 128: command not found
@phillxnet

This comment has been minimized.

Member

phillxnet commented Jan 17, 2016

I am currently having a quick look at this issue as I was attempting to reproduce an example of the error log used to demonstrate issue #1001 .

phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Jan 17, 2016

isolate return code of 128 in smart -l -selftest probe rockstor#1107
In the case of rc == 128 when executing this probe bypass the
the generic exception thrown by run_command and instead raise
a warning in logs and email root but otherwise retrieve the smart
data. In all other instances of rc != 0 raise a command exception as
before.

phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Jan 17, 2016

abstract screening of smart return codes rockstor#1107
Now that we have 2 instances of having to screen out false
blocking error codes returned from running smart commands
we should abstract the method used to screen them.

phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Jan 17, 2016

use abstract method for existing smart -l error rockstor#1107
Improve clarity of comments on new method.

phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Jan 17, 2016

don't mute exceptions on 'cat' in smart dump read mode rockstor#1107
In smart testmode where we read the contents of file dumps of
smartctl output for parse testing purposes we should not mute
normal exceptions from run_command.

phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Jan 17, 2016

don't break test mode by overly local smart_command def rockstor#1107
When run in test mode our smart_command must still be defined as
we still screen return codes.

@schakrava schakrava closed this in a7d03b7 Jan 24, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment