Closed ssorenso closed 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
openstack_agent_mitaka_12.1.2-overcloud.12.consoleText
test_create_delete_lb_snatoff
md5sum:6d97347c24c3ed88e4310d8d156308d7
Regression introduced with #882 and fixed with #894.
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
Impacted test instances:
openstack_agent_mitaka_12.1.2-overcloud.12.consoleText
test_create_delete_basic_lb
md5sum:1edafa61ba716a69ad957bd592761350
OpenStack Release
Mitaka
Agent Version
mitaka - e46a3c98070772ff27da829e91c8f5decb822056
Operating System
Nightly