There are at least 3 or 4 conflicting mechanisms for introducing a set of neutron security group rules at project creation:
- the native neutron default security group rules mechanism. This is https://docs.openstack.org/python-openstackclient/latest/cli/command-objects/default-security-group-rule.html
- the custom keystone hooks we have. This is https://gerrit.wikimedia.org/r/plugins/gitiles/operations/puppet/+/refs/heads/production/modules/openstack/files/caracal/keystone/wmfkeystonehooks/wmfkeystonehooks.py
- tofu-infra. This is https://gitlab.wikimedia.org/repos/cloud/cloud-vps/tofu-infra
- stuff created via wmcs cookbooks
We have been using them inconsistently, and each has advantages and limitations.
The problem is that they don't mix well. For example:
- neutron wont notice the rules created by our custom keystone hook as being 'default' rules
- tofu-infra wont be able to track rules creates by either the neutron native mechanism or the keystone hook (or the cookbooks)
I think my proposal is to declare tofu-infra as the primary source of truth and drop the logic from all other places.