File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -796,7 +796,7 @@ func (r *PerconaServerMySQLReconciler) reconcileOrchestrator(ctx context.Context
796
796
if err != nil {
797
797
return nil
798
798
}
799
- g , gCtx := errgroup .WithContext (context . Background () )
799
+ g , gCtx := errgroup .WithContext (ctx )
800
800
801
801
if len (raftNodes ) > len (existingNodes ) {
802
802
newPeers := util .Difference (raftNodes , existingNodes )
@@ -808,7 +808,9 @@ func (r *PerconaServerMySQLReconciler) reconcileOrchestrator(ctx context.Context
808
808
})
809
809
}
810
810
811
- log .Error (g .Wait (), "Orchestrator add peers" , "peers" , newPeers )
811
+ if err := g .Wait (); err != nil && ! cr .Spec .Pause {
812
+ log .Error (err , "Orchestrator add peers" , "peers" , newPeers )
813
+ }
812
814
} else {
813
815
oldPeers := util .Difference (existingNodes , raftNodes )
814
816
@@ -819,7 +821,9 @@ func (r *PerconaServerMySQLReconciler) reconcileOrchestrator(ctx context.Context
819
821
})
820
822
}
821
823
822
- log .Error (g .Wait (), "Orchestrator remove peers" , "peers" , oldPeers )
824
+ if err := g .Wait (); err != nil && ! cr .Spec .Pause {
825
+ log .Error (err , "Orchestrator remove peers" , "peers" , oldPeers )
826
+ }
823
827
}
824
828
825
829
return nil
You can’t perform that action at this time.
0 commit comments