@@ -309,17 +309,17 @@ func (node *deploymentNode) restart(upgradeStatus *api.ElasticsearchNodeStatus)
309
309
}
310
310
311
311
if replicas > 0 {
312
- if ok , err := DoSynchronizedFlush (node .clusterName , node .self .Namespace ); ! ok {
313
- logrus .Warnf ("Unable to perform synchronized flush: %v" , err )
314
- return
315
- }
316
312
317
313
// disable shard allocation
318
314
if ok , err := SetShardAllocation (node .clusterName , node .self .Namespace , api .ShardAllocationNone ); ! ok {
319
315
logrus .Warnf ("Unable to disable shard allocation: %v" , err )
320
316
return
321
317
}
322
318
319
+ if ok , err := DoSynchronizedFlush (node .clusterName , node .self .Namespace ); ! ok {
320
+ logrus .Warnf ("Unable to perform synchronized flush: %v" , err )
321
+ }
322
+
323
323
// check for available replicas empty
324
324
// node.self.Status.Replicas
325
325
// if we aren't at 0, then we need to scale down to 0
@@ -393,17 +393,16 @@ func (node *deploymentNode) update(upgradeStatus *api.ElasticsearchNodeStatus) e
393
393
if upgradeStatus .UpgradeStatus .UpgradePhase == "" ||
394
394
upgradeStatus .UpgradeStatus .UpgradePhase == api .ControllerUpdated {
395
395
396
- if ok , err := DoSynchronizedFlush (node .clusterName , node .self .Namespace ); ! ok {
397
- logrus .Warnf ("Unable to perform synchronized flush: %v" , err )
398
- return err
399
- }
400
-
401
396
// disable shard allocation
402
397
if ok , err := SetShardAllocation (node .clusterName , node .self .Namespace , api .ShardAllocationNone ); ! ok {
403
398
logrus .Warnf ("Unable to disable shard allocation: %v" , err )
404
399
return err
405
400
}
406
401
402
+ if ok , err := DoSynchronizedFlush (node .clusterName , node .self .Namespace ); ! ok {
403
+ logrus .Warnf ("Unable to perform synchronized flush: %v" , err )
404
+ }
405
+
407
406
if err := node .executeUpdate (); err != nil {
408
407
return err
409
408
}
0 commit comments