Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1871048: OpenStack: dynamically set end of DHCP allocation pool #4077

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions data/data/openstack/topology/private-network.tf
Expand Up @@ -29,13 +29,11 @@ resource "openstack_networking_subnet_v2" "nodes" {
dns_nameservers = var.external_dns

# We reserve some space at the beginning of the CIDR to use for the VIPs
# It would be good to make this more dynamic by calculating the number of
# addresses in the provided CIDR. This currently assumes at least a /18.
# FIXME(mandre) if we let the ports pick up VIPs automatically, we don't have
# to do any of this.
allocation_pool {
start = cidrhost(local.nodes_cidr_block, 10)
end = cidrhost(local.nodes_cidr_block, 16000)
end = cidrhost(local.nodes_cidr_block, pow(2, (32 - split("/", local.nodes_cidr_block)[1])) - 2)
}
}

Expand Down