Skip to content

PTR with /25 zone fails to import record #61

Closed
doslager opened this Issue Mar 12, 2013 · 6 comments

2 participants

@doslager

I think this is a bug....we have two /25 zones that are delegated to us. I'm currently hosting them locally, but want to migrate to Route53. When I try to create a PTR record, it seems to error out due to the unique nature of a /25 zone name.

I researched how to reference the zone name and amazon automatically inserts the \057 instead of the / and it seems to work. It just doesnt seem to work with cli53.

NOTE: if i just create the zone as X.Y.Z.in-addr.arpa, the rrcreate works fine. However this will not work since our ISP is delegating H.X.Y.Z to H.0/25.X.Y.Z.

doslager@ubuntu:~/barnybug-cli53-9b91908/scripts$ ./cli53 rrcreate --wait 0\\05725.X.Y.Z.in-addr.arpa 98 PTR blah.foo.com --ttl 1800
Traceback (most recent call last):
File "./cli53", line 824, in <module>
main()
File "./cli53", line 821, in main
args.func(args)
File "./cli53", line 691, in cmd_rrcreate
ret = r53.change_rrsets(args.zone, xml)
File "/usr/local/lib/python2.7/dist-packages/boto/route53/connection.py", line 315, in change_rrsets
body)
boto.route53.exception.DNSServerError: DNSServerError: 400 Bad Request
<?xml version="1.0"?>
<ErrorResponse xmlns="https://route53.amazonaws.com/doc/2012-02-29/"><Error><Type>Sender</Type><Code>InvalidChangeBatch</Code><Message>RRSet with DNS name 98.0925.X.Y.Z.in-addr.arpa. is not permitted in zone 0\05725.X.Y.Z.in-addr.arpa.</Message></Error><RequestId>4269b658-8b68-11e2-a7eb-21b582fee6f0</RequestId></ErrorResponse>
doslager@ubuntu:~/barnybug-cli53-9b91908/scripts$

Notice in the error message that it's trying to create an RRset with DNS name 98.0925.X.Y.Z.in-addr.arpa.

It should be 98.0\5725.X.Y.Z.in-addr.arpa.

@barnybug barnybug pushed a commit that closed this issue Mar 13, 2013
Barnaby Gray Handle / in zone names for arpa domains. fixes #61. 02b1da1
@barnybug barnybug closed this in 02b1da1 Mar 13, 2013
@doslager

Thank you for the quick turnaround to this. But....

Maybe i'm doing something wrong, but i'm getting the same error....

I updated with:
sudo pip install --upgrade cli53

The cli53 binary in /usr/local/bin is updated with current timestamp as is a number of other binaries.

Then i ran the following and it errored out, same as before:

doslager@ubuntu:/usr/local/bin$ ./cli53 rrcreate --wait 0\\05725.30.20.10.in-addr.arpa. 98 PTR blah.foo.com --ttl 1800
Traceback (most recent call last):
  File "./cli53", line 749, in <module>
    main()
  File "./cli53", line 746, in main
    args.func(args)
  File "./cli53", line 616, in cmd_rrcreate
    ret = r53.change_rrsets(args.zone, xml)
  File "/usr/local/lib/python2.7/dist-packages/boto/route53/connection.py", line 315, in change_rrsets
    body)
boto.route53.exception.DNSServerError: DNSServerError: 400 Bad Request
<?xml version="1.0"?>
<ErrorResponse xmlns="https://route53.amazonaws.com/doc/2012-02-29/"><Error><Type>Sender</Type><Code>InvalidChangeBatch</Code><Message>RRSet with DNS name 98.0925.30.20.10.in-addr.arpa. is not permitted in zone 0\05725.30.20.10.in-addr.arpa.</Message></Error><RequestId>56c884a5-8c20-11e2-b517-55e1f3ca7821</RequestId></ErrorResponse>
doslager@ubuntu:/usr/local/bin$ ```
@barnybug
Owner
@doslager

I'm still having problems....

I create a new ubuntu instance at AWS.
Installed pip
sudo apt-get install python-pip python-dev build-essential
sudo pip install --upgrade pip
sudo pip install --upgrade virtualenv

Installed cli53
sudo pip install cli53

Upgraded boto and argparse
sudo pip install --upgrade boto
sudo pip install --upgrade argparse

Then created new zone....that worked:
ubuntu@ip-192-168-64-152:~$ sudo /usr/local/bin/cli53 create -- 0\\05725.40.20.10.in-addr.arpa
sudo: unable to resolve host ip-192-168-64-152
HostedZone:
ResourceRecordSetCount: 2
CallerReference: 302e463a-816a-4e8e-81f3-662a81ec8bf0
Config:
Comment: None
Id: /hostedzone/Z20GSER4U35INC
Name: 0\05725.40.20.10.in-addr.arpa.
ChangeInfo:
Status: PENDING
SubmittedAt: 2013-03-14T20:52:26.641Z
Id: /change/C2AK0RX71B12SQ
DelegationSet:
NameServers:
- ns-609.awsdns-12.net
- ns-1183.awsdns-19.org
- ns-414.awsdns-51.com
- ns-1891.awsdns-44.co.uk

Then tried to create a new PTR record and got the same issue as I was having before.
ubuntu@ip-192-168-64-152:~$ sudo /usr/local/bin/cli53 rrcreate 0\\05725.40.20.10.in-addr.arpa. 98 PTR blah.foo.com --ttl 1800
sudo: unable to resolve host ip-192-168-64-152
Traceback (most recent call last):
File "/usr/local/bin/cli53", line 749, in <module>
main()
File "/usr/local/bin/cli53", line 746, in main
args.func(args)
File "/usr/local/bin/cli53", line 616, in cmd_rrcreate
ret = r53.change_rrsets(args.zone, xml)
File "/usr/local/lib/python2.7/dist-packages/boto/route53/connection.py", line 315, in change_rrsets
body)
boto.route53.exception.DNSServerError: DNSServerError: 400 Bad Request
<?xml version="1.0"?>
<ErrorResponse xmlns="https://route53.amazonaws.com/doc/2012-02-29/"><Error><Type>Sender</Type><Code>InvalidChangeBatch</Code><Message>RRSet with DNS name 98.0925.40.20.10.in-addr.arpa. is not permitted in zone 0\05725.40.20.10.in-addr.arpa.</Message></Error><RequestId>6466bf7b-8ce9-11e2-b424-8b713b05046a</RequestId></ErrorResponse>
ubuntu@ip-192-168-64-152:~$

It seems to want to create a record called:
RRSet with DNS name 98.0925.40.20.10.in-addr.arpa.

Sorry, but i'm not very python savvy, so i'm not sure what the issue is. I thought i was following directions....

????

Thanks!

@barnybug
Owner

You're pip installing cli53 - I haven't made a new release yet, the change is on master.

@doslager

OK...i see. Sorry....I'm not a developer. :)

Dumb question:
How do i get the master cli53 and replace the current one that is pip installed?

I'm not sure where to download the binary from...i assume i just overwrite /usr/local/bin/cli53

@doslager

Nevermind! I figured it out. I was waaaay overthinking it. :) I downloaded the cli53-master.zip and unzipped, and then copied the cli53 to /usr/local/bin and replaced the original cli53.

I was thinking it was a binary package that needed to be installed/compiled/etc.

Thank you very much. It's working now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.