barnybug / cli53

Command line tool for Amazon Route 53

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

export with --full option has wrong $ORIGIN set

stevie- opened this issue · comments

Issue type

  • Bug report

cli53 version (cli53 --version)

cli53 version 0.8.7 + 0.8.8

OS / Platform

Ubuntu 14.04.5 LTS

Steps to reproduce

cli53 export --full domain.tld

$ORIGIN domain.tld.
domain.tld .....

Expected behaviour

with full option ORIGIN needs to be only a . to make a valid zone.

cli53 export --full domain.tld

$ORIGIN .
domain.tld .....

Actual behaviour

# cli53 export --full domain.tld
$ORIGIN domain.tld.
domain.tld .....

$ORIGIN is wrong here

Have you checked if the documentation has the information you require?

NAME:
   cli53 export - export a bind zone file (to stdout)

USAGE:
   cli53 export [command options] name|ID

OPTIONS:
   --debug, -d      enable debug logging
   --profile value  profile to use from credentials file
   --full, -f       export prefixes as full names

Could you contribute a fix or help testing with this issue?

maybe , but looks like a quick fix

I can't see any actual negative impact of this, what scenario does it cause specific problems for?

We export the zone to match it against a valid zone configuration from PowerDNS.
We diff both results to see which changes we are pushing to Route53.
Powerdns uses $ORIGIN . which is correct for a valid zone for full prefix entries.

Also (and maybe more important) you could not export this zone in full format and upload it back to Route53 without breaking zone.

Hi, aside from being slightly unconvinced by an argument of 'correctness' (by what definition?), have you tested that last assertion about breaking a re-import? I can't see how/why it would - when you export with --full, all relative records are qualified as absolute by the trailing dot, so there won't be any ambiguity.

Your are right, I missed that part.

The issue that I have is to match the zone dump of cli53 with a zone dump from powerdns.
pdnsutil list-zone ZONE

Ok. I suggest if you need identical output either you adjust the output with standard Unix tools (awk/sed/perl). I don't consider it's an imperative cli53 should match this other tool.