From e48e1d78783cf663d7600686489f558f28adaaaf Mon Sep 17 00:00:00 2001 From: Balazs Nadasdi Date: Mon, 15 Nov 2021 11:14:04 +0100 Subject: [PATCH] Stop hard failing resync on boot If one fails, we can still listen on new requests and reconcile vms, if they are failing always, the retry logic will handle this. --- core/steps/microvm/start.go | 2 +- infrastructure/controllers/microvm_controller.go | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/steps/microvm/start.go b/core/steps/microvm/start.go index f0b55f89..013dcf40 100644 --- a/core/steps/microvm/start.go +++ b/core/steps/microvm/start.go @@ -14,7 +14,7 @@ import ( "github.com/weaveworks/flintlock/pkg/planner" ) -const waitToBoot = 10 +const waitToBoot = 5 func NewStartStep(vm *models.MicroVM, vmSvc ports.MicroVMService) planner.Procedure { return &startStep{ diff --git a/infrastructure/controllers/microvm_controller.go b/infrastructure/controllers/microvm_controller.go index 2aca33fc..e34ae14f 100644 --- a/infrastructure/controllers/microvm_controller.go +++ b/infrastructure/controllers/microvm_controller.go @@ -48,7 +48,10 @@ func (r *MicroVMController) Run(ctx context.Context, if resyncOnStart { if err := r.resyncSpecs(ctx, logger); err != nil { - return fmt.Errorf("resyncing specs on start: %w", err) + // Do not return here, if one fails, we can still listen on + // new requests and reconcile vms, if they are failing always, + // the retry logic will handle this. + logger.Errorf("resyncing specs on start: %s", err.Error()) } }