-
Notifications
You must be signed in to change notification settings - Fork 1.4k
support encryption in S3 backup integration test #12264
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
Conversation
Result of foundationdb-pr-clang on Linux RHEL 9
|
Result of foundationdb-pr on Linux RHEL 9
|
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
@laflechejonathan |
Backup integration test changes(supporting encryption) looks great! |
@neethuhaneesha thanks for the review, yep the linked fix should address this issue as well. Would you like me to amend this PR so it just leaves the integration test enhancement? Is there anything I should change so the test actually runs in CI with encryption enabled (it's not obvious to me if this script is run in tests or not, so you'll need to point me in the right direction) |
yes.. please amend the PR to include the changes to integration tests. |
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
fdbbackup/CMakeLists.txt
Outdated
@@ -52,5 +52,5 @@ endif() | |||
if (NOT WIN32 AND NOT OPEN_FOR_IDE) | |||
enable_testing() | |||
add_test(NAME dir_backup_tests COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tests/dir_backup_test.sh ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}) | |||
add_test(NAME s3_backup_tests COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tests/s3_backup_test.sh ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}) | |||
add_test(NAME s3_backup_tests COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tests/s3_backup_test.sh ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} --encrypt) |
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.
It will always test with encrypt mode only @saintstack
Result of foundationdb-pr-clang on Linux RHEL 9
|
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Result of foundationdb-pr on Linux RHEL 9
|
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
fdbbackup/CMakeLists.txt
Outdated
@@ -52,5 +52,5 @@ endif() | |||
if (NOT WIN32 AND NOT OPEN_FOR_IDE) | |||
enable_testing() | |||
add_test(NAME dir_backup_tests COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tests/dir_backup_test.sh ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}) | |||
add_test(NAME s3_backup_tests COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tests/s3_backup_test.sh ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}) | |||
add_test(NAME s3_backup_tests COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tests/s3_backup_test.sh ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} --encrypt) |
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.
Instead of hardcoding to test always with encryption, changing this flag inside the s3_backup_test.sh by randomizing it would be better, so that the testing covers both with and without encryption cases.
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, implemented that suggestion and merged in develop so test should now pass.
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.
Looks good to me! Thanks for making the changes.
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
Result of foundationdb-pr on Linux RHEL 9
|
Result of foundationdb-pr-clang on Linux RHEL 9
|
For Result of foundationdb-pr-clang on Linux RHEL 9 |
Result of foundationdb-pr on Linux RHEL 9:
|
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Result of foundationdb-pr-clang on Linux RHEL 9
|
Result of foundationdb-pr on Linux RHEL 9
|
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
We observe that encrypted backup restores don't work when the
enable_read_cache
knob is enabled. We can reproduce this by modifying the backup integration test to use encryption:We are trying to read a 1-byte file at offset 4096. This occurs when you stack:
read-ahead -> encryption -> s3
. read-ahead has an erroneous line that tries to read past the limit of the file (offset is correct, but length is set to the block size, 1 MB). encryption then slices this 1MB block size into its encryption block size (4KB), it then passes that read down to S3, which throws the error.The proposed fix is to clamp the length correctly when read-ahead cache issues a read.
Code-Reviewer Section
The general pull request guidelines can be found here.
Please check each of the following things and check all boxes before accepting a PR.
For Release-Branches
If this PR is made against a release-branch, please also check the following:
release-branch
ormain
if this is the youngest branch)