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

Create a Loadbalancer with a non-admin tenant without an explicit tenant_id failing community BVT test #458

Open jgruber opened 7 years ago

jgruber commented 7 years ago

Agent Version

9.2.0

Operating System

RHEL 7.3

OpenStack Release

Mitaka

Bug Severity

Severity: 5

Description

According to community BVT

neutron_lbaas.tests.tempest.v2.api.test_load_balancers_admin.LoadBalancersTestJSON.test_create_load_balancer_for_another_tenant

when a loadbalancer is created by a non-admin tenant and no tenant_id is explicitly specified, but a subnet in another tenant is specified, the loadbalacner create call should complete with provisioning_status ACTIVE and operating_status 'ONLINE', but the loadbalancer tenant_id should not equal subnet tenant_id.

Deployment

Run

neutron_lbaas.tests.tempest.v2.api.test_load_balancers_admin.LoadBalancersTestJSON.test_create_load_balancer_for_another_tenant

from /var/log/neutron/server.log

2017-02-27 15:51:32.512 32231 ERROR f5lbaasdriver.v2.bigip.service_builder [req-e475fe6a-c69b-4dd3-b3a5-27bb33a7aaec 4ccbfa14271d4483b264f43f5a65b7fc 62321425641140a786fd5998b5d14b96 - - -] Creating a loadbalancer bb189517-38c9-42dc-be17-0b74aa93fa29 for tenant 62321425641140a786fd5998b5d14b96 on a  non-shared network cdaca6b5-8d94-4d7c-8a3c-96671a668627 owned by a126089ac135476a9d06d502b8f0eee4.
2017-02-27 15:51:32.513 32231 ERROR f5lbaasdriver.v2.bigip.driver_v2 [req-e475fe6a-c69b-4dd3-b3a5-27bb33a7aaec 4ccbfa14271d4483b264f43f5a65b7fc 62321425641140a786fd5998b5d14b96 - - -] Exception: loadbalancer create: Tenant Id of network and loadbalancer mismatched
richbrowne commented 7 years ago

A non-admin tenant should not be able to create a loadbalancer on a another tenant's subnet. An admin should be able to create a loadbalancer on a tenant subnet, but it must specify the tenant id that matches the subnet. I will verify that this works in our driver.