External-dns: AWS: Update record from simple routing policy to weighted is not supported

Created on 5 Feb 2020  路  1Comment  路  Source: kubernetes-sigs/external-dns

Updating an existing A record from a simple routing policy to weighted by adding annotations to a service fails. External-dns tries to create a new record using the same name and type and delete the old record with no weights. The aws cli fails with a describing error:

InvalidChangeBatch: [RRSet with DNS name example.org., type A, SetIdentifier foobar cannot be created as a non-weighted set exists with the same name and type., RRSet with DNS name example.org., type TXT, SetIdentifier foobar cannot be created as a non-weighted set exists with the same name and type.]\n\tstatus code: 400, request id: *"

May be fixed by correcting the logic to use UPSERT instead of CREATE/DELETE. Another idea is to do deletions before creating new records, but that may have some negative implications I have not foreseen.

Most helpful comment

Hi UPSERT is not possible, doing UPSERT will actually do a CREATE that will fail.

I was able to fix this locally by changing the order of the commands, so it will do DELETE before CREATE. AWS state the actions will happen in a single operation, so I think it's safe.

>All comments

Hi UPSERT is not possible, doing UPSERT will actually do a CREATE that will fail.

I was able to fix this locally by changing the order of the commands, so it will do DELETE before CREATE. AWS state the actions will happen in a single operation, so I think it's safe.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

linki picture linki  路  4Comments

neilhwatson picture neilhwatson  路  3Comments

naveeng68 picture naveeng68  路  4Comments

szuecs picture szuecs  路  4Comments

placydo picture placydo  路  5Comments