500 error when trying to acquire a commissioned node (AddrFormatError: failed to detect a valid IP address from None)

Bug #1364993 reported by Newell Jensen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Raphaël Badin

Bug Description

When trying to acquire a commissioned node, an http 500 error is displayed and this is the resulting stacktrace:

==> /var/log/maas/maas-django.log <==
ERROR 2014-09-03 07:23:54,435 django.request Internal Server Error: /MAAS/nodes/node-08c1a7ce-2e1a-11e4-99c7-525400ca9f32/view/
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/generic/base.py", line 69, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/maasserver/views/nodes.py", line 595, in dispatch
    return super(NodeView, self).dispatch(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 87, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/django/views/generic/edit.py", line 228, in post
    return super(BaseUpdateView, self).post(request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/django/views/generic/edit.py", line 171, in post
    return self.form_valid(form)
  File "/usr/lib/python2.7/dist-packages/django/views/generic/edit.py", line 147, in form_valid
    self.object = form.save()
  File "/usr/lib/python2.7/dist-packages/maasserver/forms.py", line 900, in save
    message = action.execute(allow_redirect=allow_redirect)
  File "/usr/lib/python2.7/dist-packages/maasserver/node_action.py", line 285, in execute
    Node.objects.start_nodes([self.node.system_id], self.user)
  File "/usr/lib/python2.7/dist-packages/maasserver/models/node.py", line 485, in start_nodes
    update_host_maps_failures = list(update_host_maps(static_mappings))
  File "/usr/lib/python2.7/dist-packages/maasserver/clusterrpc/dhcp.py", line 130, in update_host_maps
    for response in async.gather(list(calls), timeout=timeout):
  File "/usr/lib/python2.7/dist-packages/maasserver/clusterrpc/dhcp.py", line 103, in gen_calls_to_remove_dynamic_host_maps
    for nodegroup, ip_address in ip_addresses_with_maps:
  File "/usr/lib/python2.7/dist-packages/maasserver/clusterrpc/dhcp.py", line 74, in gen_dynamic_ip_addresses_with_host_maps
    for ngi in nodegroup.get_managed_interfaces())
  File "/usr/lib/python2.7/dist-packages/maasserver/clusterrpc/dhcp.py", line 74, in <genexpr>
    for ngi in nodegroup.get_managed_interfaces())
  File "/usr/lib/python2.7/dist-packages/netaddr/ip/__init__.py", line 1289, in __init__
    self._start = IPAddress(start, flags=flags)
  File "/usr/lib/python2.7/dist-packages/netaddr/ip/__init__.py", line 315, in __init__
    'address from %r' % addr)
AddrFormatError: failed to detect a valid IP address from None

Looks like gen_dynamic_ip_addresses_with_host_maps: it should skip the ngi with no static_ip_range_low/hig

Related branches

Revision history for this message
Raphaël Badin (rvb) wrote : Re: Exception raised while acquiring a node: AddrFormatError: failed to detect a valid IP address from None

I think gen_dynamic_ip_addresses_with_host_maps has bug: it should skip the node group interfaces with no static_ip_range_low/high

summary: - gen_dynamic_ip_addresses_with_host_maps: it should skip the ngi with no
- static_ip_range_low/hig
+ AddrFormatError: failed to detect a valid IP address from None
summary: - AddrFormatError: failed to detect a valid IP address from None
+ Exception raised while acquiring a node: AddrFormatError: failed to
+ detect a valid IP address from None
summary: - Exception raised while acquiring a node: AddrFormatError: failed to
- detect a valid IP address from None
+ 500 error when trying to acquire a commissioned node
description: updated
Raphaël Badin (rvb)
summary: - 500 error when trying to acquire a commissioned node
+ 500 error when trying to acquire a commissioned node (AddrFormatError:
+ failed to detect a valid IP address from None)
Raphaël Badin (rvb)
Changed in maas:
milestone: none → 1.7.0
assignee: nobody → Raphaël Badin (rvb)
status: New → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
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.