@@ -22,7 +22,6 @@ package controllers
22
22
23
23
import (
24
24
ctx "context"
25
- "fmt"
26
25
"time"
27
26
28
27
fdbtypes "github.com/FoundationDB/fdb-kubernetes-operator/api/v1beta1"
@@ -49,7 +48,7 @@ func (u UpdatePodConfig) Reconcile(r *FoundationDBClusterReconciler, context ctx
49
48
return false , err
50
49
}
51
50
52
- var errs [] error
51
+ allSynced := true
53
52
// We try to update all instances and if we observe an error we add it to the error list.
54
53
for index := range instances {
55
54
instance := instances [index ]
@@ -59,31 +58,22 @@ func (u UpdatePodConfig) Reconcile(r *FoundationDBClusterReconciler, context ctx
59
58
60
59
synced , err := r .updatePodDynamicConf (cluster , instance )
61
60
if ! synced {
62
- log .Info ("Update dynamic Pod config" , "namespace" , configMap .Namespace , "cluster" , cluster .Name , "processGroupID" , instance .GetInstanceID (), "synced" , synced )
63
- if err != nil {
64
- errs = append (errs , err )
65
- } else {
66
- errs = append (errs , fmt .Errorf ("processGroupID %s not synced" , instance .GetInstanceID ()))
67
- }
68
-
61
+ allSynced = false
62
+ log .Info ("Update dynamic Pod config" , "namespace" , cluster .Namespace , "cluster" , cluster .Name , "processGroupID" , instance .GetInstanceID (), "synced" , synced , "error" , err )
69
63
continue
70
64
}
71
65
72
66
instance .Metadata .Annotations [fdbtypes .LastConfigMapKey ] = configMapHash
73
67
err = r .PodLifecycleManager .UpdateMetadata (r , context , cluster , instance )
74
68
if err != nil {
69
+ allSynced = false
75
70
log .Info ("Update Pod metadata" , "namespace" , configMap .Namespace , "cluster" , cluster .Name , "processGroupID" , instance .GetInstanceID (), "error" , err )
76
- errs = append (errs , err )
77
71
}
78
72
}
79
73
80
- if len (errs ) > 0 {
81
- // If we return an error we don't requeue
82
- // So we just return that we can't continue but don't have an error
83
- return false , nil
84
- }
85
-
86
- return true , nil
74
+ // If we return an error we don't requeue
75
+ // So we just return that we can't continue but don't have an error
76
+ return allSynced , nil
87
77
}
88
78
89
79
// RequeueAfter returns the delay before we should run the reconciliation
0 commit comments