destroying a subordinate service after destroying its primary services results in a traceback...

Bug #982353 reported by Clint Byrum
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyjuju
In Progress
Low
Benjamin Saller

Bug Description

Steps to reproduce:

(assuming bootstrapped precise)
export JUJU_REPOSITORY=/usr/share/doc/juju/examples
juju deploy local:mysql
juju deploy cs:~clint-fewbar/oneiric/munin-node
juju deploy munin
juju add-relation mysql munin-node
juju add-relation munin-node:munin munin
juju destroy-service mysql
juju destroy-service munin-node

Debug log will show the traceback and the old unit agent will be left running on the machine. Given the lack of cleanup I understand that the best way is to terminate the machine, but I'd like to see these agents at least get gracefully removed from the machine in case I just want to re-deploy the same thing to it.

juju:
  Installed: 0.5+bzr529-1juju5~precise1
  Candidate: 0.5+bzr529-1juju5~precise1
  Version table:
 *** 0.5+bzr529-1juju5~precise1 0
        500 http://ppa.launchpad.net/juju/pkgs/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
     0.5+bzr504-0ubuntu1 0
        500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages

=== Traceback ===

2012-04-15 07:25:03,717 unit:munin-node/3: twisted ERROR: Unhandled error in Deferred:
2012-04-15 07:25:03,719 unit:munin-node/3: twisted ERROR: Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 362, in callback
    self._startRunCallbacks(result)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 458, in _startRunCallbacks
    self._runCallbacks()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 545, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1095, in gotResult
    _inlineCallbacks(r, g, 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/state/base.py", line 139, in __topology_changed
    yield watch_topology_function(self._old_topology, new_topology)
  File "/usr/lib/python2.7/dist-packages/juju/state/service.py", line 564, in watch_topology
    self._internal_id)
  File "/usr/lib/python2.7/dist-packages/juju/state/topology.py", line 487, in get_relations_for_service
    self._assert_service(service_id)
  File "/usr/lib/python2.7/dist-packages/juju/state/topology.py", line 517, in _assert_service
    "Service not found: %s" % service_id)
juju.state.topology.InternalTopologyError: Service not found: service-0000000019

2012-04-15 07:25:03,952 unit:munin-node/3: juju.agents.unit DEBUG: Configuration Changed
2012-04-15 07:25:03,960 unit:munin-node/3: twisted ERROR: Unhandled error in Deferred:
2012-04-15 07:25:03,962 unit:munin-node/3: twisted ERROR: Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 391, in errback
    self._startRunCallbacks(fail)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 458, in _startRunCallbacks
    self._runCallbacks()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 545, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1095, in gotResult
    _inlineCallbacks(r, g, deferred)
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1037, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python2.7/dist-packages/juju/state/service.py", line 598, in watcher
    yield callback(change_event)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1037, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python2.7/dist-packages/juju/agents/unit.py", line 226, in cb_watch_config_changed
    yield self.workflow.fire_transition("configure")
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1037, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python2.7/dist-packages/juju/lib/statemachine.py", line 183, in fire_transition
    yield self.set_inflight(transition_id)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1037, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python2.7/dist-packages/juju/lib/statemachine.py", line 292, in set_inflight
    yield self._store(state)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1037, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python2.7/dist-packages/juju/unit/workflow.py", line 237, in _store
    yield retry_change(self._client, self.zk_state_path, update_state)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1037, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python2.7/dist-packages/txzookeeper/utils.py", line 58, in retry_change
    new_content = yield change_function(content, stat)
  File "/usr/lib/python2.7/dist-packages/juju/unit/workflow.py", line 229, in update_state
    unit_data = yaml.load(content)
  File "/usr/lib/python2.7/dist-packages/yaml/__init__.py", line 69, in load
    loader = Loader(stream)
  File "/usr/lib/python2.7/dist-packages/yaml/loader.py", line 34, in __init__
    Reader.__init__(self, stream)
  File "/usr/lib/python2.7/dist-packages/yaml/reader.py", line 85, in __init__
    self.determine_encoding()
  File "/usr/lib/python2.7/dist-packages/yaml/reader.py", line 124, in determine_encoding
    self.update_raw()
  File "/usr/lib/python2.7/dist-packages/yaml/reader.py", line 178, in update_raw
    data = self.stream.read(size)
exceptions.AttributeError: 'NoneType' object has no attribute 'read'

Related branches

description: updated
Changed in juju:
assignee: nobody → Benjamin Saller (bcsaller)
Changed in juju:
milestone: none → honolulu
status: New → In Progress
Changed in juju:
importance: Undecided → High
Changed in juju:
milestone: 0.6 → none
Curtis Hovey (sinzui)
Changed in juju:
importance: High → Low
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.