Symptoms: DevStack stack.sh fails with "Failure creating public IPv4 subnet".
Problem Trobleshooting:
stack.sh fails by T0 Uplink CIDR validation
stack.sh.log
2019-03-07 10:20:35.923 | ++++^[[3242mfunctions-common:oscwrap:2280 ^[(B^[[m openstack --os-cloud devstack-admin --os-region RegionOne subnet create --ip-version 4 --allocation-pool start=10.222.222.11,end=10.222.222.100 --gateway 10.222.222.1 --network 49283006-533f-4e45-bca6-782e52b9aed5 --subnet-range 10.222.222.0/24 --no-dhcp public-subnet
2019-03-07 10:20:39.296 | HttpException: Unknown error
2019-03-07 10:20:39.397 | +++^[[3242mfunctions-common:oscwrap:2280 ^[(B^[[m out=
2019-03-07 10:20:39.407 | +++^[[3242mfunctions-common:oscwrap:2281 ^[(B^[[m rc=1
2019-03-07 10:20:39.420 | ++++^[[3242mfunctions-common:oscwrap:2282 ^[(B^[[m date +%s%3N
2019-03-07 10:20:39.434 | +++^[[3242mfunctions-common:oscwrap:2282 ^[(B^[[m end=1551954039421
2019-03-07 10:20:39.442 | +++^[[3242mfunctions-common:oscwrap:2283 ^[(B^[[m echo 3529
2019-03-07 10:20:39.453 | +++^[[3242mfunctions-common:oscwrap:2285 ^[(B^[[m echo ''
2019-03-07 10:20:39.464 | +++^[[3242mfunctions-common:oscwrap:2286 ^[(B^[[m return 1
2019-03-07 10:20:39.475 | ++^[[3242mlib/neutron_plugins/services/l3:_neutron_create_public_subnet_v4:318 ^[(B^[[m id_and_ext_gw_ip=
2019-03-07 10:20:39.484 | ++^[[3242mlib/neutron_plugins/services/l3:_neutron_create_public_subnet_v4:319 ^[(B^[[m die_if_not_set 319 id_and_ext_gw_ip 'Failure creating public IPv4 subnet'
2019-03-07 10:20:39.492 | ++^[[3242mfunctions-common:die_if_not_set:205 ^[(B^[[m local exitcode=1
2019-03-07 10:20:39.539 | [ERROR] /home/m/devstack/functions-common:319 Failure creating public IPv4 subnet
journalctl
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00mTraceback (most recent call last):
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m File "/usr/lib/python2.7/site-packages/pecan/core.py", line 683, in __call__
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m self.invoke_controller(controller, args, kwargs, state)
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m File "/usr/lib/python2.7/site-packages/pecan/core.py", line 574, in invoke_controller
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m result = controller(*args, **kwargs)
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m File "/opt/stack/neutron/neutron/db/api.py", line 91, in wrapped
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m setattr(e, '_RETRY_EXCEEDED', True)
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m self.force_reraise()
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m six.reraise(self.type_, self.value, self.tb)
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m File "/opt/stack/neutron/neutron/db/api.py", line 87, in wrapped
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m return f(*args, **kwargs)
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 147, in wrapper
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m ectxt.value = e.inner_exc
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m self.force_reraise()
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m six.reraise(self.type_, self.value, self.tb)
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 135, in wrapper
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m return f(*args, **kwargs)
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m File "/opt/stack/neutron/neutron/db/api.py", line 126, in wrapped
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m LOG.debug("Retry wrapper got retriable exception: %s", e)
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m self.force_reraise()
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m six.reraise(self.type_, self.value, self.tb)
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m File "/opt/stack/neutron/neutron/db/api.py", line 122, in wrapped
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m return f(*dup_args, **dup_kwargs)
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m File "/opt/stack/neutron/neutron/pecan_wsgi/controllers/utils.py", line 76, in wrapped
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m return f(*args, **kwargs)
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m File "/opt/stack/neutron/neutron/pecan_wsgi/controllers/resource.py", line 159, in post
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m return self.create(resources)
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m File "/opt/stack/neutron/neutron/pecan_wsgi/controllers/resource.py", line 177, in create
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m return {key: creator(*creator_args, **creator_kwargs)}
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m File "/opt/stack/vmware-nsx/vmware_nsx/plugins/nsx_v3/plugin.py", line 1897, in create_subnet
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m self._validate_address_space(context, subnet['subnet'])
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m File "/opt/stack/vmware-nsx/vmware_nsx/plugins/nsx_v3/plugin.py", line 1791, in _validate_address_space
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m tier0_cidrs = rtr_port_client.get_tier0_uplink_cidrs(tier0_rtr)
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00mAttributeError: 'LogicalRouterPort' object has no attribute 'get_tier0_uplink_cidrs'
localhost neutron-server: ERROR neutron.pecan_wsgi.hooks.translation #033[01;35m#033[00m
Product Version:
NSX-T 2.3.1
CentOS 7.4
Analysis:
By default, vmware-nsxlib requirement is set to vmware-nsxlib<13.0.0. (https://github.com/openstack/vmware-nsx/blob/stable/queens/requirements.txt)
However get_tier0_uplink_cidrs is supported >=13.1.0. (https://github.com/openstack/vmware-nsxlib/commit/bb3fb29fad7de9a9ba8caad6265dbf3f5c0eee7f#diff-6981e3d7f86274106d9476a215939d19)
Fix proposed to branch: stable/queens /review. opendev. org/743688
Review: https:/