Skip to content
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

Ability to test ZED proper functioning #4511

Closed
Darakko opened this issue Apr 12, 2016 · 6 comments
Closed

Ability to test ZED proper functioning #4511

Darakko opened this issue Apr 12, 2016 · 6 comments
Labels
Component: Test Suite Indicates an issue with the test framework or a test case Type: Feature Feature request or new feature

Comments

@Darakko
Copy link

Darakko commented Apr 12, 2016

When configuring ZED, admins need to be sure it will really trigger the desired alarm when a problem will occur months or years later.

There should be a way to trigger an fake event in order to check if the logs are written and/or if the email is received. This allow to validate the full chain from the event to the final tools used to monitor the health of ZFS.

@alexanderhaensch
Copy link

This is something i would like to see as well. Maybe something like
zpool events -m "Test Message"

Another possibility is to force a failure by for example removing a drive in a raidz setup.

@behlendorf
Copy link
Contributor

We definitely want this ability so we can add additional test coverage which verifies the ZED. @don-brady may have some additional thoughts on this, but my current inclination is to extend zinject which is already used for error injection.

@don-brady
Copy link
Contributor

Confirming that more testing is required for the ZED/zevent stack. We will be adding functional test as part of our ZED related work. Operations like auto-spare, auto-online, auto-replace should be validated start-to-finish during testing.

Looks like there is an ask here for tools to help administrators in validating custom zedlet behavior.

@behlendorf behlendorf added the Component: Test Suite Indicates an issue with the test framework or a test case label Jun 7, 2016
@behlendorf behlendorf added the Type: Feature Feature request or new feature label May 26, 2017
@behlendorf
Copy link
Contributor

Closing. Test coverage for auto-spare, auto-online, auto-replace have all been added to the ZTS. We'll continue to extend the test coverage as needed. As for testing the ZED users can use zinject to simulate failure, this is the same utility which is used by the test suite.

@flaviut
Copy link

flaviut commented Oct 29, 2018

As for testing the ZED users can use zinject to simulate failure, this is the same utility which is used by the test suite.

I looked over the help page for zinject, but unfortunately all this stuff is quite a bit beyond me. Do you have an example command that I can use to test zed that won't break/panic my system?

@cvoltz
Copy link
Contributor

cvoltz commented Oct 29, 2018

Try zinject -d DEVICE -e io -T all -f 100 POOL. That will fail all I/O to the specified DEVICE in the specified POOL 100% of the time until you clear it with a zinject -c all. You'll want to run zpool clear POOL DEVICE afterwards to clear the fault. For example:

# inject fault
zinject -d /dev/sdb -e io -T all -f 100 tank

# verify LED

# clear fault
zinject -c all
zpool clear tank /dev/sdb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Test Suite Indicates an issue with the test framework or a test case Type: Feature Feature request or new feature
Projects
None yet
Development

No branches or pull requests

6 participants