Code Monkey home page Code Monkey logo

dns-charm's Introduction

👋 Hello world.

Languages / tools used:

Neovim  Ubuntu  Golang-blue  Python  Git  Bash  Terraform  ansible  docker  kubernetes  containerd  prometheus 

Services used:

DigitalOcean

Stats

dns-charm's People

Contributors

mirw avatar paulgear avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dns-charm's Issues

Encapsulate tests with Tox

Tox is a pretty good framework to manage venvs and other project structures. Lets nuke the custom schenanigans in the Makefile and leverage tox.

Hostname parsing can fail on MAAS hosts

The output of the hostname check + resulting dig +short command returns an inconsistent hostname on MAAS based hosts.

In [4]: subprocess.check_output(['dig', '+short', hostname.strip()]).strip()
Out[4]: '10-0-10-55.maas.\n10.0.10.55'

This will result in an unparse-able config by the named-checkzone utility, plus can cause unintended side effects in domain resolution by any host outside of the provider environment.

Tests are a mess!

The testing structure needs some love in this charm.

Contrib/tests seems off to me, and they should probably live under unit_tests along with other unit_tests for the charm, and the 'tests' dir should contain functional tsts. or subdivide out the 'tests' directory with runners for both test styles.

Either way, whats here is a mess and its difficult to get going again.

Relation data format has changed

The relation data is no longer a BIND style newline separated document.

The current format of relation data is a JSON object, or array of JSON objects for each record type depending on programmable or programmable-multiple

 {'alias': 'test', 'ttl': 1600, 'rr': 'A', 'addr': '127.0.0.1'}

Un-Embed Charmhelpers

Charm helpers lives in pypi, and they should be pulled from pypi to simplify code + updates.

Add forwarding for not-found domains

Forwarding should be a configurable option for BIND deployments. If the nameserver is listed first in resolv.conf it will fail to push not-found entries to a remote service, since we occupy the first slot in most resolv.conf configurations - it makes sense to attempt to forward requests to the existing nameserver on the machine.

HACKING doc is woefully out of date

The new testing format is using TOX. Charm-helpers is now pip installable, and various other cleanup needs to happen to assist new contributors.

Respect fully configured domains, and not just top level domains.

Given the example of offline.myhacks.net as the domain to work with, subsequent subdomains should be appended such as

ns1.offline.myhacks.net

In the charms current existance it will reparse the zone and treat myhacks.net as the domain, and generate invalid configuration for CNAMES such as ns1.offline.

Support AWS Rt53

AWS Rt53 has a fully programmable API, and even if a basic single domain integration, this would be a good jumping off point to start integrating with third party providers.

DNS records created through programmable-multiple relations aren't deleted on departure

I'm using the DNS charm's programmable-multiple interface as part of the Clearwater Juju Charms (at https://github.com/Metaswitch/clearwater-juju/tree/dnsaas).

When nodes add a relation to the DNS charm, DNS records are created. However, on departure, they aren't deleted.

This causes an issue for elastic scale-up/scale-down as, after scale-down (and units departing the relation), their records are still present in DNS, so we try to load-balance across a large set of dead nodes.

It looks as though the programmable-multiple-relation-departed hook isn't implemented. Are there any plans to add this?

Install fails (on Ubuntu 12.04.5?)

I recently rebuild my Juju OpenStack rig, which meant I had to re-download my Ubuntu images. I pulled down Ubuntu 12.04.5, where previously I was using Ubuntu 12.04.4. (I'm not sure if this is relevant, but it seems to be the only change I can see.)

When I deploy the DNS charm (whether I do it in online or offline mode), I get the following error:

unit-dns-0[3910]: 2016-08-01 19:33:02 INFO unit.dns/0.install logger.go:40 Traceback (most recent call last):
unit-dns-0[3910]: 2016-08-01 19:33:02 INFO unit.dns/0.install logger.go:40   File "/var/lib/juju/agents/unit-dns-0/charm/hooks/install", line 75, in <module>
unit-dns-0[3910]: 2016-08-01 19:33:02 INFO unit.dns/0.install logger.go:40     i.install_provider()
unit-dns-0[3910]: 2016-08-01 19:33:02 INFO unit.dns/0.install logger.go:40   File "/var/lib/juju/agents/unit-dns-0/charm/hooks/install", line 56, in install_provider
unit-dns-0[3910]: 2016-08-01 19:33:02 INFO unit.dns/0.install logger.go:40     import DNS
unit-dns-0[3910]: 2016-08-01 19:33:02 INFO unit.dns/0.install logger.go:40 ImportError: No module named DNS
unit-dns-0[3910]: 2016-08-01 19:33:02 ERROR juju.worker.uniter.operation runhook.go:107 hook "install" failed: exit status 1

It seems the DNS module isn't installed. I can fix this by juju ssh-ing into the machine and running sudo apt-get install python-dns*, followed by juju resolved --retry dns/0.

Should python-dns* (or maybe just one of python-dns or python-dnspython) be added to the apt_install line in hooks/install, or is this dependency supposed to be satisfied by the list in charm/requirements.txt?

As I say, I've worked around this, but it would be useful to understand how the dependency should be satisfied (and how it's been satisfied in the past, as it's clearly worked previously). Any pointers you can provide would be appreciated!

TTLs aren't propagated

Over the programmable-multiple relation, I sent the following:

sprout-0 300 IN A 10.209.158.44

In /etc/bind/db.*, I see:

sprout-0        IN     A        10.209.158.44

The TTL has been dropped.

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.