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

zfs promote of encrypted clone outside its encryption root gives bad error message #8905

Closed
DeHackEd opened this issue Jun 14, 2019 · 2 comments · Fixed by #8935
Closed

zfs promote of encrypted clone outside its encryption root gives bad error message #8905

DeHackEd opened this issue Jun 14, 2019 · 2 comments · Fixed by #8935
Labels
Component: Encryption "native encryption" feature

Comments

@DeHackEd
Copy link
Contributor

System information

Type Version/Name
Distribution Name CentOS
Distribution Version 7.x
Linux Kernel 3.10.0-957.12.2.el7.x86_64
Architecture x86_64
ZFS Version 0.8.0-17_g2409be0 (c3e5907 + #8766 cherry-picked)
SPL Version (included)

Describe the problem you're observing

# zfs create -o keyformat=passphrase -o encryption=on tank/encroottest
Enter passphrase: 
Re-enter passphrase: 
# zfs create tank/encroottest/testchild
# zfs snapshot tank/encroottest/testchild@snap1
# zfs clone tank/encroottest/testchild@snap1 tank/testclone
# zfs promote tank/testclone
cannot promote 'tank/testclone': dataset does not exist

Wait, what?

But if I move it to be a child of its encrypted root:

# zfs rename tank/testclone tank/encroottest/testchild2
# zfs promote tank/encroottest/testchild2

Success

I could not find anything obvious in the man page saying this wasn't allowed or that encrypted datasets need to be children of their encryption root or strictly clones of such a thing.

Describe how to reproduce the problem

See above

Include any warning/errors/backtraces from the system logs

Nothing applicable

@behlendorf behlendorf added the Component: Encryption "native encryption" feature label Jun 14, 2019
@tcaputi
Copy link
Contributor

tcaputi commented Jun 19, 2019

The test case is in there, but it does not check the error message. This should be an easy fix.

behlendorf pushed a commit that referenced this issue Jun 24, 2019
This patch corrects the error message reported when attempting
to promote a dataset outside of its encryption root.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #8905 
Closes #8935
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Aug 13, 2019
This patch corrects the error message reported when attempting
to promote a dataset outside of its encryption root.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes openzfs#8905
Closes openzfs#8935
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Aug 22, 2019
This patch corrects the error message reported when attempting
to promote a dataset outside of its encryption root.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes openzfs#8905
Closes openzfs#8935
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Aug 23, 2019
This patch corrects the error message reported when attempting
to promote a dataset outside of its encryption root.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes openzfs#8905
Closes openzfs#8935
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Sep 17, 2019
This patch corrects the error message reported when attempting
to promote a dataset outside of its encryption root.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes openzfs#8905
Closes openzfs#8935
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Sep 18, 2019
This patch corrects the error message reported when attempting
to promote a dataset outside of its encryption root.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes openzfs#8905
Closes openzfs#8935
tonyhutter pushed a commit that referenced this issue Sep 26, 2019
This patch corrects the error message reported when attempting
to promote a dataset outside of its encryption root.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #8905
Closes #8935
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Encryption "native encryption" feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@behlendorf @DeHackEd @tcaputi and others