I meet a similar question , the root cause is that, when using admin user to create networking resource, he can override tenant_id attribute as he liked, even though the tenant may not exist, for example, I can use admin to create a network with invalid tenant_id, "neutron net-create --tenant-id aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test".
To solve this problem, I add a check to the function _get_tenant_id_for_create in neutron/db/common_db_mixin.py to make sure the tenant_id setted by admin user is valid.
I meet a similar question , the root cause is that, when using admin user to create networking resource, he can override tenant_id attribute as he liked, even though the tenant may not exist, for example, I can use admin to create a network with invalid tenant_id, "neutron net-create --tenant-id aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa a test". id_for_ create in neutron/ db/common_ db_mixin. py to make sure the tenant_id setted by admin user is valid.
To solve this problem, I add a check to the function _get_tenant_