exceptions.AttributeError: 'UnitAgent' object has no attribute 'lifecycle'

Bug #1078216 reported by Zygmunt Krynicki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju (Ubuntu)
Confirmed
High
Unassigned

Bug Description

I was analyzing why my juju cluster was down. The particular instance I was analyzing had the jenkins-slave charm deployed.

Reading /var/lib/juju/units/jenkins-slave-*/charm.log I found the following unhandled exception:

2012-11-13 09:04:23,261: twisted@ERROR: Unhandled error in Deferred:
2012-11-13 09:04:23,262: twisted@ERROR: Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1181, in unwindGenerator
    return _inlineCallbacks(None, gen, Deferred())
  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/agents/base.py", line 250, in stopService
    yield self.stop()
  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/agents/unit.py", line 127, in stop
    if self.lifecycle.running:
exceptions.AttributeError: 'UnitAgent' object has no attribute 'lifecycle'

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: juju 0.5+bzr531-0ubuntu1.3
ProcVersionSignature: User Name 3.2.0-32.51-virtual 3.2.30
Uname: Linux 3.2.0-32-virtual x86_64
ApportVersion: 2.0.1-0ubuntu14
Architecture: amd64
Date: Tue Nov 13 09:23:43 2012
Ec2AMI: ami-000000bf
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: m1.small
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
PackageArchitecture: all
ProcEnviron:
 TERM=xterm-256color
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: juju
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Zygmunt Krynicki (zyga) wrote :
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

I'm marking this confirmed because, lookign through the code briefly, the lifecycle doesn't get assigned until a long ways down into start(), and there seems to be no __init__ in UnitAgent (and BaseAgent simply calls its super's init). So this seems a valid race which should perhaps be patched at UnitAgent's (new) __init__.

Changed in juju (Ubuntu):
importance: Undecided → High
status: New → Confirmed
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.