"Relation not found" when running relation-list

Bug #1053669 reported by Matthew Wedgwood on 2012-09-20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Jim Baker
juju (Ubuntu)

Bug Description

When attempting to query all relationships during hook execution, I receive the following error from relation-list. The error for all relation ids *except* the current one (as specified by the JUJU_RELATION:

2012-09-20 15:55:49,546 unit:parent/0: twisted ERROR: Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 134, in maybeDeferred
    result = f(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/amp.py", line 1035, in doit
    return maybeDeferred(aCallable, **kw).addCallback(
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 134, in maybeDeferred
    result = f(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1181, in unwindGenerator
    return _inlineCallbacks(None, gen, Deferred())
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1039, in _inlineCallbacks
    result = g.send(result)
  File "/usr/lib/python2.7/dist-packages/juju/hooks/protocol.py", line 244, in list_relations
  File "/usr/lib/python2.7/dist-packages/juju/hooks/invoker.py", line 227, in get_relation_hook_context
    raise RelationStateNotFound()
juju.state.errors.RelationStateNotFound: Relation not found

For example, during foo-relation-joined:
# relation-ids foo
# relation-list -r foo:1
# relation-list -r foo:2
<error occurs here>

This behavior can be reproduced using lp:~mew/+junk/debug-charm:

juju bootstrap
juju deploy --repository=. local:precise/debug-charm parent
juju deploy --repository=. local:precise/debug-charm child1
juju deploy --repository=. local:precise/debug-charm child2
juju add-relation parent:child child1:parent
juju add-relation parent:child child2:parent

I'm running juju locally under LXC. I've reproduced the issue on Quantal and Precise hosts.

Related branches

Changed in juju:
importance: Undecided → Critical
Changed in juju:
status: New → Confirmed
Changed in juju (Ubuntu Quantal):
status: New → Confirmed
importance: Undecided → High
Changed in juju (Ubuntu Quantal):
importance: High → Critical
Changed in juju:
milestone: none → 0.6
Changed in juju (Ubuntu Quantal):
milestone: none → ubuntu-12.10
Matthew Wedgwood (mew) wrote :

After talking this through with a few folks, it looks like this may be fixed in some version of juju. Adding "juju-origin: ppa" to environments.yaml makes the problem go away.

The issue remains in the stock version of juju for precise.

Jim Baker (jimbaker) on 2012-09-22
Changed in juju:
assignee: nobody → Jim Baker (jimbaker)
Jim Baker (jimbaker) on 2012-09-26
Changed in juju:
status: Confirmed → In Progress
Jim Baker (jimbaker) on 2012-10-03
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
Changed in juju (Ubuntu Quantal):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers