Juju/MAAS does not provide feedback when there are no available nodes are found

Bug #1154805 reported by Andres Rodriguez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Invalid
High
Unassigned
pyjuju
Triaged
Low
Unassigned
maas (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

This bug was found when debugging for bug in [1].

The case being is that when we deploy a node via juju, and for whatever reason no available MAAS node is found, juju seems to have successfully deployed a service when it hasn't really.

1. Juju deploy shows that the service has been successfully deployed:

node@node:/var/log/maas$ juju deploy ubuntu
2013-03-13 15:57:16,067 INFO Searching for charm cs:precise/ubuntu in charm store
2013-03-13 15:57:17,253 INFO Connecting to environment...
2013-03-13 15:57:18,804 INFO Connected to environment.
2013-03-13 15:57:19,302 INFO Charm deployed as service: 'ubuntu'
2013-03-13 15:57:19,303 INFO 'deploy' command finished successfully

2. On a juju status, juju shows a node pending:
node@node:/var/log/maas$ juju status
2013-03-13 16:01:02,145 INFO Connecting to environment...
2013-03-13 16:01:03,659 INFO Connected to environment.
machines:
  0:
    agent-state: running
    dns-name: zookeeper.hdl
    instance-id: /MAAS/api/1.0/nodes/node-90ab5638-8c01-11e2-bda5-52540083b879/
    instance-state: unknown
  1:
    instance-id: pending
services:
  ubuntu:
    charm: cs:precise/ubuntu-0
    relations: {}
    units:
      ubuntu/1:
        agent-state: pending
        machine: 1
        public-address: null

3. Hence, no node is allocated (hence the WebUI doesn't show the allocated node). However, the maas.log does show the following error:

  File "/usr/lib/python2.7/dist-packages/piston/resource.py", line 166, in __call__
    result = self.error_handler(e, request, meth, em_format)
  File "/usr/lib/python2.7/dist-packages/piston/resource.py", line 164, in __call__
    result = meth(request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/maasserver/api.py", line 308, in dispatch
    return function(self, request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/maasserver/api.py", line 945, in acquire
    raise NodesNotAvailable("No matching node is available.")
NodesNotAvailable: No matching node is available.

This is unfortunate because for juju's eyes, a node was successfully deployed/allocated, while for MAAS eye's it hasn't. However, juju should show that no nodes are available and do not add a node that hasn't been allocated.

[1] https://bugs.launchpad.net/maas/+bug/1154803

Changed in maas:
importance: Undecided → Critical
importance: Critical → High
Revision history for this message
Julian Edwards (julian-edwards) wrote :

Maas returns a 409 CONFLICT when there's no node available. This is purely a Juju problem.

Changed in maas:
status: New → Invalid
Changed in maas (Ubuntu):
status: New → Invalid
Curtis Hovey (sinzui)
Changed in juju:
importance: Undecided → Low
status: New → Triaged
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.