Home

Awesome

SkyGC

When using Helios and the SkyDNS plugin, over time etcd will have a bunch of junk in it. This is especially true when it is used in a continuous integration/deployment environment with the Helios Testing Framework. This is because the framework makes randomized subdomains so that more than one person can run the same set of tests using service discovery and not have them step on each other. In this case, when Helios tears down the registry entries and/or they expire (if the Helios agent was killed), the directories leading to the files it creates for SkyDNS do not go away when their associated files' TTL expires.

I've thought about fixing the SkyDNS plugin to do this cleanup, but it would suffer from a few drawbacks:

And so we have SkyGC.

It's really braindead right now. All it does is try to remove directories on the specified etcd server that are part of the skydns tree. Directories that still have active nodes in them will not be removed.

Usage

skygc etcd_url skydns_domain

If your etcd server is at http://myetcd.example.com:4001 and the domain that SkyDNS manages is services.dev.example.com, your commandline would be:

skygc http://myetcd.example.com:4001 services.dev.example.com

It generates fairly copious amounts of output, and most of the failures it outputs aren't really failures in the normal sense, and since this is just a garbage collector, failure is generally ok.