Skip to content

Commit 3441c3f

Browse files
committed
Ignore not found error when remove router interface
1 parent 2162acc commit 3441c3f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/cloud/services/networking/router.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@ func (s *Service) DeleteRouter(network *infrav1.Network) error {
194194
SubnetID: network.Subnet.ID,
195195
}).Extract()
196196
if err != nil {
197+
if errors.IsNotFound(err) {
198+
s.logger.V(4).Info("Router Interface already removed, no actions", "id", network.Router.ID)
199+
return nil
200+
}
197201
return fmt.Errorf("unable to remove router interface: %v", err)
198202
}
199203
s.logger.V(4).Info("Removed RouterInterface of Router", "id", network.Router.ID)

0 commit comments

Comments
 (0)