← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1747437] Re: DHCP TestDeviceManager tests fail when IPv6 is not enabled on testing host

 

Reviewed:  https://review.openstack.org/540868
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=9bef065bd0f05ecb9a3aed8bd2f651809a55dfec
Submitter: Zuul
Branch:    master

commit 9bef065bd0f05ecb9a3aed8bd2f651809a55dfec
Author: Maciej Józefczyk <maciej.jozefczyk@xxxxxxxxxxxx>
Date:   Mon Feb 5 15:14:43 2018 +0100

    Mock ipv6_utils.is_enabled_and_bind_by_default method
    
    We test DHCP agent DeviceManager without mocking method
    ipv6_utils.is_enabled_and_bind_by_default(). Because of that
    it fails all the time on hosts without IPv6 support.
    This patch adds mock to prevent those failures.
    
    Change-Id: Icb4854892839a20619e92852c8b1a317d71231da
    Closes-Bug: #1747437


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1747437

Title:
  DHCP TestDeviceManager tests fail when IPv6 is not enabled on testing
  host

Status in neutron:
  Fix Released

Bug description:
  When an instance has not enabled IPv6 listed tests are failing because
  of expected calls checks:

  networking_ovh.tests.unit.agent.linux.test_dhcp_agent.TestDeviceManager.test_setup
  networking_ovh.tests.unit.agent.linux.test_dhcp_agent.TestDeviceManager.test_setup_device_is_ready
  networking_ovh.tests.unit.agent.linux.test_dhcp_agent.TestDeviceManager.test_setup_ipv6

  
  Expected:
  [call.get_device_name({'fixed_ips': [{'subnet_id': 'bbbbbbbb-bbbb-bbbb-bbbbbbbbbbbb', 'subnet': {'network_id': '12345678-1234-5678-1234567890ab', 'enable_dhcp': True, 'tenant_id': 'aaaaaaaa-aaaa-aaaa-aaaaaaaaaaaa', 'ip_version': 4, 'id': 'bbbbbbbb-bbbb-bbbb-bbbbbbbbbbbb', 'allocation_pools': {'start': '172.9.9.2', 'id': '', 'end': '172.9.9.254'}, 'name': '', 'host_routes': [], 'dns_nameservers': [], 'gateway_ip': '172.9.9.1', 'ipv6_address_mode': None, 'cidr': '172.9.9.0/24', 'ipv6_ra_mode': None}, 'ip_address': '172.9.9.9'}], 'device_id': 'dhcp-12345678-1234-aaaa-1234567890ab', 'network_id': '12345678-1234-5678-1234567890ab', 'device_owner': '', 'mac_address': 'aa:bb:cc:dd:ee:ff', 'id': '12345678-1234-aaaa-1234567890ab', 'allocation_pools': {'start': '172.9.9.2', 'id': '', 'end': '172.9.9.254'}}),
       call.configure_ipv6_ra('qdhcp-12345678-1234-5678-1234567890ab', 'default', 0),
       call.plug('12345678-1234-5678-1234567890ab', '12345678-1234-aaaa-1234567890ab', 'tap12345678-12', 'aa:bb:cc:dd:ee:ff', mtu=None, namespace='qdhcp-12345678-1234-5678-1234567890ab'),
       call.init_l3('tap12345678-12', ['172.9.9.9/24', '169.254.169.254/16'], namespace='qdhcp-12345678-1234-5678-1234567890ab')]

  
  Actual:
  [call.get_device_name({'fixed_ips': [{'subnet_id': 'bbbbbbbb-bbbb-bbbb-bbbbbbbbbbbb', 'subnet': {'network_id': '12345678-1234-5678-1234567890ab', 'enable_dhcp': True, 'tenant_id': 'aaaaaaaa-aaaa-aaaa-aaaaaaaaaaaa', 'ip_version': 4, 'id': 'bbbbbbbb-bbbb-bbbb-bbbbbbbbbbbb', 'allocation_pools': {'start': '172.9.9.2', 'id': '', 'end': '172.9.9.254'}, 'name': '', 'host_routes': [], 'dns_nameservers': [], 'gateway_ip': '172.9.9.1', 'ipv6_address_mode': None, 'cidr': '172.9.9.0/24', 'ipv6_ra_mode': None}, 'ip_address': '172.9.9.9'}], 'device_id': 'dhcp-12345678-1234-aaaa-1234567890ab', 'network_id': '12345678-1234-5678-1234567890ab', 'device_owner': '', 'mac_address': 'aa:bb:cc:dd:ee:ff', 'id': '12345678-1234-aaaa-1234567890ab', 'allocation_pools': {'start': '172.9.9.2', 'id': '', 'end': '172.9.9.254'}}),
       call.plug('12345678-1234-5678-1234567890ab', '12345678-1234-aaaa-1234567890ab', 'tap12345678-12', 'aa:bb:cc:dd:ee:ff', mtu=None, namespace='qdhcp-12345678-1234-5678-1234567890ab'),
       call.init_l3('tap12345678-12', ['172.9.9.9/24', '169.254.169.254/16'], namespace='qdhcp-12345678-1234-5678-1234567890ab')]


  The problem occurs because
  neutron.common.ipv6_utils.is_enabled_and_bind_by_default() is not
  mocked.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1747437/+subscriptions


References