Skip to content

Commit

Permalink
Fix, make it simpler, retest
Browse files Browse the repository at this point in the history
  • Loading branch information
gfariasalves-ionos committed Jan 17, 2024
1 parent 1bd1574 commit 35d8da7
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 127 deletions.
12 changes: 6 additions & 6 deletions internal/service/cloud/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,13 @@ func (s *Service) ReconcileLANDeletion() (requeue bool, err error) {

// try to retrieve the cluster LAN
clusterLAN, err := s.GetLAN()
if err != nil {
return false, err
}
if clusterLAN == nil {
err = s.removeLANPendingRequestFromCluster()
return err != nil, err
}
if err != nil {
return false, err
}

// if we found a LAN, we check if there is a deletion already in process
requestStatus, err := s.checkForPendingLANRequest(http.MethodDelete, *clusterLAN.Id)
Expand All @@ -149,13 +149,13 @@ func (s *Service) ReconcileLANDeletion() (requeue bool, err error) {
// Here we can check if the LAN is indeed gone or there's some inconsistency in the last request or
// this request points to an old, far gone LAN with the same ID.
clusterLAN, err = s.GetLAN()
if err != nil {
return false, err
}
if clusterLAN == nil {
err = s.removeLANPendingRequestFromCluster()
return err != nil, err
}
if err != nil {
return false, err
}
}
}

Expand Down
Loading

0 comments on commit 35d8da7

Please sign in to comment.