aws-samples / aws-samples/aws-lambda-mirror-dns-function

Wildcard records not handled

Aberta
#2 1 comentário 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Python
Estrelas
41
Forks
29
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

my source zone contains wildcard records of the form '\*.test.example.com'
when first run, i see the record added correctly in route53 as '\*.test.example.com'
however when rerun, i see:

> Transferring zone example.com from server 1.2.3.4
> Getting VPC SOA serial from Route 53
> Comparing SOA serial 2017091200 with 2017091200
> Updating as DELETE for A record 4.test TTL 300 in zone example.com with []
> An error occurred (InvalidChangeBatch) when calling the ChangeResourceRecordSets operation: Tried to delete resource record set [name='4.test.example.com.', type='A'] but it was not found
> ERROR: Unable to update zone example.com
>

this appears to be a known issue with libraries that interact with route53.
see: https://github.com/boto/boto/issues/818

the underlying cause is that route53 escapes non-alphanumeric characters
see: http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html

so route53 is returning '\052.test.example.com' which gets misinterpreted somewhere in the python code and converted to '4.test.example.com'. since that record does not exist in the source zone, it is scheduled for deletion from route53. when the delete is attempted, it fails because there is no record for '4.test.example.com'.

it seems the python error is related to the difference between 052 (octal) => '\*' and 52 (decimal) => '4'
see: http://www.asciitable.com/

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Comece rastreando o código Python que compara os registros da zona de origem com os registros do Route 53 e cria alterações de exclusão; em seguida, reproduza o comportamento da segunda execução com um registro wildcard como *.test.example.com. A correção estará concluída quando o nome wildcard escapado pelo Route 53 for comparado e excluído como o mesmo registro, em vez de como 4.test.example.com.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
aws, python
Domínio
backend, cloud
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.