Route updates don't work in when two routes have same value for one of the route fields #2090
Labels
kind/bug
Categorizes issue or PR as related to a bug.
service/route53
Indicates issues or PRs that are related to route53-controller.
Describe the bug
When we change the routes (e.g. delete some of the routes) from the route table CR, the CR status goes to
out of sync
for the remaining routes.Steps to reproduce
This happens in specific case where route comparison logic does not work. E.g. when we have two routes with say, same
vpcPeeringConnectionID
.destinationCIDRBlock
, but samevpcPeeringConnectionID
.sync
172.29.0.0/16
(without changing two routes with samevpcPeeringConnectionID
). This triggersupdate
and controller tries to find what needs to be deleted/added.out of sync
state with error something likeThis suggests that
update
tried to create route172.30.0.0/16
and failed withRouteAlreadyExists
error.On prima facie, there appears to be two issues
vpcPeeringConnectionID
) having same value for two routes. Due to this same value, it thinks, the route is getting updated from172.28.0.0/16
to172.30.0.0/16
. So, it tries add172.30.0.0/16
and fails with the error.Ideally, this logic should not have determined any update for these two routes with
vpcPeeringConnectionID
.update
determines that there is a route to be deleted and added, it createstoAdd
andtoDelete
lists.Ideally,
delete
should happen first and thenadd
should happen later. But current logic is reverse.Expected outcome
CR should not go into
out of sync
state.Environment
The text was updated successfully, but these errors were encountered: