Skip to content

Commit 84a29e4

Browse files
jharrodclintonk
andauthored
update backend status during reconcile
Co-authored-by: Clinton Knight <[email protected]> Handle backends going online/offline
1 parent 76e9905 commit 84a29e4

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

core/concurrent_core.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5365,6 +5365,7 @@ func (o *ConcurrentTridentOrchestrator) reconcileBackendState(ctx context.Contex
53655365
return dbErr
53665366
}
53675367
backend = results[0].Backend.Read
5368+
upserter := results[0].Backend.Upsert
53685369

53695370
if backend == nil {
53705371
return errors.NotFoundError("backend '%s' not found", backendUUID)
@@ -5378,6 +5379,7 @@ func (o *ConcurrentTridentOrchestrator) reconcileBackendState(ctx context.Contex
53785379
}
53795380

53805381
backend.UpdateBackendState(ctx, reason)
5382+
upserter(backend)
53815383

53825384
logFields := LogFields{
53835385
"backend": backend.Name(),

core/orchestrator_core.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5834,6 +5834,7 @@ func (o *TridentOrchestrator) reconcileBackendState(ctx context.Context, b stora
58345834
defer o.updateMetrics()
58355835

58365836
reason, changeMap := b.GetBackendState(ctx)
5837+
b.UpdateBackendState(ctx, reason)
58375838

58385839
if changeMap != nil {
58395840
if changeMap.Contains(storage.BackendStateReasonChange) {

0 commit comments

Comments
 (0)