GithubHelp home page GithubHelp logo

Comments (4)

yzguy avatar yzguy commented on July 24, 2024

the _data_for_geo method is used for both A and AAAA records. https://github.com/github/octodns/blob/master/octodns/provider/route53.py#L322-L323

So it's not Geo Related, rather probably an A or AAAA record.
There should be a response from AWS that looks similar to

 'ResourceRecordSets': [{
    'Name': 'simple.unit.tests.',
    'Type': 'A',
    'ResourceRecords': [{
        'Value': '1.2.3.4',
    }, {
        'Value': '2.2.3.4',
    }],
    'TTL': 60,
}

I don't think they would let you make a record with no value, and I would assume there would also be a ResourceRecords key either way.

I'm betting this is related to both zones showing up in the list-hosted-zones output, but we aren't distinguishing if it's the private hosted one or the public hosted zone. If it's not, then I forsee a bug anyway because of it.

If you go into ~/tmp/nosync/dns/env/src/octodns/octodns/provider/route53.py and add:

def _data_for_geo(self, rrset):
        self.log.debug(rrset)
        ret = {

starting on line 311, then run it again. It should print out what the rrset looks like. Sanitize the output to remove identifying things, then if you could paste it here.

from octodns-route53.

brianeclow avatar brianeclow commented on July 24, 2024

After seeing the record, I think is related to issue octodns/octodns#26

Re-ran the octodns-dump command with the added print:

2018-02-06T13:02:48  [140736519537600] INFO  Manager __init__: config_file=config/ro_config_route53.yaml
2018-02-06T13:02:48  [140736519537600] INFO  Manager __init__:   max_workers=1
2018-02-06T13:02:48  [140736519537600] INFO  Manager __init__:   max_workers=False
2018-02-06T13:02:48  [140736519537600] DEBUG Manager __init__:   configuring providers
2018-02-06T13:02:48  [140736519537600] DEBUG YamlProvider[config] __init__: id=config, directory=./data, default_ttl=3600, enforce_order=1
2018-02-06T13:02:48  [140736519537600] DEBUG YamlProvider[config] __init__: id=config, apply_disabled=False, update_pcent_threshold=0, delete_pcent_threshold=0
2018-02-06T13:02:48  [140736519537600] DEBUG Route53Provider[route53] __init__: id=route53, access_key_id=KEY, secret_access_key=***
2018-02-06T13:02:48  [140736519537600] DEBUG Route53Provider[route53] __init__: id=route53, apply_disabled=False, update_pcent_threshold=0, delete_pcent_threshold=0
2018-02-06T13:02:48  [140736519537600] INFO  Manager dump: zone=sillydomain.com., sources=()
2018-02-06T13:02:48  [140736519537600] DEBUG YamlProvider[dump] __init__: id=dump, directory=data/, default_ttl=3600, enforce_order=1
2018-02-06T13:02:48  [140736519537600] DEBUG YamlProvider[dump] __init__: id=dump, apply_disabled=False, update_pcent_threshold=0, delete_pcent_threshold=0
2018-02-06T13:02:48  [140736519537600] DEBUG Manager configured_sub_zones: subs=[]
2018-02-06T13:02:48  [140736519537600] DEBUG Zone __init__: zone=Zone<sillydomain.com.>, sub_zones=set([])
2018-02-06T13:02:48  [140736519537600] DEBUG Route53Provider[route53] populate: name=sillydomain.com., target=False, lenient=False
2018-02-06T13:02:48  [140736519537600] DEBUG Route53Provider[route53] _get_zone_id: name=sillydomain.com.
2018-02-06T13:02:48  [140736519537600] DEBUG Route53Provider[route53] r53_zones: loading
2018-02-06T13:02:48  [140736519537600] DEBUG Route53Provider[route53] _get_zone_id:   id=/hostedzone/PRIVATEID
2018-02-06T13:02:48  [140736519537600] DEBUG Route53Provider[route53] _load_records: zone_id=/hostedzone/PRIVATEID loading
{u'AliasTarget': {u'HostedZoneId': 'ALIASEDHOSTEDID', u'EvaluateTargetHealth': True, u'DNSName': 'internal-000000000.region.elb.amazonaws.com.'}, u'Type': 'A', u'Name': 'app.sillydomain.com.'}
Traceback (most recent call last):
  File "~/tmp/nosync/dns/env/bin/octodns-dump", line 11, in <module>
    load_entry_point('octodns', 'console_scripts', 'octodns-dump')()
  File "~/tmp/nosync/dns/env/src/octodns/octodns/cmds/dump.py", line 31, in main
    manager.dump(args.zone, args.output_dir, args.lenient, *args.source)
  File "~/tmp/nosync/dns/env/src/octodns/octodns/manager.py", line 360, in dump
    source.populate(zone, lenient=lenient)
  File "~/tmp/nosync/dns/env/src/octodns/octodns/provider/route53.py", line 465, in populate
    data = getattr(self, '_data_for_{}'.format(record_type))(rrset)
  File "~/tmp/nosync/dns/env/src/octodns/octodns/provider/route53.py", line 315, in _data_for_geo
    'values': [v['Value'] for v in rrset['ResourceRecords']],
KeyError: u'ResourceRecords'

from octodns-route53.

yzguy avatar yzguy commented on July 24, 2024

Yep, that looks just like octodns/octodns#26.

I'm going to take a note to look at how we handle having a public and private hosted zone though, because I have a theory it won't work.

from octodns-route53.

github-actions avatar github-actions commented on July 24, 2024

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.

from octodns-route53.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.