Bionic commissioning fails looking for wrong interfaces

Bug #1759284 reported by Michael Skalka
52
This bug affects 7 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Andres Rodriguez
2.3
Fix Released
High
Andres Rodriguez

Bug Description

MAAS version 2.3.0 (6434-gd354690-0ubuntu1~16.04.1)

Commissioning a node with Bionic fails looking for the wrong interface:

Device "enp47s0f" does not exist.
Traceback (most recent call last):
  File "/tmp/user_data.sh.zpl1BG/scripts/commissioning/00-maas-05-dhcp-unconfigured-ifaces", line 61, in <module>
    dhcp_explore(*args, **kwargs)
  File "/tmp/user_data.sh.zpl1BG/scripts/commissioning/00-maas-05-dhcp-unconfigured-ifaces", line 36, in dhcp_explore
    iface for iface in configured_ifaces if has_ipv4_address(iface)]
  File "/tmp/user_data.sh.zpl1BG/scripts/commissioning/00-maas-05-dhcp-unconfigured-ifaces", line 36, in <listcomp>
    iface for iface in configured_ifaces if has_ipv4_address(iface)]
  File "/tmp/user_data.sh.zpl1BG/scripts/commissioning/00-maas-05-dhcp-unconfigured-ifaces", line 15, in has_ipv4_address
    output = check_output(('ip', '-4', 'addr', 'list', 'dev', iface))
  File "/usr/lib/python3.6/subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '('ip', '-4', 'addr', 'list', 'dev', b'enp47s0f')' returned non-zero exit status 1.

Where the correct interface should be 'enp47s0f0' or 'enp47s0f1' as per the LSHW:

...
      <node id="network:0" disabled="true" claimed="true" class="network" handle="PCI:0000:2f:00.0">
       <description>Ethernet interface</description>
       <product>Ethernet Controller X710 for 10GbE SFP+</product>
       <vendor>Intel Corporation</vendor>
       <physid>0</physid>
       <businfo>pci@0000:2f:00.0</businfo>
       <logicalname>enp47s0f0</logicalname>
...

and

...
 <node id="network:1" claimed="true" class="network" handle="PCI:0000:2f:00.1">
       <description>Ethernet interface</description>
       <product>Ethernet Controller X710 for 10GbE SFP+</product>
       <vendor>Intel Corporation</vendor>
       <physid>0.1</physid>
       <businfo>pci@0000:2f:00.1</businfo>
       <logicalname>enp47s0f1</logicalname>
...

Commissioning with Xenial on the same node passes without issue.

Related branches

Changed in maas:
milestone: none → 2.4.0beta2
importance: Undecided → High
status: New → Triaged
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Hi Michael,

Is this still an issue? I've been unable to reproduce this issue.

Changed in maas:
status: Triaged → Incomplete
Revision history for this message
Manoj Iyer (manjo) wrote :

I have the same issue commissioning power9 system with MAAS version: 2.3.2 (6485-ge93e044-0ubuntu1~16.04.1), and is easily reproduced by commissioning dradis.maas on server teams's maas server.

Device "enP2p1s0" does not exist.
Traceback (most recent call last):
  File "/tmp/user_data.sh.nF9cl2/scripts/commissioning/00-maas-05-dhcp-unconfigured-ifaces", line 61, in <module>
    dhcp_explore(*args, **kwargs)
  File "/tmp/user_data.sh.nF9cl2/scripts/commissioning/00-maas-05-dhcp-unconfigured-ifaces", line 36, in dhcp_explore
    iface for iface in configured_ifaces if has_ipv4_address(iface)]
  File "/tmp/user_data.sh.nF9cl2/scripts/commissioning/00-maas-05-dhcp-unconfigured-ifaces", line 36, in <listcomp>
    iface for iface in configured_ifaces if has_ipv4_address(iface)]
  File "/tmp/user_data.sh.nF9cl2/scripts/commissioning/00-maas-05-dhcp-unconfigured-ifaces", line 15, in has_ipv4_address
    output = check_output(('ip', '-4', 'addr', 'list', 'dev', iface))
  File "/usr/lib/python3.6/subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '('ip', '-4', 'addr', 'list', 'dev', b'enP2p1s0')' returned non-zero exit status 1.

The correct interfaces it should look for are:
enP2p1s0f1
enP2p1s0f0
enP2p1s0f3
enP2p1s0f2

MAAS machine output yaml also lists the correct interface, so may be this is a regex error in the scripts?

Manoj Iyer (manjo)
Changed in maas:
status: Incomplete → Confirmed
Revision history for this message
Andres Rodriguez (andreserl) wrote :
Changed in maas:
status: Confirmed → In Progress
assignee: nobody → Andres Rodriguez (andreserl)
Changed in maas:
status: In Progress → 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.