constellation/bootstrapper/internal/initserver/BUILD.bazel
Daniel Weiße 1077b7a48e
bootstrapper: wipe disk and reboot on non-recoverable error (#2971)
* Let JoinClient return fatal errors
* Mark disk for wiping if JoinClient or InitServer return errors
* Reboot system if bootstrapper detects an error
* Refactor joinClient start/stop implementation
* Fix joining nodes retrying kubeadm 3 times in all cases
* Write non-recoverable failures to syslog before rebooting

---------

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
2024-03-12 11:43:38 +01:00

58 lines
1.7 KiB
Python

load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("//bazel/go:go_test.bzl", "go_test")
go_library(
name = "initserver",
srcs = ["initserver.go"],
importpath = "github.com/edgelesssys/constellation/v2/bootstrapper/internal/initserver",
visibility = ["//bootstrapper:__subpackages__"],
deps = [
"//bootstrapper/initproto",
"//bootstrapper/internal/journald",
"//internal/atls",
"//internal/attestation",
"//internal/crypto",
"//internal/file",
"//internal/grpc/atlscredentials",
"//internal/grpc/grpclog",
"//internal/kms/kms",
"//internal/kms/setup",
"//internal/logger",
"//internal/nodestate",
"//internal/role",
"//internal/versions/components",
"@org_golang_google_grpc//:go_default_library",
"@org_golang_google_grpc//codes",
"@org_golang_google_grpc//keepalive",
"@org_golang_google_grpc//status",
"@org_golang_x_crypto//bcrypt",
],
)
go_test(
name = "initserver_test",
srcs = ["initserver_test.go"],
embed = [":initserver"],
# keep
pure = "on",
# keep
race = "off",
deps = [
"//bootstrapper/initproto",
"//internal/atls",
"//internal/attestation/variant",
"//internal/crypto/testvector",
"//internal/file",
"//internal/kms/setup",
"//internal/kms/uri",
"//internal/logger",
"//internal/versions/components",
"@com_github_spf13_afero//:afero",
"@com_github_stretchr_testify//assert",
"@com_github_stretchr_testify//require",
"@org_golang_google_grpc//:go_default_library",
"@org_golang_x_crypto//bcrypt",
"@org_uber_go_goleak//:goleak",
],
)