F5Networks / f5-openstack-agent

The F5 Agent for OpenStack Neutron allows you to deploy BIG-IP services in an OpenStack environment.
http://clouddocs.f5.com/products/openstack/agent/latest
Apache License 2.0
14 stars 38 forks source link

neutronless.loadbalancer.test_loadbalancer.test_create_delete_basic_lb failed due to assert ONLINE coming up as false #883

Closed ssorenso closed 7 years ago

ssorenso commented 7 years ago
Suggested Bug Type:

Bug

We're expecting the given service request to result in a loadbalancer being brought online, and it isn't. This is what tests are for.

Traceback
bigip = <neutronless.testlib.bigip_client.BigIpClient object at 0x7f9152c4eb50>
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 0x7f91529eb710>

    def test_create_delete_basic_lb(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()

        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:63: AssertionError
Impacted test instances:

OpenStack Release

Mitaka

Agent Version

mitaka - e46a3c98070772ff27da829e91c8f5decb822056

Operating System

Nightly

ssorenso commented 7 years ago
bigip = <neutronless.testlib.bigip_client.BigIpClient object at 0x7f91529eb490>
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 0x7f9152bb7950>

    def test_create_delete_lb_snatoff(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()

        # Change the configuration so that Auto SNAT is used.
        icd_config['f5_snat_mode'] = "false"
        icd_config['f5_snat_addresses_per_subnet'] = 0

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

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

        # Create the loadbalancer
        icontrol_driver._common_service_handler(service)

        # 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_snat.py:260: AssertionError
mattgreene commented 7 years ago

Regression introduced with #882 and fixed with #894.