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

Don't bomb out when using keylocation=file:// #11651

Merged
merged 1 commit into from
Mar 3, 2021

Conversation

abrasive
Copy link
Contributor

Motivation and Context

When attempting to receive to an encrypted dataset, using the incantation from man zfs-send:

# zfs send tank/test@snap1 | zfs recv -o encryption=on -o keyformat=passphrase -o keylocation=file:///path/to/keyfile

I received the error "URI scheme is not supported" and the receive process exited with an error. Looking at the code it always follows the error path.

Description

This patch avoids the error path if the operation succeeded.

How Has This Been Tested?

This has been tested on zfs 2.0.3.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

Avoid following the error path when the operation in fact succeeded.

Signed-off-by: James Wah <james@laird-wah.net>
@ghost ghost added Component: Userspace user space functionality Status: Code Review Needed Ready for review and testing labels Feb 25, 2021
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surprising! I thought we had tests for this.

@behlendorf
Copy link
Contributor

@jasonbking would you mind taking a look at this.

@behlendorf behlendorf merged commit 92fb29b into openzfs:master Mar 3, 2021
behlendorf pushed a commit that referenced this pull request Mar 5, 2021
Avoid following the error path when the operation in fact succeeded.

Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: James Wah <james@laird-wah.net>
Closes #11651
jsai20 pushed a commit to jsai20/zfs that referenced this pull request Mar 30, 2021
Avoid following the error path when the operation in fact succeeded.

Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: James Wah <james@laird-wah.net>
Closes openzfs#11651
sempervictus pushed a commit to sempervictus/zfs that referenced this pull request May 31, 2021
Avoid following the error path when the operation in fact succeeded.

Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: James Wah <james@laird-wah.net>
Closes openzfs#11651
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Userspace user space functionality Status: Code Review Needed Ready for review and testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants