Peer relation listed in relation-ids, but not queryable using relation-list

Bug #1111883 reported by James Page
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyjuju
Fix Released
High
Kapil Thangavelu
juju (Ubuntu)
Fix Committed
High
Unassigned

Bug Description

Charm branch:

lp:~openstack-charmers/charms/precise/cinder/ha-support

Hook function:

##########################################################################
# Description: Query Cluster peer interface to see if peered
# Returns: 0 if peered, 1 if not peered
##########################################################################
is_peered() {
  r_id=$(relation-ids cluster)
  if [ -z "$(relation-list -r $r_id)" ]; then
    echo "Unit not yet peered"
    return 1
  else
    echo "Unit peered"
    return 0
  fi
}

relation-ids cluster appears to return "cluster:11"; however the subsequent relation-list -r cluster:11 prints "Relation not found" and returns an empty string:

2013-01-31 17:21:02,128 unit:cinder/4: unit.hook.api DEBUG: Listing relation members for cluster:11
2013-01-31 17:21:02,131 unit:cinder/4: unit.deploy DEBUG: Downloading charm local:quantal/hacluster-59 to /var/lib/juju/units/cinder-hacluster-4/charms
2013-01-31 17:21:02,136 unit:cinder/4: juju.state.hook DEBUG: Ignoring partially constructed relation: amqp:26
2013-01-31 17:21:02,145 unit:cinder/4: hook.output INFO: Relation not found

2013-01-31 17:21:02,146 unit:cinder/4: juju.state.hook DEBUG: Ignoring partially constructed relation: cinder-volume-service:27
2013-01-31 17:21:02,148 unit:cinder/4: unit.relation.lifecycle DEBUG: stopped relation:amqp lifecycle
2013-01-31 17:21:02,187 unit:cinder/4: hook.output INFO: Unit not yet peered

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: juju 0.6-1ubuntu1
ProcVersionSignature: Ubuntu 3.5.0-22.34-generic 3.5.7.2
Uname: Linux 3.5.0-22-generic x86_64
ApportVersion: 2.6.1-0ubuntu9
Architecture: amd64
Date: Thu Jan 31 17:33:04 2013
MarkForUpload: True
PackageArchitecture: all
SourcePackage: juju
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
James Page (james-page) wrote :
Revision history for this message
James Page (james-page) wrote :
Download full text (4.3 KiB)

2013-01-31 17:44:52,490: hook.output@INFO: ++ relation-ids cluster

2013-01-31 17:44:52,494: juju.state.hook@DEBUG: Ignoring partially constructed relation: shared-db:25
2013-01-31 17:44:52,495: unit.relation.watch@DEBUG: relation watcher start
2013-01-31 17:44:52,496: unit.relation.lifecycle@DEBUG: started relation:ha lifecycle
2013-01-31 17:44:52,497: juju.state.hook@DEBUG: Ignoring partially constructed relation: amqp:26
2013-01-31 17:44:52,501: juju.state.hook@DEBUG: Ignoring partially constructed relation: cinder-volume-service:27
2013-01-31 17:44:52,501: hook.output@DEBUG: Cached relation hook contexts on 'ceph:29': ['identity-service:28']
2013-01-31 17:44:52,502: statemachine@DEBUG: relationworkflowstate: transition complete start (state up) {}
2013-01-31 17:44:52,551: unit.relation.lifecycle@DEBUG: Executing hook ceph-relation-joined
2013-01-31 17:44:52,678: unit.relation.lifecycle@DEBUG: stopped relation:cluster lifecycle
2013-01-31 17:44:52,686: statemachine@DEBUG: relationworkflowstate: transition start (None -> up) {}
2013-01-31 17:44:52,687: statemachine@DEBUG: relationworkflowstate: execute action do_start
2013-01-31 17:44:52,687: hook.scheduler@DEBUG: start
2013-01-31 17:44:52,726: unit.relation.watch@DEBUG: relation watcher start
2013-01-31 17:44:52,727: unit.relation.lifecycle@DEBUG: started relation:cluster lifecycle
2013-01-31 17:44:52,736: hook.scheduler@DEBUG: members changed: old=[], new=['cinder/0', 'cinder/1', 'cinder/2', 'cinder/3', 'cinder/4', 'cinder/6']
2013-01-31 17:44:52,737: hook.scheduler@DEBUG: executing hook for cinder/0:joined
2013-01-31 17:44:52,749: hook.scheduler@DEBUG: settings changed: (('cinder/6', 0),)
2013-01-31 17:44:52,755: hook.scheduler@DEBUG: settings changed: (('cinder/4', 0),)
2013-01-31 17:44:52,764: hook.scheduler@DEBUG: settings changed: (('cinder/3', 0),)
2013-01-31 17:44:52,766: hook.scheduler@DEBUG: settings changed: (('cinder/2', 0),)
2013-01-31 17:44:52,775: hook.scheduler@DEBUG: settings changed: (('cinder/0', 0),)
2013-01-31 17:44:52,777: hook.scheduler@DEBUG: settings changed: (('cinder/1', 0),)
2013-01-31 17:44:52,779: statemachine@DEBUG: relationworkflowstate: transition complete start (state up) {}
2013-01-31 17:44:53,001: unit.relation.lifecycle@DEBUG: stopped relation:shared-db lifecycle
2013-01-31 17:44:53,005: juju.state.hook@DEBUG: Ignoring partially constructed relation: amqp:26
2013-01-31 17:44:53,006: statemachine@DEBUG: relationworkflowstate: transition start (None -> up) {}
2013-01-31 17:44:53,006: statemachine@DEBUG: relationworkflowstate: execute action do_start
2013-01-31 17:44:53,007: hook.scheduler@DEBUG: start
2013-01-31 17:44:53,007: juju.state.hook@DEBUG: Ignoring partially constructed relation: cinder-volume-service:27
2013-01-31 17:44:53,046: juju.state.hook@DEBUG: Ignoring partially constructed relation: amqp:26
2013-01-31 17:44:53,048: unit.relation.watch@DEBUG: relation watcher start
2013-01-31 17:44:53,048: unit.relation.lifecycle@DEBUG: started relation:shared-db lifecycle
2013-01-31 17:44:53,067: juju.state.hook@DEBUG: Ignoring partially constructed relation: cinder-volume-service:27
2013-01-31 17:44:53,072: hook.scheduler@DEBUG: members changed: old=[...

Read more...

Changed in juju:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Kapil Thangavelu (hazmat)
milestone: none → 0.7
Changed in juju:
status: In Progress → Fix Released
Changed in juju (Ubuntu):
status: New → Fix Committed
James Page (james-page)
Changed in juju (Ubuntu):
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.