@@ -1041,7 +1041,7 @@ func (r *PostgresReconciler) checkAndUpdatePatroniReplicationConfig(log logr.Log
1041
1041
if len (leaderPods .Items ) != 1 {
1042
1042
log .V (debugLogLevel ).Info ("expected exactly one leader pod, selecting all spilo pods as a last resort (might be ok if it is still creating)" )
1043
1043
// To make sure any updates to the Zalando postgresql manifest are written, we do not requeue in this case
1044
- return allDone , r .updatePatroniReplicationConfigOnAllPods (log , ctx , instance )
1044
+ return requeueAfterReconcile , r .updatePatroniReplicationConfigOnAllPods (log , ctx , instance )
1045
1045
}
1046
1046
leaderIP := leaderPods .Items [0 ].Status .PodIP
1047
1047
@@ -1058,18 +1058,18 @@ func (r *PostgresReconciler) checkAndUpdatePatroniReplicationConfig(log logr.Log
1058
1058
1059
1059
if instance .IsReplicationPrimary () {
1060
1060
if resp .StandbyCluster != nil {
1061
- log .V (debugLogLevel ).Info ("standby_cluster mistmatch , requeing" , "response" , resp )
1061
+ log .V (debugLogLevel ).Info ("standby_cluster mismatch , requeing" , "response" , resp )
1062
1062
return requeueAfterReconcile , nil
1063
1063
}
1064
1064
if instance .Spec .PostgresConnection .SynchronousReplication {
1065
1065
if resp .SynchronousNodesAdditional == nil || * resp .SynchronousNodesAdditional != instance .Spec .PostgresConnection .ConnectedPostgresID {
1066
- log .V (debugLogLevel ).Info ("synchronous_nodes_additional mistmatch , updating" , "response" , resp )
1067
- return allDone , r .httpPatchPatroni (log , ctx , instance , leaderIP )
1066
+ log .V (debugLogLevel ).Info ("synchronous_nodes_additional mismatch , updating and requeing " , "response" , resp )
1067
+ return requeueAfterReconcile , r .httpPatchPatroni (log , ctx , instance , leaderIP )
1068
1068
}
1069
1069
} else {
1070
1070
if resp .SynchronousNodesAdditional != nil {
1071
- log .V (debugLogLevel ).Info ("synchronous_nodes_additional mistmatch , updating" , "response" , resp )
1072
- return allDone , r .httpPatchPatroni (log , ctx , instance , leaderIP )
1071
+ log .V (debugLogLevel ).Info ("synchronous_nodes_additional mismatch , updating and requeing " , "response" , resp )
1072
+ return requeueAfterReconcile , r .httpPatchPatroni (log , ctx , instance , leaderIP )
1073
1073
}
1074
1074
}
1075
1075
@@ -1079,23 +1079,23 @@ func (r *PostgresReconciler) checkAndUpdatePatroniReplicationConfig(log logr.Log
1079
1079
return requeueAfterReconcile , nil
1080
1080
}
1081
1081
if resp .StandbyCluster .ApplicationName != instance .ObjectMeta .Name {
1082
- log .V (debugLogLevel ).Info ("application_name mismatch, updating" , "response" , resp )
1083
- return allDone , r .httpPatchPatroni (log , ctx , instance , leaderIP )
1082
+ log .V (debugLogLevel ).Info ("application_name mismatch, updating and requeing " , "response" , resp )
1083
+ return requeueAfterReconcile , r .httpPatchPatroni (log , ctx , instance , leaderIP )
1084
1084
}
1085
1085
if resp .SynchronousNodesAdditional != nil {
1086
- log .V (debugLogLevel ).Info ("synchronous_nodes_additional mistmatch , updating" , "response" , resp )
1087
- return allDone , r .httpPatchPatroni (log , ctx , instance , leaderIP )
1086
+ log .V (debugLogLevel ).Info ("synchronous_nodes_additional mismatch , updating and requeing " , "response" , resp )
1087
+ return requeueAfterReconcile , r .httpPatchPatroni (log , ctx , instance , leaderIP )
1088
1088
}
1089
1089
if resp .StandbyCluster .CreateReplicaMethods == nil {
1090
- log .V (debugLogLevel ).Info ("create_replica_methods mismatch, updating" , "response" , resp )
1090
+ log .V (debugLogLevel ).Info ("create_replica_methods mismatch, updating and requeing " , "response" , resp )
1091
1091
return requeueAfterReconcile , r .httpPatchPatroni (log , ctx , instance , leaderIP )
1092
1092
}
1093
1093
if resp .StandbyCluster .Host != instance .Spec .PostgresConnection .ConnectionIP {
1094
- log .V (debugLogLevel ).Info ("host mismatch, requeing" , "updating" , resp )
1094
+ log .V (debugLogLevel ).Info ("host mismatch, updating and requeing" , "updating" , resp )
1095
1095
return requeueAfterReconcile , r .httpPatchPatroni (log , ctx , instance , leaderIP )
1096
1096
}
1097
1097
if resp .StandbyCluster .Port != int (instance .Spec .PostgresConnection .ConnectionPort ) {
1098
- log .V (debugLogLevel ).Info ("port mismatch, requeing" , "updating" , resp )
1098
+ log .V (debugLogLevel ).Info ("port mismatch, updating and requeing" , "updating" , resp )
1099
1099
return requeueAfterReconcile , r .httpPatchPatroni (log , ctx , instance , leaderIP )
1100
1100
}
1101
1101
}
0 commit comments