Schultz/slicedns2linode — Issue #3: sub-zones
Author: logic
Created: 2011-12-01 19:27:55+00:00
State: open

Just a quick FYI: I slicedns2linode wasn't very happy with one of my zones.

I had a zone, "domain.com", with a hostname in it of "host.domain.com". I also had a record for "*.host.domain.com". When slicedns2linode tried to add *.host.domain.com, it failed because of linode's more strict hostname checking:

./linode.rb:81:in `send_request': Errors completing request [domain.resource.create] @ [https://api.linode.com/] with data [{:Target=>"10.0.0.1", :Type=>"A", :DomainID=>250478, :TTL_sec=>1800, :Name=>"*.host.domain.com."}]: (RuntimeError)
- Error #2 - Invalid hostname '*.host'. (Please consult http://www.linode.com/api/dns/domain.resource.create)
from ./linode.rb:15:in `create'
from ./slicedns2linode.rb:90
from ./slicedns2linode.rb:76:in `each'
from ./slicedns2linode.rb:76
from ./slicedns2linode.rb:58:in `each'
from ./slicedns2linode.rb:58

I fixed this by excluding those two records, and then creating an additional zone in linode's manager for "host.domain.com", adding an A record for both "@" and "*.@".

You might be able to handle this automatically in slicedns2linode, or at least warn about the condition rather than aborting the entire data load (the zone I was importing was relatively small, so it wasn't much of a burden).