Skip to content

Commit

Permalink
fix: restore reconciler
Browse files Browse the repository at this point in the history
Signed-off-by: Anatolii Bazko <[email protected]>
  • Loading branch information
tolusha committed Aug 9, 2021
1 parent 95471df commit a941817
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions controllers/checlusterrestore/checlusterrestore_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,15 @@ func (r *ReconcileCheClusterRestore) doReconcile(restoreCR *chev1.CheClusterRest
return done, err
}

rctx.state.cheRestored = true
rctx.UpdateRestoreStatus()

// Clean up backup data after successful restore
if err := os.RemoveAll(backupDataDestDir); err != nil {
return false, err
}
}

rctx.state.cheRestored = true
// rctx.UpdateRestoreStatus()

rctx.restoreCR.Status.Message = "Restore successfully finished"
rctx.restoreCR.Status.State = chev1.STATE_SUCCEEDED
rctx.restoreCR.Status.Phase = ""
Expand Down Expand Up @@ -247,5 +247,6 @@ func (r *ReconcileCheClusterRestore) UpdateCRStatus(cr *chev1.CheClusterRestore)
logrus.Errorf("Failed to update %s CR status: %s", cr.Name, err.Error())
return err
}
logrus.Infof("Status updated with %v: ", cr.Status)
return nil
}

0 comments on commit a941817

Please sign in to comment.