Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to trace the add-relation hooks in debug-hooks window? Are there particular environmental variables I need to set to be successful?

My juju-core version is 1.13.3.

I want to observe the cloud-compute-relation-changed hook in action since I see this failure when trying to add-relation between nova-cloud-controller and nova-compute:

amcet:2013-09-12 20:18:39 INFO juju context.go:221 worker/uniter: HOOK getaddrinfo xxn79: Name or service not known
amcet:2013-09-12 20:18:39 INFO juju server.go:105 worker/uniter/jujuc: running hook tool "juju-log" ["nova-cloud-controller ERROR: nova-cloud-controller: Couldn't obtain SSH host key from xxn79."]
amcet:2013-09-12 20:18:39 DEBUG juju server.go:106 worker/uniter/jujuc: hook context id "nova-cloud-controller/0:cloud-compute-relation-changed:4369123461286104487"; dir "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm"
amcet:2013-09-12 20:18:39 INFO juju juju-log.go:64 nova-cloud-controller/0 cloud-compute:32: nova-cloud-controller ERROR: nova-cloud-controller: Couldn't obtain SSH host key from xxn79.
amcet:2013-09-12 20:18:39 ERROR juju uniter.go:352 worker/uniter: hook failed: exit status 1
amcet:2013-09-12 20:18:39 DEBUG juju modes.go:412 worker/uniter: ModeAbide exiting
amcet:2013-09-12 20:18:39 INFO juju modes.go:410 worker/uniter: ModeHookError starting

I see no real meaningful output from the debug-hooks window when executing.

share|improve this question

You should see meaningful output in the debug-hooks window. I can think of two reasons why you might not:

  1. you ran debug-hooks after the relation was changed or while the hook was running
  2. you didn't use the correct unit name (e.g. nova-cloud-controller/0) as a debug-hooks parameter.

Juju captures the standard output of the hook execution and logs it out. Right now it isn't easy to filter this out, but soon, we are likely to have it at least grep friendly.

It looks like the error you are getting is this:

nova-cloud-controller: Couldn't obtain SSH host key from xxn79.

juju debug-log doesn't yet provide the ability to do filtering of the log, but this is on our roadmap.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.