-
Notifications
You must be signed in to change notification settings - Fork 553
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
rpk: replace usage of md5 with sha256 in generating filename backup hash #17568
rpk: replace usage of md5 with sha256 in generating filename backup hash #17568
Conversation
No functionality change, just test refactor.
No functionality change, just test refactor.
No functionality change, just test refactor.
No functionality change, just test refactor.
No functionality change, just ensuring consistency in behaviour so a static golden file can be used to validate.
No functionality change, just test refactor.
No functionality change, just test refactor.
No functionality change, just test refactor.
No functionality change, just test refactor.
No functionality change, just test refactor.
68b4b4d
to
7fdaad4
Compare
@@ -83,28 +83,28 @@ func WriteBytes(fs afero.Fs, bs []byte, path string) (int, error) { | |||
return len(bs), afero.WriteFile(fs, path, bs, 0o600) | |||
} | |||
|
|||
func FileMd5(fs afero.Fs, filePath string) (string, error) { |
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.
this is the only golang exported function that changed name. changed from FileMd5
to FilenameHash
. from search in redpanda-data org, doesn't look like it is used anywhere.
tests are passing. ready for review. |
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.
+1 for Go changes
(don't know what the grub stuff is)
Are there any concerns about upgrades with existing files on disk? Do existing backups need to be modified with the new hash? |
@twmb i kept the test cases in
example output:
|
@deniscoady i don't believe so. it seems |
ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/47300#018ea4c6-2c78-4a72-a0b4-b6e3496e9e32 |
issue https://redpandadata.atlassian.net/browse/PESDLC-1040
when
rpk
does a backup on files that it modifies, e.g./etc/default/grub
files, the original file was copied to a new filename with a hash usingmd5
, e.g./etc/default/grub.vectorized.2c349a84043328ae3a9f2d021ff143c3.bk
. Now they will usesha256
so the hash portion will likely look different, e.g./etc/default/grub.vectorized.9be9f2dfe19f13b03e09fcc75648d4ec.bk
.Backports Required
Release Notes
Improvements