lazypower / DNS-Charm

DNS Charm
MIT License
7 stars 5 forks source link

Install fails (on Ubuntu 12.04.5?) #29

Open mirw opened 8 years ago

mirw commented 8 years ago

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!

lazypower commented 8 years ago

@mirw Adding it to the charm install is certainly a valid option as it's not being used in that hook context yet. We may want to evaluate how to extrapolate this charm into a layer (much larger work item), and merge those dependencies into a wheelhouse for offline ability.

I haven't touched this charm in quite a while, as there has been talk of DNS being included in Juju-Core which isn't fully fleshed out, but it seems like it belongs there rather than in a third party charm.

I'd like to invite you to converse about the moving of dns into juju-core on the public mailing list as a stake holder for the feature. I think having your input on the base feature would be invaluable, as you're making use of "advanced" (air quotes) records, namely NAPTR, AAAA's and SRV records.

mirw commented 8 years ago

Thanks - what's the URL for joining the mailing list?

...and do you have any thoughts on what might have changed here to expose this issue? I'm sure it didn't happen when I used this before - maybe newer versions of Juju install different base packages (i.e. not including python-dns) on their managed machines?