[2.0a1] MAAS should be able to route to BMCs

Bug #1547275 reported by Andres Rodriguez
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Unassigned

Bug Description

Trying to add a node with IPMI for power parameters fails with the following traceback. The interesting thing, however, is that the Rack Controller may be trying to access a BMC that's is not directly connected to the Rack Controller, but rather, it has access via it using routing.

In other words, Rack Controllers need to poewr manage BMC's that are routed and not directly connected via a known network of MAAS.

==> /var/log/maas/regiond.log <==
2016-02-18 19:40:34 [-] Error on request (62) machine.create: 'NoneType' object has no attribute 'id'
 Traceback (most recent call last):
   File "/usr/lib/python3.5/threading.py", line 862, in run
     self._target(*self._args, **self._kwargs)
   File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 794, in worker
     return target()
   File "/usr/lib/python3/dist-packages/twisted/_threads/_threadworker.py", line 46, in work
     task()
   File "/usr/lib/python3/dist-packages/twisted/_threads/_team.py", line 190, in doWork
     task()
 --- <exception caught here> ---
   File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 246, in inContext
     result = inContext.theWork()
   File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 262, in <lambda>
     inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
   File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 118, in callWithContext
     return self.currentContext().callWithContext(ctx, func, *args, **kw)
   File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 81, in callWithContext
     return func(*args,**kw)
   File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 448, in call_within_transaction
     return func_outside_txn(*args, **kwargs)
   File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 275, in retrier
     return func(*args, **kwargs)
   File "/usr/lib/python3.5/contextlib.py", line 30, in inner
     return func(*args, **kwds)
   File "/usr/lib/python3/dist-packages/maasserver/websockets/handlers/machine.py", line 251, in create
     node_obj.start_commissioning(self.user)
   File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 432, in call_within_transaction
     return func_within_txn(*args, **kwargs)
   File "/usr/lib/python3.5/contextlib.py", line 30, in inner
     return func(*args, **kwds)
   File "/usr/lib/python3/dist-packages/maasserver/models/node.py", line 1343, in start_commissioning
     starting = self._start(user, commissioning_user_data)
   File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 432, in call_within_transaction
     return func_within_txn(*args, **kwargs)
   File "/usr/lib/python3.5/contextlib.py", line 30, in inner
     return func(*args, **kwds)
   File "/usr/lib/python3/dist-packages/maasserver/models/node.py", line 2693, in _start
     client_idents, fallback_idents = self._get_bmc_client_connection_info()
   File "/usr/lib/python3/dist-packages/maasserver/models/node.py", line 2615, in _get_bmc_client_connection_info
     client_idents = self.bmc.get_client_identifiers()
   File "/usr/lib/python3/dist-packages/maasserver/models/bmc.py", line 233, in get_client_identifiers
     rack_controllers = self.get_usable_rack_controllers()
   File "/usr/lib/python3/dist-packages/maasserver/models/bmc.py", line 200, in get_usable_rack_controllers
     if self.ip_address.subnet.id != subnet.id:
 builtins.AttributeError: 'NoneType' object has no attribute 'id'

Related branches

Revision history for this message
Andres Rodriguez (andreserl) wrote : Re: [2.0] Can't add a node with power parameters
Changed in maas:
importance: Undecided → Critical
milestone: none → 2.0.0
status: New → Incomplete
status: Incomplete → Confirmed
summary: - Can't add a node with power parameters
+ [2.0] Can't add a node with power parameters
Gavin Panella (allenap)
Changed in maas:
status: Confirmed → Triaged
Revision history for this message
Mark Shuttleworth (sabdfl) wrote :

Just ran into this in the garage, where BMCs are on a different network to the rest of MAAS, with routing.

While we need a rackd to be on the broadcast network for things like DHCP and PXE, we can probably route to the BMC or chassis controller. That said, some cloud operators will want to keep the management network (where the BMC is) completely isolated from the operational network.

So the interesting question is WHICH rack controllers can be assumed to be able to reach the BMC when the BMC is not on a network that a rack controller can see directly. It could be an arbitrary rack controller (i.e. any or all rack controller) or it could be only specific rack controllers.

The very simplest would be to have MAAS try to reach the BMC from rack controllers of its choice. In a small MAAS there will be few of those, so trying them all (a worst case situation) would not take long. And in a large cloud this information could be fed to MAAS through the API.

summary: - [2.0] Can't add a node with power parameters
+ [2.0a1] MAAS should be able to route to BMCs
Revision history for this message
Marc-Andre Gatien (m-gatien) wrote :

I'm experiencing the same issue with virsh and ipmi.

Changed in maas:
status: Triaged → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu:
status: New → Confirmed
no longer affects: ubuntu
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.