maas-test errors when the interface given on the command line has no IP address

Bug #1259972 reported by Raphaël Badin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
maas-test
Fix Committed
High
Jeroen T. Vermeulen

Bug Description

The DHCP detection code doesn't cope with a non-configured interface:

$ sudo ./bin/maas-test --bmc-mac aa:bb:cc:dd:ee:ff --bmc-username user --bmc-password pw eth0
2013-12-11 16:24:46,099 INFO Checking for KVM extensions.
2013-12-11 16:24:46,110 INFO Checking for virtualised hardware...
2013-12-11 16:24:46,163 INFO Scanning for unexpected DHCP servers on testing network...
Traceback (most recent call last):
  File "./bin/maas-test", line 9, in <module>
    load_entry_point('maas-test==0.1', 'console_scripts', 'maas-test')()
  File "/home/rvb/canonical/maas-test/maastest/main.py", line 62, in main
    dhcp_servers = probe_dhcp(args.interface)
  File "/home/rvb/canonical/maas-test/maastest/detect_dhcp.py", line 199, in probe_dhcp
    transaction_id = request_dhcp(interface)
  File "/home/rvb/canonical/maas-test/maastest/detect_dhcp.py", line 155, in request_dhcp
    bind_address = get_interface_IP(sock, interface)
  File "/home/rvb/canonical/maas-test/maastest/detect_dhcp.py", line 133, in get_interface_IP
    info = fcntl.ioctl(sock, SIOCGIFADDR, ifreq)
IOError: [Errno 99] Cannot assign requested address

Related branches

Changed in maas-test:
assignee: nobody → Jeroen T. Vermeulen (jtv)
status: Triaged → In Progress
Changed in maas-test:
status: In Progress → Fix Committed
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.