failure during destroy-service

Bug #1060089 reported by Sidnei da Silva
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyjuju
Triaged
Low
Unassigned

Bug Description

2012-10-02 10:41:44,795 Machine:1: juju.agents.machine DEBUG: Stopping service unit: u1-updown/25 ...
2012-10-02 10:41:44,796 Machine:1: unit.deploy INFO: Stopping service unit u1-updown/25...
2012-10-02 10:41:44,912 unit:u1-updown/25: twisted ERROR: Unhandled error in Deferred:
2012-10-02 10:41:45,112 unit:u1-updown/25: 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-0000000050

2012-10-02 10:41:45,114 unit:u1-updown/25: juju.agents.unit DEBUG: Configuration Changed
2012-10-02 10:41:45,118 unit:u1-updown/25: unit.lifecycle DEBUG: pre-stop acquire, running:True
2012-10-02 10:41:45,119 unit:u1-updown/25: unit.lifecycle DEBUG: stopping relation lifecycles
2012-10-02 10:41:45,119 unit:u1-updown/25: unit.lifecycle DEBUG: stopped unit lifecycle
2012-10-02 10:41:45,120 unit:u1-updown/25: hook.executor DEBUG: stopped
2012-10-02 10:41:45,122 unit:u1-updown/25: twisted ERROR: Unhandled error in Deferred:
2012-10-02 10:41:45,381 unit:u1-updown/25: 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'

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Seems legit, we should be checking the unit data's return type, or perhaps there is a deeper error allowing empty unit data to get there in the first place.

Changed in juju:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Kapil Thangavelu (hazmat) wrote : Re: [Bug 1060089] Re: failure during destroy-service

Its not material per se, there is no orderly/graceful shutdown of a unit in
pyjuju, its forcibly terminated by its machine agent atm, and these
tracebacks are possible. Go juju does address this.. this is effectively
juju should execute stop hooks. It would take a dev week to work on this.

On Tue, Oct 23, 2012 at 6:21 AM, Clint Byrum <email address hidden> wrote:

> Seems legit, we should be checking the unit data's return type, or
> perhaps there is a deeper error allowing empty unit data to get there in
> the first place.
>
> ** Changed in: juju
> Status: New => Triaged
>
> ** Changed in: juju
> Importance: Undecided => Medium
>
> --
> You received this bug notification because you are subscribed to juju.
> https://bugs.launchpad.net/bugs/1060089
>
> Title:
> failure during destroy-service
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1060089/+subscriptions
>

Curtis Hovey (sinzui)
Changed in juju:
importance: Medium → 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.