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

Clearer wording on Errata #4 for non-destructive remedy #8683

Merged
merged 3 commits into from
May 2, 2019

Conversation

JMoVS
Copy link
Contributor

@JMoVS JMoVS commented Apr 29, 2019

Errata #4 doesn’t mention a non-destructive way to clear it. This commits fixes #8682

Motivation and Context

Users of existing pools, especially pools with top-level encrypted datasets could run into trouble trying to work around Errata #4. After @behlendorf's clarification, there is a non-destructive way that is possible. This commit mentions that.

This commit attempts to fix #8682.

Description

Just a documentation change where previous Errata #4 changes were made-

How Has This Been Tested?

only documentation changes, haven't tested them myself.

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)
  • Documentation (a change to man pages or other documentation)

Checklist:

@rlaager
Copy link
Member

rlaager commented Apr 30, 2019

You have this:

Enable the bookmark_v2 feature, backup these datasets to new encrypted datasets, and destroy the old ones or create new snapshots and destroy all snapshots that were created before enabling bookmark_v2.

It wasn't clear to me the precedence of that "or". I read it a couple times and it wasn't making sense, as new datasets wouldn't have snapshots to delete. In reading the referenced issue, it sounds like deleting the snapshots is an alternative to creating new datasets.

Also, from what I can see, creating snapshots is not required to fix the issue. The deletion is the important part.

How about something like this:

Enable the bookmark_v2 feature. Then, copy these datasets to new encrypted datasets, and destroy the old datasets. Alternatively, destroy all snapshots (on encrypted datasets) that were created before enabling bookmark_v2.

Or focus on the snapshot deletion first, which might be even better:

Enable the bookmark_v2 feature. Destroy all snapshots (on encrypted datasets) that were created before enabling bookmark_v2. If preserving those snapshots is required, copy them to new encrypted datasets with zfs send.

@JMoVS
Copy link
Contributor Author

JMoVS commented Apr 30, 2019

Enable the bookmark_v2 feature. Destroy all snapshots (on encrypted datasets) that were created before enabling bookmark_v2. If preserving those snapshots is required, copy them to new encrypted datasets with zfs send.

I like that wording a lot. And you're right: It's about getting rid of existing snapshots.

@rlaager

This comment has been minimized.

@rlaager rlaager added this to the 0.8.0 milestone Apr 30, 2019
@JMoVS JMoVS force-pushed the master branch 2 times, most recently from 165f6b7 to 004156a Compare April 30, 2019 19:10
cmd/zpool/zpool_main.c Outdated Show resolved Hide resolved
cmd/zpool/zpool_main.c Outdated Show resolved Hide resolved
cmd/zpool/zpool_main.c Outdated Show resolved Hide resolved
@JMoVS JMoVS force-pushed the master branch 3 times, most recently from aadb708 to 4fc6790 Compare April 30, 2019 19:54
@JMoVS
Copy link
Contributor Author

JMoVS commented Apr 30, 2019

there's a very weird mixture of tabs vs spaces going on in that code section...

Copy link
Member

@rlaager rlaager left a comment

Choose a reason for hiding this comment

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

The wording sounds good to me. This is an approval for that much.

I have not personally confirmed that deleting snapshots is sufficient. I am relying on the quotes from Brian to that effect.

I also have not personally run this code to verify the zpool status output is correctly line-wrapped and tabbed. @JMoVS, can you paste in an example of the zpool status output?

Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

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

Let's make sure to get @tcaputi's feedback on the updated wording here.

cmd/zpool/zpool_main.c Outdated Show resolved Hide resolved
cmd/zpool/zpool_main.c Outdated Show resolved Hide resolved
Errata openzfs#4 doesn’t mention a non-destructive way to clear it. This commits fixes openzfs#8682.

Signed-off-by: Justin Scholz <git@justinscholz.de>
@JMoVS
Copy link
Contributor Author

JMoVS commented May 1, 2019

The wording sounds good to me. This is an approval for that much.

I have not personally confirmed that deleting snapshots is sufficient. I am relying on the quotes from Brian to that effect.

I also have not personally run this code to verify the zpool status output is correctly line-wrapped and tabbed. @JMoVS, can you paste in an example of the zpool status output?

I verified that getting rid of snapshots (and a subsequent reimport of the pool which is always necessary) was sufficient to get rid of the Errata on O3X (I'm an O3X user). I'll see if I can directly pull in that commit into the O3X codebase and test it directly, otherwise I very welcome if somebody else can more easily confirm correct formatting of the zpool status output ;-)

Copy link
Contributor

@tcaputi tcaputi left a comment

Choose a reason for hiding this comment

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

LGTM. The sentiment here is accurate. The wording feels a little awkward to me, but its not a big deal.

cmd/zpool/zpool_main.c Outdated Show resolved Hide resolved
@tcaputi
Copy link
Contributor

tcaputi commented May 1, 2019

Small correction, any bookmarks created before enabling bookmark_v2 will also need to be destroyed.

@codecov
Copy link

codecov bot commented May 1, 2019

Codecov Report

Merging #8683 into master will decrease coverage by 0.73%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8683      +/-   ##
==========================================
- Coverage   79.34%   78.61%   -0.74%     
==========================================
  Files         262      381     +119     
  Lines       77786   117580   +39794     
==========================================
+ Hits        61723    92434   +30711     
- Misses      16063    25146    +9083
Flag Coverage Δ
#kernel 79.35% <ø> (ø) ⬆️
#user 67% <66.66%> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2a15c00...129e9ee. Read the comment docs.

Signed-off-by: Justin Scholz <git@justinscholz.de>
@JMoVS
Copy link
Contributor Author

JMoVS commented May 1, 2019

@tcaputi I changed it to include bookmarks in the language.

@ALL please check again that I didn't mess it up now. If you want me to rebase and squash it to 1 commit again, let me know. There is a weird mix of tabs and spaces in that code section - I maintained how it was

@behlendorf
Copy link
Contributor

behlendorf commented May 1, 2019

@JMoVS @rlaager @tcaputi I think the proposed wording is a definite improvement but still a little awkward. How about this alternate proposed wording:

"Existing encrypted snapshots and bookmarks contain an on-disk incompatibility. This may cause on-disk corruption if they are used with 'zfs recv'. To correct the issue enable the bookmark_v2 feature. No additional action is needed if there are no encrypted snapshots or bookmarks. If preserving the encrypted snapshots and bookmarks is required use a non-raw send to backup and restore them. Alternately, they may be removed to resolve the incompatibility."

@JMoVS
Copy link
Contributor Author

JMoVS commented May 1, 2019

@JMoVS @rlaager @tcaputi I think the proposed wording is a different improvement but still a little awkward. How about this alternate proposed wording:

"Existing encrypted snapshots and bookmarks contain an on-disk incompatibility. This may cause on-disk corruption if they are used with 'zfs recv'. To correct the issue enable the bookmark_v2 feature. No additional action is needed if there are no encrypted snapshots or bookmarks. If preserving the encrypted snapshots and bookmarks is required use a non-raw send to backup and restore them. Alternately, they may be removed to resolve the incompatibility."

I like it, though my German (not sure if same rules apply in English) mind would put 2 additional commas in:

...To correct the issue[,] enable the bookmark_v2 feature... and If preserving the encrypted snapshots and bookmarks is required[,] use a non-raw send to backup and restore them.

@rlaager
Copy link
Member

rlaager commented May 1, 2019

I agree with adding those commas.

@JMoVS
Copy link
Contributor Author

JMoVS commented May 1, 2019

@rlaager I take that as an "ok go".

@behlendorf I split your text up a bit for the status_callback part as it separates status from action. Aside from that splitting still the exact same text.

And I think I finally figured out the new lines and limited it to 80 characters. Still, please test it.

Signed-off-by: Justin Scholz <git@justinscholz.de>
@JMoVS
Copy link
Contributor Author

JMoVS commented May 1, 2019

ha! This time I even got the STYLE test to give me a green check mark! 💪🏼

Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

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

Thanks!

@behlendorf behlendorf requested a review from tcaputi May 2, 2019 00:46
@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label May 2, 2019
@JMoVS
Copy link
Contributor Author

JMoVS commented May 2, 2019

You’re welcome;-)
Should I squash it down to a single commit or will you squash and merge it?

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels May 2, 2019
@behlendorf behlendorf merged commit b3b6098 into openzfs:master May 2, 2019
allanjude pushed a commit to allanjude/zfs that referenced this pull request Jun 7, 2019
Users of existing pools, especially pools with top-level encrypted 
datasets, could run into trouble trying to work around Errata openzfs#4. 
Clarify that removing encrypted snapshots and bookmarks is enough
to clear the errata.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tom Caputi <tcaputi@datto.com>
Signed-off-by: Justin Scholz <git@justinscholz.de>
Closes openzfs#8682 
Closes openzfs#8683
allanjude pushed a commit to allanjude/zfs that referenced this pull request Jun 15, 2019
Users of existing pools, especially pools with top-level encrypted 
datasets, could run into trouble trying to work around Errata openzfs#4. 
Clarify that removing encrypted snapshots and bookmarks is enough
to clear the errata.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tom Caputi <tcaputi@datto.com>
Signed-off-by: Justin Scholz <git@justinscholz.de>
Closes openzfs#8682 
Closes openzfs#8683
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Errata #4 doesn't mention non-destructive mitigation option
5 participants