-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
zpool state module needs support for disk vdev #34762 #34770
Conversation
I'm okay in adding a disk-X to the state module. But it should not be added to the execution module. I tried to stay as close as possible to the actually underlying cli command. |
Thoughts: Maybe we should do the former for the execution module and the latter for the state module? I agree it would be better if this logic did not get implemented twice; there is some duplication in the state module and execution module, which is bad on DRY principles. |
The checks for vdev type in the execution module for is figuring out to see if we need to check the device is the correct type or not. In the state module it's there to allow for few ways of formatting the layout property. It could probably be swapped for a are.startswith('/') in the execution module. A clean up of the zpool and zfs modules to simplify some bits is near the end of my todo list. It usually involves a good day of testing for some small changes. A unit test set is also on the todo for those, but I've no experience in writing those from scratch. |
@sjorge thanks! I'll rework my changes to the state module. |
Should have been covered in the same 2 PR's. Targeted for 2016.3 branch so @CacheOut or someone will probably forward merge those to develop branch soon. |
Can't edit on mobile it seems, the vdev parsing is now completely gone in both the exec and state module. I did add a tiny bit of glue to allow disk-n in the state module. |
@aphor We do need a rebase on this since it has merge conflicts now. Thanks! |
Hi @aphor Do you want to rebase this or open another PR? Please let me know. Thanks! |
I think this got fixed in geh cleanup and refactoring of the zpool module/state. |
@sjorge So should this PR be closed then? |
The state currently supports disk vdevs in the traditional way or using a helper 'disk-n' type. So I think it can be closed. |
Thanks, @sjorge. |
Support zpool "disk" vdevs with explicit syntax, conforming to the same convention for specifying other vdev types.
Previous Behavior
to make a mirror vdev zpool:
to make a simple disk vpool
to make a striped disk zpool
New Behavior
old behavior still works
to make a simple disk vpool
to make a striped disk zpool
Tests written?
No, but these examples are a good start!
Documentation changes?
Let's see