I can no longer see the IP address a node gets on the PXE interface on commissioning

Bug #1510629 reported by Andres Rodriguez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Blake Rouse

Bug Description

I commissioned a node and I wanted to SSH into the node. I went to check the Interface list to see what IP address it got, unfortunately, MAAS did not show what IP address it got.

In 1.8, MAAS would show the IP address the machine gets as: 192.168.10.20 (dynamic).

This information it is very useful for users who dont want to use the DNS name to ssh into the machine.

Related branches

Changed in maas:
importance: Undecided → Critical
milestone: none → 1.9.0
status: New → Triaged
Changed in maas:
assignee: nobody → Ricardo Bánffy (rbanffy)
Revision history for this message
Ricardo Bánffy (rbanffy) wrote :

VM node was commissioned and left on with SSH enabled. It got IP address 10.0.0.11, which is in the dynamic range of the DHCP configuration. Database shows one IP address, with DHCP alloc_type:

maasdb=# select id, ip, alloc_type from maasserver_staticipaddress;
 id | ip | alloc_type
----+----+------------
 11 | | 5
(1 row)

IP addess is not shown.

Revision history for this message
Ricardo Bánffy (rbanffy) wrote :

Subnets page also does not show the allocated IP address

Revision history for this message
Ricardo Bánffy (rbanffy) wrote :
Download full text (5.7 KiB)

Forcing the IP address into the table triggers the appropriate message through the web socket and updates the interface, showing the IP address (even though the interface is displayed as unconfigured)

maasdb=# update maasserver_staticipaddress set ip='10.0.0.11' where id = 11;UPDATE 1
maasdb=# select id, ip, alloc_type from maasserver_staticipaddress;
 id | ip | alloc_type
----+-----------+------------
 11 | 10.0.0.11 | 5
(1 row)

The message is as follows (reformatted for clarity, converted to Python syntax with some parts removed and replaced by "..."):

{'action': 'update',
 'data': {'actions': ['commission',
   'acquire',
   'deploy',
   'off',
   'mark-broken',
   'set-zone',
   'delete'],
  'architecture': 'amd64/generic',
  'bios_boot_method': 'pxe',
  'boot_disk': None,
  'boot_type': 'fastpath',
  'commissioning_results': '...',
  'cpu_count': 1,
  'created': 'Fri, 30 Oct. 2015 16:23:24',
  'devices': [],
  'disable_ipv4': False,
  'disks': [{'available_size': 0,
    'available_size_human': '0.0 bytes',
    'block_size': 4096,
    'filesystem': None,
    'id': 11,
    'model': '',
    'name': 'vda',
    'partition_table_type': 'MBR',
    'partitions': [{'filesystem': {'fstype': 'lvm-pv',
       'is_format_fstype': False,
       'label': None,
       'mount_point': None},
      'id': 10,
      'name': 'vda-part1',
      'path': '/dev/disk/by-dname/vda-part1',
      'size': 8586788864,
      'size_human': '8.6 GB',
      'type': 'partition',
      'used_for': 'LVM volume for vgroot'}],
    'path': '/dev/disk/by-dname/vda',
    'serial': '',
    'size': 8589934592,
    'size_human': '8.6 GB',
    'tags': ['rotary'],
    'type': 'physical',
    'used_for': 'MBR partitioned with 1 partition',
    'used_size': 8589934592,
    'used_size_human': '8.6 GB'},
   {'available_size': 0,
    'available_size_human': '0.0 bytes',
    'block_size': 4096,
    'filesystem': None,
    'id': 10,
    'model': '',
    'name': 'vgroot',
    'partition_table_type': '',
    'partitions': None,
    'path': '',
    'serial': '',
    'size': 8581545984,
    'size_human': '8.6 GB',
    'tags': [],
    'type': 'lvm-vg',
    'used_for': 'volume group',
    'used_size': 8581545984,
    'used_size_human': '8.6 GB'},
   {'available_size': 0,
    'available_size_human': '0.0 bytes',
    'block_size': 4096,
    'filesystem': {'fstype': 'ext4',
     'is_format_fstype': True,
     'label': 'root',
     'mount_point': '/'},
    'id': 12,
    'model': '',
    'name': 'vgroot-lvroot',
    'parent': {'id': 10,
     'type': 'lvm-vg',
     'uuid': '9e2fd078-603e-4686-95b7-3121b28e5e96'},
    'partition_table_type': '',
    'partitions': None,
    'path': '/dev/disk/by-dname/vgroot-lvroot',
    'serial': '',
    'size': 8581545984,
    'size_human': '8.6 GB',
    'tags': [],
    'type': 'virtual',
    'used_for': 'ext4 formatted filesystem mounted at /',
    'used_size': 8581545984,
    'used_size_human': '8.6 GB'}],
  'distro_series': 'trusty',
  'error': 'finished [9/9]',
  'error_description': '',
  'events': [{'created': 'Fri, 30 Oct. 2015 16:35:04',
    'description': "From 'Commissioning' to 'Ready'",
    'id': 1057,
    'type': {'description': 'Node cha...

Read more...

Revision history for this message
Ricardo Bánffy (rbanffy) wrote :

The issue seems to be related to a runtime failure to find the correct subnet for this IP:

2015-10-30 18:10:33 [-] Unhandled failure dispatching AMP command. This is probably a bug. Please ensure that this error is handled within application code or declared in the signature of the UpdateLeases command. [trusty-test:pid=11003:cmd=UpdateLeases:ask=19f]
 Traceback (most recent call last):
   File "/usr/lib/python2.7/threading.py", line 783, in __bootstrap
     self.__bootstrap_inner()
   File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
     self.run()
   File "/usr/lib/python2.7/threading.py", line 763, in run
     self.__target(*self.__args, **self.__kwargs)
   File "/usr/lib/python2.7/dist-packages/provisioningserver/utils/twisted.py", line 791, in _worker
     return super(ThreadPool, self)._worker()
 --- <exception caught here> ---
   File "/usr/lib/python2.7/dist-packages/twisted/python/threadpool.py", line 191, in _worker
     result = context.call(ctx, function, *args, **kwargs)
   File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext
     return self.currentContext().callWithContext(ctx, func, *args, **kw)
   File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext
     return func(*args,**kw)
   File "/usr/lib/python2.7/dist-packages/provisioningserver/utils/twisted.py", line 200, in wrapper
     return func(*args, **kwargs)
   File "/usr/lib/python2.7/dist-packages/maasserver/utils/orm.py", line 480, in call_within_transaction
     return func_outside_txn(*args, **kwargs)
   File "/usr/lib/python2.7/dist-packages/maasserver/utils/orm.py", line 307, in retrier
     return func(*args, **kwargs)
   File "/usr/lib/python2.7/dist-packages/django/db/transaction.py", line 339, in inner
     return func(*args, **kwargs)
   File "/usr/lib/python2.7/dist-packages/maasserver/rpc/leases.py", line 51, in update_leases
     StaticIPAddress.objects.update_leases(nodegroup, leases)
   File "/usr/lib/python2.7/dist-packages/maasserver/models/staticipaddress.py", line 451, in update_leases
     subnet_family = subnet.get_ipnetwork().version
 exceptions.AttributeError: 'NoneType' object has no attribute 'get_ipnetwork'

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

Ricardo,

That is a different bug, a critical one! Please file seperately! This one is targeting about the UI issue specifically. The branch I have review is UI/API only. It would not fox the issue you are seeing.

Revision history for this message
Ricardo Bánffy (rbanffy) wrote :

Opened lp:1511894 to deal with the DHCP parsing issue.

Changed in maas:
status: Triaged → Fix Committed
Changed in maas:
assignee: Ricardo Bánffy (rbanffy) → Blake Rouse (blake-rouse)
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.