Relationship hooks not firing when a unit is removed and added back
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyjuju |
Triaged
|
Low
|
Unassigned |
Bug Description
When I remove a unit with remove-unit and then subsequently add another unit the relationship hooks don't fire. I've tested this with a dummy-website charm and the haproxy charm from charm store. I don't believe this is a charm error as it looks like juju is simply not calling the relationship hooks.
I have ppa as my juju-origin in environments.yaml and have 0.6-0juju1~precise1 on the client and the units. I'm deploying against openstack.
I have reproduced this error by initially deploying 2 dummy-website units, adding 2 more, removing 2 and adding 2 again so without going down to 0 dummy-website units. Its also reproducible by adding and removing a single unit:
$ mkdir precise
$ cd precise/
$ bzr branch lp:~gnuoy/+junk/dummy-website
Branched 1 revision.
$ cd ../
$ juju bootstrap --constraints "instance-
$ juju deploy haproxy 2>/dev/null
$ export JUJU_REPOSITORY
$ juju deploy local:dummy-website 2>/dev/null
$ juju add-relation haproxy:
# Check what hooks were run...
$ juju ssh dummy-website/0 "grep 'Running hook' /var/lib/
2013-01-18 07:59:09,760: hook.executor@
2013-01-18 07:59:09,890: hook.executor@
2013-01-18 07:59:09,975: hook.executor@
2013-01-18 07:59:10,246: hook.executor@
2013-01-18 07:59:11,133: hook.executor@
2013-01-18 07:59:11,179: hook.executor@
# Check we have an entry in haproxy for the dummy-website
$ juju ssh haproxy/0 "cat /etc/haproxy/
server 10_55_63_122__8080 10.55.63.122:8080 maxconn 100
# Remove the dummy-website unit and check it has gone from haproxy
$ juju remove-unit dummy-website/0 2>/dev/null
$ juju ssh haproxy/0 "cat /etc/haproxy/
# Add a dummy-website unit
$ juju add-unit dummy-website 2>/dev/null
# Check What hooks were run, note that website-relation hooks have not fired
$ juju ssh dummy-website/1 "grep 'Running hook' /var/lib/
2013-01-18 08:44:24,347: hook.executor@
2013-01-18 08:44:24,490: hook.executor@
2013-01-18 08:44:24,555: hook.executor@
2013-01-18 08:44:24,893: hook.executor@
# Unsuprisingly no entry in haproxy for new unit
$ juju ssh haproxy/0 "cat /etc/haproxy/
$
tags: | added: canonical-webops-juju |
Changed in juju: | |
importance: | Undecided → Low |
status: | New → Triaged |