When new system scopes are enforced, after fix for https://bugs.launchpad.net/neutron/+bug/1934115 is merged, there is another problem. When project admin creates SG for some tenant it tries to get default SG for that tenant to ensure that there is such default SG. But as project admin can't get resources which belongs to other tenant default SG is not found even if it actually is in DB. So that ends up with error like:
Aug 04 16:11:26 devstack-ubuntu-ovs neutron-server[308908]: ERROR oslo_db.api oslo_db.exception.DBDuplicateEntry: (pymysql.err.IntegrityError) (1062, "Duplicate entry 'c8b4c762cac744da9b442bf12140c70a' for key 'default_security_group.PRIM>
Aug 04 16:11:26 devstack-ubuntu-ovs neutron-server[308908]: ERROR oslo_db.api [SQL: INSERT INTO default_security_group (project_id, security_group_id) VALUES (%(project_id)s, %(security_group_id)s)]
Aug 04 16:11:26 devstack-ubuntu-ovs neutron-server[308908]: ERROR oslo_db.api [parameters: {'project_id': 'c8b4c762cac744da9b442bf12140c70a', 'security_group_id': 'b88530f8-46a8-4190-96f1-bbfd9ddac83c'}]
Aug 04 16:11:26 devstack-ubuntu-ovs neutron-server[308908]: ERROR oslo_db.api (Background on this error at: http://sqlalche.me/e/14/gkpj)
Fix proposed to branch: master /review. opendev. org/c/openstack /neutron/ +/803489
Review: https:/