Sometimes juju 2.1.2 reports "unexpected number of interfaces in response from creating device" when vlan interfaces are used with maas

Bug #1686071 reported by Dmitrii Shcherbakov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
High
Unassigned

Bug Description

As a fork of this bug for aliases:
https://bugs.launchpad.net/juju/+bug/1681902
https://bugs.launchpad.net/juju/+bug/1681902/comments/3

When multiple VLANs are used with Juju, it sometimes reports: "unexpected number of interfaces in response from creating device: [0xc82bd645b0 0xc82bd64680 0xc82bd64750 0xc82bd648f0]"

'Sometimes' because other machines seem to be ok with this fact.

The address printing is not very useful but it is clear that the issue is in part due to the fact that there are multiple interfaces present for a single MAC address (I use VLAN interfaces to have multiple subnets to test network spaces).

I don't remember having the same issue with juju 2.2 beta 2 and maas 2.2 rc1

dmitriis@maas-master:~/ha-bundle$ juju --version
2.1.2-xenial-amd64

MAAS versions + machine dump:
https://paste.ubuntu.com/24453630/

dmitriis@maas-master:~/ha-bundle$ juju show-machine 4
model: default
machines:
  "4":
    juju-status:
      current: started
      since: 25 Apr 2017 10:22:02Z
      version: 2.1.2
    dns-name: 10.0.16.4
    ip-addresses:
    - 10.0.16.4
    - 10.0.32.4
    - 10.0.7.131
    - 10.0.7.132
    - 10.0.9.3
    instance-id: s3xatf
    machine-status:
      current: running
      message: Deployed
      since: 25 Apr 2017 10:21:46Z
    series: xenial
    containers:
      4/lxd/0:
        juju-status:
          current: down
          message: agent is not communicating with the server
          since: 25 Apr 2017 10:27:49Z
        instance-id: pending
        machine-status:
          current: provisioning error
          message: 'unexpected number of interfaces in response from creating device:
            [0xc82bd645b0 0xc82bd64680 0xc82bd64750 0xc82bd648f0]'
          since: 25 Apr 2017 10:27:49Z
        series: xenial
        constraints: spaces=oam-space,ceph-access-space
      4/lxd/1:
        juju-status:
          current: down
          message: agent is not communicating with the server
          since: 25 Apr 2017 10:29:06Z
        instance-id: pending
        machine-status:
          current: provisioning error
          message: 'unexpected number of interfaces in response from creating device:
            [0xc82032b380 0xc82032b520 0xc82032b5f0 0xc82032b6c0]'
          since: 25 Apr 2017 10:29:06Z
        series: xenial
        constraints: spaces=oam-space,ceph-access-space
      4/lxd/2:
        juju-status:
          current: down
          message: agent is not communicating with the server
          since: 25 Apr 2017 10:30:22Z
        instance-id: pending
        machine-status:
          current: provisioning error
          message: 'unexpected number of interfaces in response from creating device:
            [0xc82a7b2750 0xc82a7b2820 0xc82a7b28f0]'
          since: 25 Apr 2017 10:30:22Z
        series: xenial
      4/lxd/3:
        juju-status:
          current: down
          message: agent is not communicating with the server
          since: 25 Apr 2017 10:33:48Z
        instance-id: pending
        machine-status:
          current: provisioning error
          message: 'can''t get info for image ''juju/xenial/amd64'': not found'
          since: 25 Apr 2017 10:33:48Z
        series: xenial
    constraints: tags=compute
    hardware: arch=amd64 cores=48 mem=393204M tags=compute,neutron availability-zone=default

----

ᚠ 2.1 provider/maas/environ.go

func (env *maasEnviron) allocateContainerAddresses2(hostInstanceID instance.Id, containerTag names.MachineTag, preparedInfo []network.InterfaceInfo) ([]network.InterfaceInfo, error) {
...

 interface_set := device.InterfaceSet()
 if len(interface_set) != 1 {
  // Shouldn't be possible as machine.CreateDevice always returns us
  // one interface.
  return nil, errors.Errorf("unexpected number of interfaces in response from creating device: %v", interface_set)
 }
 primaryNICVLAN := interface_set[0].VLAN()

--
goomaasapi

// InterfaceSet implements Device.
func (d *device) InterfaceSet() []Interface {
 result := make([]Interface, len(d.interfaceSet))
 for i, v := range d.interfaceSet {
  v.controller = d.controller
  result[i] = v
 }
 return result
}

Tags: network maas vlan
Tim Penhey (thumper)
Changed in juju:
status: New → Triaged
importance: Undecided → High
tags: added: maas network
tags: added: vlan
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.