+++ This bug was initially created as a clone of Bug #1641421 +++ Description of problem: When trying to allocate a prefix length to a subnet created from a subnet pool using the openstack unified command the default length is used every time and the --prefix-length value is ignored. It works fine with the neutron command and the use of --prefixlen (as per https://docs.openstack.org/python-neutronclient/pike/cli/neutron-reference.html) Version-Release number of selected component (if applicable): python-tripleoclient-9.2.3-4.el7ost.noarch How reproducible: Given the following subnetpool: +-------------------+--------------------------------------+ | Field | Value | +-------------------+--------------------------------------+ | address_scope_id | | | created_at | 2018-10-22T03:24:26Z | | default_prefixlen | 28 | | default_quota | | | description | | | id | 139fd360-975a-4b4f-88bc-38ccdef765cb | | ip_version | 4 | | is_default | False | | max_prefixlen | 29 | | min_prefixlen | 26 | | name | demo-subnetpool | | prefixes | 192.168.128.0/18 | | project_id | ca3e1d5878764cc8a2aa8c5d2336c1c1 | | revision_number | 0 | | shared | True | | tags | | | tenant_id | ca3e1d5878764cc8a2aa8c5d2336c1c1 | | updated_at | 2018-10-22T03:24:26Z | +-------------------+--------------------------------------+ You should be able to do openstack subnet create --subnet-pool demo-subnetpool --prefix-length 27 --network my_network my_name and get a /27 subnet but instead you get a /28 (the default) Steps to Reproduce: 1. create a subnetpool with max, min, and default prefix settings neutron subnetpool-create --shared --pool-prefix 192.168.128.0/18 --default-prefixlen 28 --min-prefixlen 26 --max-prefixlen 29 demo-subnetpool 2. attempt to create a subnet from the pool using the openstack unified command, specifying a --prefix-length value 3. the --prefix-length will be ignored and the default is used. 4. doing the same with the neutron command (ie something like neutron subnet-create --name demo-subnet1 --ip_version 4 --subnetpool demo-subnetpool --prefixlen 27 test1) where --prefixlen is set WILL create a subnet with the /27 requested and NOT the default Actual results: --prefix-length is ignored and the default is given Expected results: --prefix-length is used
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:3747