Comment 3 for bug 1510629

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

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 changed status',
     'id': 3,
     'level': 'info',
     'name': 'NODE_CHANGED_STATUS'}},
   {'created': 'Fri, 30 Oct. 2015 16:33:15',
    'description': 'commissioning',
    'id': 1053,
    'type': {'description': 'PXE Request',
     'id': 9,
     'level': 'info',
     'name': 'NODE_PXE_REQUEST'}},
   {'created': 'Fri, 30 Oct. 2015 16:33:12',
    'description': '',
    'id': 1049,
    'type': {'description': 'Node powered on',
     'id': 8,
     'level': 'info',
     'name': 'NODE_POWERED_ON'}},
   {'created': 'Fri, 30 Oct. 2015 16:33:08',
    'description': '',
    'id': 1048,
    'type': {'description': 'Powering node on',
     'id': 7,
     'level': 'info',
     'name': 'NODE_POWER_ON_STARTING'}},
   {'created': 'Fri, 30 Oct. 2015 16:33:07',
    'description': "From 'New' to 'Commissioning'",
    'id': 1047,
    'type': {'description': 'Node changed status',
     'id': 3,
     'level': 'info',
     'name': 'NODE_CHANGED_STATUS'}},
   {'created': 'Fri, 30 Oct. 2015 16:33:07',
    'description': '(admin)',
    'id': 1046,
    'type': {'description': 'User starting node commissioning',
     'id': 2,
     'level': 'info',
     'name': 'REQUEST_NODE_START_COMMISSIONING'}}],
  'extra_macs': [],
  'fabrics': ['fabric-0'],
  'fqdn': 'unlucky-grade.maas',
  'hostname': 'unlucky-grade',
  'hwe_kernel': '',
  'id': 2,
  'installation_results': [],
  'interfaces': [{'children': [],
    'enabled': True,
    'id': 2,
    'is_boot': True,
    'links': [{'id': 11, 'ip_address': '10.0.0.11', 'mode': 'dhcp'}],
    'mac_address': '52:54:00:e0:1d:2d',
    'name': 'eth0',
    'parents': [],
    'type': 'physical',
    'vlan_id': 0}],
  'license_key': '',
  'memory': '0.8',
  'min_hwe_kernel': '',
  'nodegroup': {'cluster_name': 'Cluster master',
   'id': 1,
   'name': 'maas',
   'uuid': '2e7dc731-d635-4ba8-8443-5811010d416e'},
  'osystem': 'ubuntu',
  'owner': '',
  'physical_disk_count': 1,
  'power_parameters': {'power_address': 'qemu+ssh://ricardo@10.0.0.1/system',
   'power_id': 'node-05',
   'power_pass': ''},
  'power_state': 'on',
  'power_type': 'virsh',
  'pxe_mac': '52:54:00:e0:1d:2d',
  'pxe_mac_vendor': 'Unknown Vendor',
  'routers': [],
  'show_os_info': False,
  'spaces': [],
  'status': 'Ready',
  'storage': '8.0',
  'storage_tags': ['rotary'],
  'subnets': [],
  'summary_xml': '...',
  'summary_yaml': '...',
  'supported_filesystems': [{'key': 'ext3', 'ui': 'ext3'},
   {'key': 'ext4', 'ui': 'ext4'},
   {'key': 'fat32', 'ui': 'fat32'}],
  'swap_size': None,
  'system_id': 'node-4e924b8a-7f33-11e5-95bf-525400b87781',
  'tags': [],
  'updated': 'Fri, 30 Oct. 2015 17:04:34',
  'zone': {'id': 1, 'name': 'default'}},
 'name': 'node',
 'type': 2}