DevStack: Bump SG quotas for "policy" SG driver

Looks like we only bump SG quotas when running with "namespace" SG
driver. This commit adds the same behavior for "policy" driver.

Change-Id: Id257bd0a1b5dfe847eb9769568b4e9cdbece0906
Closes-Bug: 1820284
This commit is contained in:
Michał Dulko 2019-03-15 15:03:18 +01:00
parent 8ca54e2592
commit e8f1f17061
1 changed files with 6 additions and 4 deletions

View File

@ -424,15 +424,17 @@ function configure_neutron_defaults {
--description "allow imcp traffic from everywhere to default namespace" \ --description "allow imcp traffic from everywhere to default namespace" \
--ethertype IPv4 --protocol icmp "$allow_namespace_sg_id" --ethertype IPv4 --protocol icmp "$allow_namespace_sg_id"
iniset "$KURYR_CONFIG" namespace_sg sg_allow_from_namespaces "$allow_namespace_sg_id"
iniset "$KURYR_CONFIG" namespace_sg sg_allow_from_default "$allow_default_sg_id"
fi
if [[ "$KURYR_SG_DRIVER" == "namespace" || "$KURYR_SG_DRIVER" == "policy" ]]; then
# NOTE(ltomasbo): As more security groups and rules are created, there # NOTE(ltomasbo): As more security groups and rules are created, there
# is a need to increase the quota for it # is a need to increase the quota for it
openstack --os-cloud devstack-admin --os-region "$REGION_NAME" \ openstack --os-cloud devstack-admin --os-region "$REGION_NAME" \
quota set --secgroups 100 --secgroup-rules 100 "$project_id" quota set --secgroups 100 --secgroup-rules 100 "$project_id"
iniset "$KURYR_CONFIG" namespace_sg sg_allow_from_namespaces "$allow_namespace_sg_id"
iniset "$KURYR_CONFIG" namespace_sg sg_allow_from_default "$allow_default_sg_id"
fi fi
if [ -n "$OVS_BRIDGE" ]; then if [ -n "$OVS_BRIDGE" ]; then
iniset "$KURYR_CONFIG" neutron_defaults ovs_bridge "$OVS_BRIDGE" iniset "$KURYR_CONFIG" neutron_defaults ovs_bridge "$OVS_BRIDGE"
fi fi