Comment 2 for bug 1368269

Revision history for this message
Blake Rouse (blake-rouse) wrote :

This is also why "juju bootstrap" is failing.

I have test it and juju results in:

ubuntu@maas-test:~$ juju bootstrap
Launching instance
WARNING picked arbitrary tools &{1.20.5-trusty-amd64 https://streams.canonical.com/juju/tools/releases/juju-1.20.5-trusty-amd64.tgz 7bb999e3cd2776148dcc4dafbd4af39655715187716f64d78f7a81cc42fd3fff 8224472}
^[[1;2CERROR bootstrap failed: cannot start bootstrap instance: gomaasapi: got error back from server: 400 BAD REQUEST ({"power_type": ["\nThe cluster controller for this node is not responding; power type\nvalidation is not available.\nUnable to get RPC connection for cluster 'maas'"]})
Bootstrap failed, destroying environment
ERROR cannot start bootstrap instance: gomaasapi: got error back from server: 400 BAD REQUEST ({"power_type": ["\nThe cluster controller for this node is not responding; power type\nvalidation is not available.\nUnable to get RPC connection for cluster 'maas'"]})

This is because the following happens in django, which drops the connection to the cluster, causing the power_type validation to fail.

INFO 2014-09-11 11:36:54,231 twisted RegionServer connection lost (HOST:IPv4Address(TCP, '127.0.0.1', 34533) PEER:IPv4Address(TCP, '127.0.0.1', 49858))
ERROR 2014-09-11 11:36:54,232 maasserver ################################ Exception: [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionDone$
>: Connection was closed cleanly.
] ################################
ERROR 2014-09-11 11:36:54,232 maasserver Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 112, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python2.7/dist-packages/django/views/decorators/vary.py", line 19, in inner_func
    response = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/piston/resource.py", line 167, in __call__
    result = self.error_handler(e, request, meth, em_format)
  File "/usr/lib/python2.7/dist-packages/piston/resource.py", line 165, in __call__
    result = meth(request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/maasserver/api/support.py", line 189, in dispatch
    return function(self, request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/maasserver/api/nodes.py", line 279, in start
    [system_id], request.user, user_data=user_data)
  File "/usr/lib/python2.7/dist-packages/maasserver/models/node.py", line 494, in start_nodes
    raise MultipleFailures(*update_host_maps_failures)
MultipleFailures: [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionDone'>: Connection was closed cleanly.
]

ERROR 2014-09-11 11:36:54,326 maasserver Unable to get RPC connection for cluster 'maas'
ERROR 2014-09-11 11:36:54,328 maasserver Unable to get RPC connection for cluster 'maas'
ERROR 2014-09-11 11:36:54,332 maasserver Unable to get RPC connection for cluster 'maas'
ERROR 2014-09-11 11:36:54,340 maasserver Unable to get RPC connection for cluster 'maas'
ERROR 2014-09-11 11:36:54,513 maasserver Unable to get RPC connection for cluster 'maas'
...many more...
ERROR 2014-09-11 11:36:58,723 maasserver Unable to get RPC connection for cluster 'maas'
ERROR 2014-09-11 11:36:58,727 maasserver Unable to get RPC connection for cluster 'maas'
ERROR 2014-09-11 11:36:58,736 maasserver Unable to get RPC connection for cluster 'maas'
ERROR 2014-09-11 11:36:58,811 twisted Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 824, in runUntilCurrent
    call.func(*call.args, **call.kw)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 467, in cancel
    self.errback(failure.Failure(CancelledError()))
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 423, in errback
    self._startRunCallbacks(fail)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 490, in _startRunCallbacks
    self._runCallbacks()
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 577, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/maasserver/rpc/regionservice.py", line 466, in cancelled
    raise exceptions.NoConnectionsAvailable()
provisioningserver.rpc.exceptions.NoConnectionsAvailable: