Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/agent/svid/rotator.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ func (r *rotator) runRotation(ctx context.Context) error {
err := r.rotateSVID(ctx)

switch {
case err != nil && rotationutil.X509Expired(r.clk.Now(), r.state.Value().(State).SVID[0]):
r.c.Log.WithError(err).Error("Could not rotate agent SVID")
// Since our X509 cert has expired, and we weren't able to carry out a rotation request, we're probably unrecoverable without re-attesting.
return fmt.Errorf("current SVID has already expired and rotation failed: %v", err)
case err != nil && nodeutil.ShouldAgentReattest(err):
r.c.Log.WithError(err).Error("Could not rotate agent SVID")
return err
Expand Down