[vagrant] libvirt sometimes is missing information about hostname in leases

Bug #1570739 reported by Michal Rostecki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
Fix Released
Medium
Michal Rostecki

Bug Description

This behavior is reproducable in CentOS 7 with libvirt 1.2.17

Traceback (most recent call last):
  File "newest_dhcp_lease.py", line 130, in <module>
    main()
  File "newest_dhcp_lease.py", line 122, in main
    newest_dhcp_lease = get_vir_network_dhcp_lease(vm_name)
  File "newest_dhcp_lease.py", line 51, in wrapper
    return f(conn, *args, **kwargs)
  File "newest_dhcp_lease.py", line 70, in get_vir_network_dhcp_lease
    reverse=True)[0]['ipaddr']
IndexError: list index out of range

The leases are looking like:

[{'clientid': None,
  'expirytime': 1460712953L,
  'hostname': None,
  'iaid': None,
  'iface': 'virbr1',
  'ipaddr': '172.28.128.158',
  'mac': '52:54:00:cf:41:43',
  'ipaddr': '172.28.128.158', [201/277]
  'mac': '52:54:00:cf:41:43',
  'prefix': 24,
  'type': 0},
 {'clientid': None,
  'expirytime': 1460712953L,
  'hostname': None,
  'iaid': None,
  'iface': 'virbr1',
  'ipaddr': '172.28.128.107',
  'mac': '52:54:00:37:24:4e',
  'prefix': 24,
  'type': 0},
 {'clientid': None,
  'expirytime': 1460714372L,
  'hostname': None,
  'iaid': None,
  'iface': 'virbr1',
  'ipaddr': '172.28.128.97',
  'mac': '52:54:00:ec:34:64',
  'prefix': 24,
  'type': 0},
 {'clientid': None,
  'expirytime': 1460714419L,
  'hostname': None,
  'iaid': None,
  'iface': 'virbr1',
  'ipaddr': '172.28.128.173',
  'mac': '52:54:00:0c:83:3a',
  'prefix': 24,
  'type': 0},
 {'clientid': None,
  'expirytime': 1460714476L,
  'hostname': 'control01',
  'iaid': None,
  'iface': 'virbr1',
  'ipaddr': '172.28.128.249',
  'mac': '52:54:00:56:b5:a6',
  'prefix': 24,
  'type': 0},
 {'clientid': None,
  'expirytime': 1460714495L,
  'hostname': None,
  'iaid': None,
  'iface': 'virbr1',
  'ipaddr': '172.28.128.77',
  'mac': '52:54:00:d5:ac:72',
  'prefix': 24,
  'type': 0},
 {'clientid': None,
  'expirytime': 1460714513L,
  'hostname': 'storage01',
  'iaid': None,
  'iface': 'virbr1',
  'ipaddr': '172.28.128.146',
  'mac': '52:54:00:7a:83:97',
  'prefix': 24,
  'type': 0}]

So, there are hostnames missing. But on the other hand, all MAC addresses are in place and they're the real addresses which VM-s have.

Therefore we should look for MAC address of VM-s to ensure that vagrant-hostmanager will not fail.

Changed in kolla:
importance: Undecided → Medium
assignee: nobody → Michal Rostecki (mrostecki)
milestone: none → newton-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla (master)

Fix proposed to branch: master
Review: https://review.openstack.org/306284

Changed in kolla:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on kolla (master)

Change abandoned by Michal Rostecki (<email address hidden>) on branch: master
Review: https://review.openstack.org/306284

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla (master)

Reviewed: https://review.openstack.org/306284
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=9895e98d17a0ecf70711ef8e5aa4fdbbcd5bf7cf
Submitter: Jenkins
Branch: master

commit 9895e98d17a0ecf70711ef8e5aa4fdbbcd5bf7cf
Author: Michal Rostecki <email address hidden>
Date: Fri Apr 15 10:12:13 2016 +0200

    Use MAC address for looking for DHCP leases for Vagrant

    Change-Id: If87e83f7a50c0341f4b1238310eb1469eea0f767
    Closes-Bug: 1570739

Changed in kolla:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/kolla 3.0.0.0b2

This issue was fixed in the openstack/kolla 3.0.0.0b2 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/383178

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on kolla (stable/mitaka)

Change abandoned by Otavio Salvador (<email address hidden>) on branch: stable/mitaka
Review: https://review.openstack.org/383178
Reason: Patchset is said to not respect the stable policies.

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.