Comment 12 for bug 1525280

Revision history for this message
Ian Booth (wallyworld) wrote :

I've done a read through our code. I'm not convinced this isn't a MAAS problem. Based on seeing code for the first time, I think that:

- the /etc/network/interfaces file is generated using data obtained about the MAAS node
- the data obtained from the MAAS node has networking info in it, including the IntefaceName
- because the InterfaceName is "", the interfaces file is broken

So, to get the interface info for a mass node, we make a maas api call.

 maasInst := inst.(*maasInstance)
 maasObj := maasInst.maasObject
 result, err := maasObj.CallGet("details", nil)

The details which come back contains the output of running lshw on the node.
The lssw output contains stuff like this:

  *-network:0
       description: Ethernet interface
       physical id: 1
       logical name: virbr0-nic
       serial: 52:54:00:3f:42:d9
       size: 10Mbit/s
       capabilities: ethernet physical
       configuration: autonegotiation=off broadcast=yes driver=tun driverversion=1.6 duplex=full link=no multicast=yes port=twisted pair speed=10Mbit/s

The interface name used by juju comes from the logical name attribute above.

The next step is to look at debug output which hopefully contains some clues as to why Juju is getting a "" interface name. One explanation is that the logical name value sent back from MAAS is missing.