diff --git a/pkg/cloud/aws/actuators/machine_scope.go b/pkg/cloud/aws/actuators/machine_scope.go index aa9956356d..d0a51a87ce 100644 --- a/pkg/cloud/aws/actuators/machine_scope.go +++ b/pkg/cloud/aws/actuators/machine_scope.go @@ -147,13 +147,13 @@ func (m *MachineScope) Close() { m.V(6).Info("Machine status before update", "machine-status", m.Machine.Status) latest, err := m.MachineClient.Update(m.Machine) if err != nil { - m.Error(err, "error updating machine") + m.V(3).Info("Machine resource version is out of date") + // Fetch and update the latest resource version newestMachine, err2 := m.MachineClient.Get(m.Machine.Name, metav1.GetOptions{}) if err2 != nil { m.Error(err2, "failed to fetch latest Machine") return err2 } - // Error if anything but the machine resource version changes m.Machine.ResourceVersion = newestMachine.ResourceVersion return err } diff --git a/pkg/cloud/aws/actuators/scope.go b/pkg/cloud/aws/actuators/scope.go index 667d83efda..e17f0ccf03 100644 --- a/pkg/cloud/aws/actuators/scope.go +++ b/pkg/cloud/aws/actuators/scope.go @@ -156,13 +156,13 @@ func (s *Scope) Close() { s.V(6).Info("Cluster status before update", "cluster-status", s.Cluster.Status) latest, err := s.ClusterClient.Update(s.Cluster) if err != nil { - s.Error(err, "error updating cluster") + s.V(3).Info("Cluster resource version is out of date") + // Fetch and update the latest resource version newestCluster, err2 := s.ClusterClient.Get(s.Cluster.Name, metav1.GetOptions{}) if err2 != nil { s.Error(err2, "failed to fetch latest cluster") return err2 } - // Error if anything but the cluster resource version changes s.Cluster.ResourceVersion = newestCluster.ResourceVersion return err }