New dynamic dns charm ddclient

Bug #996905 reported by David Duffey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juju Charms Collection
Incomplete
High
David Duffey

Bug Description

Here is my first charm for the charm contest

https://code.launchpad.net/~david-duffey/charms/precise/ddclient/trunk

Tired of cutting and pasting instance ip addresses or hostnames?
Hate having to manually update DNS entries or client applications?

Setup dynamic DNS to point to your services in three easy steps!

1. Use a hostname as your servicename
2. Add a relation to ddclient (dynamic DNS client)
3. Profit, you just updated your dynamic DNS hostname!

Changed in charms:
assignee: nobody → Clint Byrum (clint-fewbar)
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

David, this is *awesome*. Just *awesome*.

I do not have an account with any of the supported providers, so I was not able to fully test, but nothing "breaks" and it does try to register the hostname when I relate it.

This is one of the cooler things I've seen done w/ subordinates. Its almost ready for promulgation.

 I just want to make sure the config options are set properly so we don't have to go back and change them, as that is hard on users.

The 'daemon' config option is very confusing. It doesn't actually describe what the option does, which is set the delay. How about 'refresh-interval' ? Also make it type: int, and default: 300, as it can't really be a string.

Please fix that, and I will promulgate it right away.

== Other feedback ==

* Consider running the juju-info-relation-joined hook again from config-changed. You can do this with the 'relation-ids' command, but its non-trivial. Basically you would do this:

for JUJU_RELATION_ID in `relation-ids juju-info` ; do
  export JUJU_RELATION_ID
  for JUJU_REMOTE_UNIT in `relation-list -r $rel` ; do
    export JUJU_REMOTE_UNIT
    hooks/juju-info-relation-joined
  done
done

This will allow you to change the config parameters after the relationships have been established.

Changed in charms:
status: New → Incomplete
assignee: Clint Byrum (clint-fewbar) → David Duffey (david-duffey)
importance: Undecided → High
Revision history for this message
David Duffey (dduffey) wrote :

Thanks Clint, this is an idea I had six months ago and the charm contest got me to finally play with charms :)

On the question about options... "daemon" should remain a string, because it is possible to use "5m", meaning five minutes.

I chose all the options to be the same as found as command line or config file options in ddclient itself, I agree "daemon" is confusing. In ddclient, daemon=0 means to not run as a daemon, and daemon=300 is seconds, deamon=5m is in minutes, etc.

Here is the documentation from ddclient on that option:

  -daemon delay : run as a daemon, specify delay as an interval. (default: 0).
The daemon interval can be specified as seconds (600s), minutes (5m), hours (1h) or days (1d).

So, I would leave it as a string.... I think it may also make sense to leave it as "daemon" since all the other options are 1:1 with ddclient, and there may be an arguement for someone wanting to have the service start but ddclient not become a daemon. Agreed this should be documented better.

I'm hoping someone else can take this charm to the next level!

Jorge Castro (jorge)
tags: removed: new-charm
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.