-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: Dryrun fails to list some devices #11167
zpool: Dryrun fails to list some devices #11167
Conversation
Regarding the tests, I'm not sure if I should add one and where to put it. |
On Debian 10 one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't worry, the test failures are unrelated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! It's good to see this finally fixed. Regarding where to put a test case for this I'd suggest creating a new tests/functional/cli_root/zpool_create/zpool_create_dryrun.ksh
test case. We already have a similar tests/functional/cli_root/zfs_create/zfs_create_dryrun.ksh
for datasets and this would complement it nicely.
All right, I will add test cases. The |
The drurun test case might need root to check for labels on the block devices or perhaps perform other privileged checks. If needed, I think it'd be fine to put it under |
Putting them under Unfortunately there are still some issues left.
But that should obviously read
So I've to look into this further. I've also seen
I've also seen |
Good finds. Regarding the |
Hah, the order matters then!
That's easy to fix, the missing |
I wonder if we should set the allocations bias on the vdevs splited off regardless of the dryrun setting? Split does the right thing without them though. Any thoughts? Otherwise I think I'm done with the code fixes. Next is adding test cases but it may take a while since I need to get acquainted to the ZTS. |
That code fixes look good, let me know if you have any questions about the ZTS. The usual things to double check when adding a new test are that it's included in the As for setting the allocation bias regardless of dryrun I think we probably want to limit ourselves the fixing the output for this PR. |
Thanks, I'll let you know should I have questions.
Yes, this makes sense. |
@AttilaFueloep any headway? We could probably live without the additional test cases (clearly we didn't have them before), but the |
Sorry for the delay, I'm currently trying to sort out why I'm seeing |
Please rebase before the next push, too. It should resolve the FreeBSD head failure. |
No problem! The most likely reasons I've seen for this are usually either a typo of the test name in the runfile, or incorrect permission bits of the new test case (should be 755), or forgetting to include the new test case in the |
@freqlabs Sure, will do. @behlendorf Thanks Brian, indeed the problem was missing execute permissions on this file. Could have sworn I did a |
Still polishing the tests a bit, going to push later today. |
`zpool create -n` fails to list cache and spare vdevs. `zpool add -n` fails to list spare devices. `zpool split -n` fails to list `special` and `dedup` labels. `zpool add -n` and `zpool split -n` shouldn't list hole devices. Signed-off-by: Attila Fülöp <[email protected]> Closes openzfs#11122
56c1fc9
to
04fe8b0
Compare
Added tests, squashed and rebased. |
tests/zfs-tests/tests/functional/cli_root/zpool_create/cleanup.ksh
Outdated
Show resolved
Hide resolved
# 1. Create a storage pool | ||
# | ||
|
||
typeset dev_size=4M |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4M is below the minimum vdev size. Since this is just a dry-run nothing actually fails, but I'd still suggest bumping this to $SPA_MINDEVSIZE
. Since you're using truncate
to create the file vdevs it won't actually increase the space used by the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intention was indeed to save space, but you're right since this is truncate
it won't waste any space. I somehow missed that fact. Will change back to $SPA_MINDEVSIZE
.
Signed-off-by: Attila Fülöp <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #11167 +/- ##
==========================================
- Coverage 79.87% 79.49% -0.39%
==========================================
Files 400 400
Lines 127524 127524
==========================================
- Hits 101863 101369 -494
- Misses 25661 26155 +494
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Follow up fix for 0cb40fa. Remove unused variables and add missed cleanup. Signed-off-by: Attila Fülöp <[email protected]>
Follow up fix for 0cb40fa. Remove unused variables, don't source unused libs and add missed cleanup. Signed-off-by: Attila Fülöp <[email protected]>
Follow up fix for 0cb40fa. Remove unused variables, don't source unused libs and add missed cleanup. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Attila Fülöp <[email protected]> Closes #11311
`zpool create -n` fails to list cache and spare vdevs. `zpool add -n` fails to list spare devices. `zpool split -n` fails to list `special` and `dedup` labels. `zpool add -n` and `zpool split -n` shouldn't list hole devices. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Attila Fülöp <[email protected]> Closes openzfs#11122 Closes openzfs#11167
Follow up fix for 0cb40fa. Remove unused variables, don't source unused libs and add missed cleanup. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Attila Fülöp <[email protected]> Closes openzfs#11311
@behlendorf Not sure if this and #11311 should be included in a 2.0 / 0.8 point release as well? |
@AttilaFueloep yup, I think they'd make sense for the next 2.0 point release. Would you mind opening a new PR against the zfs-2.0.2-staging branch with both of these changes. |
Sure, will do. |
`zpool create -n` fails to list cache and spare vdevs. `zpool add -n` fails to list spare devices. `zpool split -n` fails to list `special` and `dedup` labels. `zpool add -n` and `zpool split -n` shouldn't list hole devices. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Attila Fülöp <[email protected]> Closes openzfs#11122 Closes openzfs#11167
Follow up fix for 0cb40fa. Remove unused variables, don't source unused libs and add missed cleanup. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Attila Fülöp <[email protected]> Closes openzfs#11311
`zpool create -n` fails to list cache and spare vdevs. `zpool add -n` fails to list spare devices. `zpool split -n` fails to list `special` and `dedup` labels. `zpool add -n` and `zpool split -n` shouldn't list hole devices. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Attila Fülöp <[email protected]> Closes #11122 Closes #11167
Follow up fix for 0cb40fa. Remove unused variables, don't source unused libs and add missed cleanup. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Attila Fülöp <[email protected]> Closes #11311
`zpool create -n` fails to list cache and spare vdevs. `zpool add -n` fails to list spare devices. `zpool split -n` fails to list `special` and `dedup` labels. `zpool add -n` and `zpool split -n` shouldn't list hole devices. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Attila Fülöp <[email protected]> Closes openzfs#11122 Closes openzfs#11167
Follow up fix for 0cb40fa. Remove unused variables, don't source unused libs and add missed cleanup. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Attila Fülöp <[email protected]> Closes openzfs#11311
`zpool create -n` fails to list cache and spare vdevs. `zpool add -n` fails to list spare devices. `zpool split -n` fails to list `special` and `dedup` labels. `zpool add -n` and `zpool split -n` shouldn't list hole devices. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Attila Fülöp <[email protected]> Closes openzfs#11122 Closes openzfs#11167
Follow up fix for 0cb40fa. Remove unused variables, don't source unused libs and add missed cleanup. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Attila Fülöp <[email protected]> Closes openzfs#11311
Motivation and Context
zpool create -n
fails to list cache and spare vdevs andzpool add -n
fails to list spare devices.Description
Add them to the list.
Closes #11122
How Has This Been Tested?
Manually tested.
Types of changes
Checklist:
Signed-off-by
.