@@ -251,14 +251,18 @@ func (r *FabricFollowerChannelReconciler) Reconcile(ctx context.Context, req ctr
251
251
r .Log .Info (fmt .Sprintf ("Old anchor peers %v" , anchorPeers ))
252
252
253
253
for _ , anchorPeer := range anchorPeers {
254
+ reqLogger .Info (fmt .Sprintf ("Removing anchor peer %v" , anchorPeer ))
254
255
err = app .RemoveAnchorPeer (configtx.Address {
255
256
Host : anchorPeer .Host ,
256
257
Port : anchorPeer .Port ,
257
258
})
258
259
if err != nil {
260
+ currentAnchorPeers , err := app .AnchorPeers ()
261
+ reqLogger .Error (err , fmt .Sprintf ("Failed to remove anchor peer %v, current anchor peers: %v" , anchorPeer , currentAnchorPeers ))
259
262
r .setConditionStatus (ctx , fabricFollowerChannel , hlfv1alpha1 .FailedStatus , false , err , false )
260
263
return r .updateCRStatusOrFailReconcile (ctx , r .Log , fabricFollowerChannel )
261
264
}
265
+ reqLogger .Info (fmt .Sprintf ("Removed anchor peer %v" , anchorPeer ))
262
266
}
263
267
r .Log .Info (fmt .Sprintf ("New anchor peers %v" , anchorPeers ))
264
268
@@ -268,6 +272,7 @@ func (r *FabricFollowerChannelReconciler) Reconcile(ctx context.Context, req ctr
268
272
Port : anchorPeer .Port ,
269
273
})
270
274
if err != nil {
275
+ reqLogger .Error (err , fmt .Sprintf ("Failed to add anchor peer %v" , anchorPeer ))
271
276
r .setConditionStatus (ctx , fabricFollowerChannel , hlfv1alpha1 .FailedStatus , false , err , false )
272
277
return r .updateCRStatusOrFailReconcile (ctx , r .Log , fabricFollowerChannel )
273
278
}
0 commit comments