I'm trying to create a charm that can connect to rabbitmq. I've written an amqp-relation-joined, and an amqp-relation-changed. Neither of these scripts executes when I run juju add-relation $mycharm rabbitmq-server
. In the logs, I'm seeing
...
==> <$HOME>/.juju/local/log/unit-rabbitmq-server-0.log <==
2014-03-04 20:43:48 DEBUG juju.worker.uniter.filter filter.go:523 no new charm event
2014-03-04 20:43:48 DEBUG juju.worker.uniter.filter filter.go:338 got relations change
==> <$HOME>/.juju/local/log/unit-flask-0.log <==
2014-03-04 20:43:48 DEBUG juju.worker.uniter.filter filter.go:523 no new charm event
2014-03-04 20:43:48 DEBUG juju.worker.uniter.filter filter.go:338 got relations
...
I expect to see some sort of output from my hooks because I'm logging stuff.
In amqp-relation-joined
:
echo "DOING AMQP STUFF"
juju-log "$JUJU_REMOTE_UNIT modified its settings"
juju-log "Relation settings:"
relation-get
juju-log "Relation members:"
relation-list
touch /var/i_was_here
In amqp-relation-changed
:
echo "DOING AMQP STUFF"
juju-log "$JUJU_REMOTE_UNIT modified its settings"
juju-log "Relation settings:"
relation-get
juju-log "Relation members:"
relation-list
touch /var/i_was_also_here
When I ssh into the machine, I am not seeing either /var/i_was_here
or /var/i_was_also_here
I am running juju on Ubuntu 12.04 in local mode.
EDIT:
The metadata.yml is
name: flask
summary: Flask is a lightweight "microframework" that is often used for simple apis
maintainer: Ubuntu <[email protected]>
description: |
...
categories:
- misc
subordinate: false
provides:
api:
interface: http
requires:
amqp:
interface: rabbitmq
The charms that I'm using are rolled into a single repository at https://github.com/peterklipfel/firesuit/tree/master/charms