From e43f6df36febf50eeef9a173a183b5187a950add Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Wei=C3=9Fe?= Date: Tue, 5 Mar 2024 14:54:19 +0100 Subject: [PATCH] [drop] Simulate fatal node join failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Weiße --- bootstrapper/internal/joinclient/joinclient.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bootstrapper/internal/joinclient/joinclient.go b/bootstrapper/internal/joinclient/joinclient.go index b7d21290d..ddcb0a225 100644 --- a/bootstrapper/internal/joinclient/joinclient.go +++ b/bootstrapper/internal/joinclient/joinclient.go @@ -255,6 +255,15 @@ func (c *JoinClient) startNodeAndJoin(ticket *joinproto.IssueJoinTicketResponse, ctx, cancel := context.WithTimeout(context.Background(), c.joinTimeout) defer cancel() + // [REMOVE THIS BLOCK] TEST @daniel-weisse + if true { + c.log.Error("Simulating fatal node failure...") + c.log.Error("Returning error from startNodeAndJoin in 1 Minute...") + time.Sleep(1 * time.Minute) + return errors.New("simulated fatal node failure") + } + // [REMOVE THIS BLOCK] TEST @daniel-weisse + clusterID, err := attestation.DeriveClusterID(ticket.MeasurementSecret, ticket.MeasurementSalt) if err != nil { return err