F5Networks / f5-openstack-lbaasv2-driver

F5 LBaaSv2 service provider driver for OpenStack Liberty and beyond
http://clouddocs.f5.com/products/openstack/lbaasv2-driver/master/
Apache License 2.0
21 stars 37 forks source link

test_create_delete_basic_lb_nodisconnected fails in driver tests due to assert call_record.get failing #772

Closed ssorenso closed 7 years ago

ssorenso commented 7 years ago
Suggested issue type

Bug

We're expected to get something off of the BIG-IP and expecting it to be in an 'ONLINE' status, and so the functionality has changed.

Disclaimer: if the scenario is that the timing has changed because there is a separate worker taking on the load to determine if it's online or not, then multithreading/processing has changed this functionality in an expected way; thus, this would become a test bug.

Traceback
bigip = <neutronless.testlib.bigip_client.BigIpClient object at 0x7f9152a78750>
services = [{'healthmonitors': [], 'listeners': [], 'loadbalancer': {'admin_state_up': True, 'description': '', 'gre_vteps': [], ...up': True, 'description': '', 'gre_vteps': [], 'id': '50c5d54a-5a9e-4a80-9e74-8400a461a077', ...}, 'members': [], ...}]
icd_config = {'AGENT': '<oslo_config.cfg.GroupAttr object at 0x3b137d0>', 'OVS': '<oslo_config.cfg.GroupAttr object at 0x3ae9410>', 'advertise_mtu': False, 'advertised_tunnel_types': ['vxlan'], ...}
icontrol_driver = <f5_openstack_agent.lbaasv2.drivers.bigip.icontrol_driver.iControlDriver object at 0x7f9152b8d8d0>

    def test_create_delete_basic_lb_nodisconnected(
            bigip, services, icd_config, icontrol_driver):
        service_iter = iter(services)
        service = service_iter.next()
        lb_reader = LoadbalancerReader(service)
        env_prefix = icd_config['environment_prefix']
        fake_rpc = icontrol_driver.plugin_rpc
        hostname = bigip.get_device_name()
        icd_config['f5_network_segment_physical_network'] = None

        folder = '%s_%s' % (env_prefix, lb_reader.tenant_id())

        # Make sure we are starting clean.
        assert not bigip.folder_exists(folder)

        # Create the loadbalancer
        lb_pending = icontrol_driver._common_service_handler(service)
        assert not lb_pending

        # Assert that update loadbalancer status was called once
        assert fake_rpc.get_call_count('update_loadbalancer_status') == 1
        call_record = fake_rpc.get_calls('update_loadbalancer_status')[0]
>       assert call_record.get("operating_status", None) == 'ONLINE'
E       AssertionError: assert 'OFFLINE' == 'ONLINE'
E         - OFFLINE
E         ?  ^^
E         + ONLINE
E         ?  ^

../neutronless/loadbalancer/test_loadbalancer.py:171: AssertionError
Tests impacted

Agent Version

mitaka - e46a3c98070772ff27da829e91c8f5decb822056

Operating System

Nightly

ssorenso commented 7 years ago

This is an agent issue.