Comment 7 for bug 1073520

Revision history for this message
Ante Karamatić (ivoks) wrote :

Same behavior can be seen in EC2:

2013-01-15 17:02:40,622 Machine:3: juju.agents.machine DEBUG: Units changed old:set(['mail-client/2']) new:set([])
2013-01-15 17:02:40,623 Machine:3: juju.agents.machine DEBUG: Stopping service unit: mail-client/2 ...
2013-01-15 17:02:40,626 Machine:3: unit.deploy INFO: Stopping service unit mail-client/2...
2013-01-15 17:02:40,736 unit:mail-client/2: unit.lifecycle DEBUG: pre-stop acquire, running:True
2013-01-15 17:02:40,736 unit:mail-client/2: unit.lifecycle DEBUG: stopping relation lifecycles
2013-01-15 17:02:40,737 unit:mail-client/2: unit.relation.watch DEBUG: relation watcher stop
2013-01-15 17:02:40,737 unit:mail-client/2: hook.scheduler DEBUG: stopping
2013-01-15 17:02:40,737 unit:mail-client/2: hook.scheduler INFO: stopped
2013-01-15 17:02:40,738 unit:mail-client/2: unit.relation.lifecycle DEBUG: stopped relation:postfix lifecycle
2013-01-15 17:02:40,738 unit:mail-client/2: unit.lifecycle DEBUG: stopped unit lifecycle
2013-01-15 17:02:40,738 unit:mail-client/2: hook.executor DEBUG: stopped
2013-01-15 17:02:40,952 Machine:3: unit.deploy INFO: Stopped service unit mail-client/2
2013-01-15 17:02:51,836 unit:mail-stack-delivery/0: unit.relation.watch DEBUG: relation membership change
2013-01-15 17:02:51,836 unit:mail-stack-delivery/0: unit.relation.watch DEBUG: relation membership change
2013-01-15 17:02:51,840 unit:mail-stack-delivery/0: hook.scheduler DEBUG: members changed: old=['mail-client/0', 'mail-client/2'], new=['mail-client/0']
2013-01-15 17:02:51,842 unit:mail-stack-delivery/0: hook.scheduler DEBUG: executing hook for mail-client/2:departed
2013-01-15 17:02:51,842 unit:mail-stack-delivery/0: unit.relation.lifecycle DEBUG: Executing hook postfix-relation-departed
2013-01-15 17:02:51,842 unit:mail-stack-delivery/0: hook.executor DEBUG: Running hook: /var/lib/juju/units/mail-stack-delivery-0/charm/hooks/postfix-relation-departed
2013-01-15 17:02:52,470 unit:mail-stack-delivery/0: hook.output ERROR: Traceback (most recent call last):
Failure: juju.hooks.protocol.NoSuchUnit: The relation 'postfix' has no unit state for 'mail-client/2'
2013-01-15 16:02:52,463 ERROR: Traceback (most recent call last):
Failure: juju.hooks.protocol.NoSuchUnit: The relation 'postfix' has no unit state for 'mail-client/2'

2013-01-15 16:02:52,463 ERROR: [Failure instance: Traceback (failure with no frames): <class 'juju.hooks.protocol.NoSuchUnit'>: The relation 'postfix' has no unit state for 'mail-client/2'
]

2013-01-15 17:02:52,583 unit:mail-stack-delivery/0: hook.output DEBUG: hook postfix-relation-departed exited, exit code 0.
2013-01-15 17:02:52,610 unit:mail-stack-delivery/0: hook.executor DEBUG: Hook complete: /var/lib/juju/units/mail-stack-delivery-0/charm/hooks/postfix-relation-departed

IMHO, it's a bug in workflow if a unit is removed before the relation is broken.