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

storage: testing of FIPS compliant build #97428

Closed
nicktrav opened this issue Feb 21, 2023 · 3 comments
Closed

storage: testing of FIPS compliant build #97428

nicktrav opened this issue Feb 21, 2023 · 3 comments
Assignees
Labels
A-storage Relating to our storage engine (Pebble) on-disk storage. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-storage Storage Team

Comments

@nicktrav
Copy link
Collaborator

nicktrav commented Feb 21, 2023

Is your feature request related to a problem? Please describe.

We're investigating a FIPS compliant build of CRDB. Such a build, given the changes to the Go runtime and encryption libraries, could have an impact on encryption codepaths, which would could affect the performance of Encryption-At-Rest (EAR).

Describe the solution you'd like

Sanity check the FIPS build to ensure it is performant w.r.t. non FIPS builds. All existing Storage unit- and roachtest should be passing.

Additional context

More context can be found here (internal link).

Jira issue: CRDB-24691

Epic DEVINF-478

@nicktrav nicktrav added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-storage Relating to our storage engine (Pebble) on-disk storage. T-storage Storage Team labels Feb 21, 2023
@nicktrav nicktrav self-assigned this Mar 13, 2023
@nicktrav
Copy link
Collaborator Author

nicktrav commented Mar 13, 2023

As an initial sanity check, I built a FIPS binary and kicked off a clearrange run that forced EAR:

diff --git a/pkg/cmd/roachtest/tests/clearrange.go b/pkg/cmd/roachtest/tests/clearrange.go
index 6e622cd71bb..229c6228116 100644
--- a/pkg/cmd/roachtest/tests/clearrange.go
+++ b/pkg/cmd/roachtest/tests/clearrange.go
@@ -40,6 +40,7 @@ func registerClearRange(r registry.Registry) {
                                Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
                                        runClearRange(ctx, t, c, checks, rangeTombstones)
                                },
+                               EncryptionSupport: registry.EncryptionAlwaysEnabled,
                        })

                        // Using a separate clearrange test on zfs instead of randomly
# Build cockroach.
$ ./dev build --cross=linuxfips

# Build auxiliary binaries.
$ ./dev build roachprod
$ ./dev build roachtest
$ ./dev build workload

# Run clearrange.
$ ./bin/roachtest run clearrange/checks=true/rangeTs=false --cockroach ./artifacts/cockroach --workload ./bin/workload

I'll report back.

Eventually, these tests roachtests will be run at some cadence to provide coverage. That work is being tracked in DEVINF-675.

@nicktrav
Copy link
Collaborator Author

Looks good so far:

nickt@gceworker-nickt:~/go/src/github.com/cockroachdb/cockroach$ ./bin/roachtest run clearrange/checks=true/rangeTs=false --cockroach ./artifacts/cockroach --workload ./bin/workload
HTTP server listening on all network interfaces, port 8080.
23:22:55 main.go:569: test runner logs in: artifacts/_runner-logs/test_runner-1678749775.log
test runner logs in: artifacts/_runner-logs/test_runner-1678749775.log
23:22:55 test_runner.go:1221: [w0] Selected test: clearrange/checks=true/rangeTs=false run: 1.
23:22:55 test_runner.go:430: [w0] Creating new cluster for test clearrange/checks=true/rangeTs=false: n10cpu16
...
01:20:07 roachprod.go:1192: OK
01:20:07 cluster.go:1607: [w0] destroying cluster nickt-1678749775-01-n10cpu16 [tag:] (10 nodes)... done
01:20:07 test_runner.go:570: [w0] no work remaining; runWorker is bailing out...
no work remaining; runWorker is bailing out...
01:20:07 test_runner.go:522: [w0] Worker exiting; destroying cluster.
01:20:07 test_runner.go:343: PASS
PASS

I shall run all of the clearrange tests now.

@nicktrav
Copy link
Collaborator Author

I did a few more runs of the above, without issue.

Going to close this out as we've done our sense checking of the EAR functionality with the FIPS build. We're expecting DEVINF-675 to help shake out bugs via automated tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-storage Relating to our storage engine (Pebble) on-disk storage. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-storage Storage Team
Projects
No open projects
Archived in project
Development

No branches or pull requests

1 participant