Activity log for bug #2040242

Date Who What changed Old value New value Message
2023-10-24 07:08:00 Liu Xie bug added bug
2023-10-24 07:18:06 Liu Xie summary [ip allocation_pools] Why force first ip < (subnet.first + 1) if version of subnet is ipv6 [ipam] Why force first ip < (subnet.first + 1) if version of subnet is ipv6
2023-10-24 07:29:53 Liu Xie neutron: assignee Liu Xie (liushy)
2023-10-24 10:34:41 Liu Xie summary [ipam] Why force first ip < (subnet.first + 1) if version of subnet is ipv6 [ipam] Why prevent first ip < (subnet.first + 1) if version of subnet is ipv6
2023-10-24 10:35:18 Liu Xie description As we know, we can use ipv6 address end with '0' like 2001::. But when we allocate ipv6 pool use neutron, we could find the error like follows: neutron net-create net-v6 neutron subnet-create --ip-version 6 --allocation-pool start=2001::,end=2001::2 net-v6 2001::/64 The allocation pool 2001::-2001::2 spans beyond the subnet cidr 2001::/64. Neutron server returns request_ids: ['req-9a6569ed-52d7-4c3f-ad7e-8986a041a347'] We found that the error info from the func 'validate_allocation_pools': else: # IPv6 case subnet_first_ip = netaddr.IPAddress(subnet.first + 1) subnet_last_ip = netaddr.IPAddress(subnet.last) LOG.debug("Performing IP validity checks on allocation pools") ip_sets = [] for ip_pool in ip_pools: start_ip = netaddr.IPAddress(ip_pool.first, ip_pool.version) end_ip = netaddr.IPAddress(ip_pool.last, ip_pool.version) if (start_ip.version != subnet.version or end_ip.version != subnet.version): LOG.info("Specified IP addresses do not match " "the subnet IP version") raise exc.InvalidAllocationPool(pool=ip_pool) if start_ip < subnet_first_ip or end_ip > subnet_last_ip: LOG.info("Found pool larger than subnet " "CIDR:%(start)s - %(end)s", {'start': start_ip, 'end': end_ip}) raise exc.OutOfBoundsAllocationPool( pool=ip_pool, subnet_cidr=subnet_cidr) Why neutron ipam force first ip of one pool < (subnet.first + 1) if version of subnet is ipv6 ? As we know, we can use ipv6 address end with '0' like 2001::. But when we allocate ipv6 pool use neutron, we could find the error like follows: neutron net-create net-v6 neutron subnet-create --ip-version 6 --allocation-pool start=2001::,end=2001::2 net-v6 2001::/64 The allocation pool 2001::-2001::2 spans beyond the subnet cidr 2001::/64. Neutron server returns request_ids: ['req-9a6569ed-52d7-4c3f-ad7e-8986a041a347'] We found that the error info from the func 'validate_allocation_pools':         else: # IPv6 case             subnet_first_ip = netaddr.IPAddress(subnet.first + 1)             subnet_last_ip = netaddr.IPAddress(subnet.last)         LOG.debug("Performing IP validity checks on allocation pools")         ip_sets = []         for ip_pool in ip_pools:             start_ip = netaddr.IPAddress(ip_pool.first, ip_pool.version)             end_ip = netaddr.IPAddress(ip_pool.last, ip_pool.version)             if (start_ip.version != subnet.version or                     end_ip.version != subnet.version):                 LOG.info("Specified IP addresses do not match "                          "the subnet IP version")                 raise exc.InvalidAllocationPool(pool=ip_pool)             if start_ip < subnet_first_ip or end_ip > subnet_last_ip:                 LOG.info("Found pool larger than subnet "                          "CIDR:%(start)s - %(end)s",                          {'start': start_ip, 'end': end_ip})                 raise exc.OutOfBoundsAllocationPool(                     pool=ip_pool,                     subnet_cidr=subnet_cidr) Why neutron ipam force first ip of one pool >= (subnet.first + 1) if version of subnet is ipv6 ?
2023-10-24 14:43:42 Brian Haley bug added subscriber Brian Haley
2023-10-26 07:36:33 Lajos Katona tags ipv6 l3-ipam-dhcp
2023-10-26 09:01:36 OpenStack Infra neutron: status New In Progress
2023-10-26 23:55:30 Miguel Lavalle neutron: importance Undecided Medium
2023-10-26 23:58:04 Miguel Lavalle neutron: importance Medium Undecided
2023-10-27 00:04:28 Miguel Lavalle neutron: status In Progress Invalid