With https://github.com/openstack/python-tempestconf/commit/ca51d4d94c7b87444c65eb33734ee76e74834188 we added support to microversions and so, tempest started to have compute.min_microversion and compute.max_microversion option in tempest.conf.
With these two options, the test tempest test_auto_allocate_network started to run. This test tries to create 3 servers, and auto allocate networks for that, failing with this:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/tempest/api/compute/admin/test_auto_allocate_network.py", line 177, in test_server_multi_create_auto_allocate
min_count=3)
File "/usr/lib/python2.7/site-packages/tempest/common/compute.py", line 198, in create_test_server
**kwargs)
File "/usr/lib/python2.7/site-packages/tempest/lib/services/compute/servers_client.py", line 97, in create_server
resp, body = self.post('servers', post_body)
File "/usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py", line 283, in post
return self.request('POST', url, extra_headers, headers, body, chunked)
File "/usr/lib/python2.7/site-packages/tempest/lib/services/compute/base_compute_client.py", line 48, in request
method, url, extra_headers, headers, body, chunked)
File "/usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py", line 679, in request
self._error_checker(resp, resp_body)
File "/usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py", line 790, in _error_checker
raise exceptions.BadRequest(resp_body, resp=resp)
tempest.lib.exceptions.BadRequest: Bad request
Details: {u'message': u'Unable to automatically allocate a network for project 5dbbfe79176e475f9d02c346b3dc03fc', u'code': 400}
Checking the documentation in [1] in order to have the "Get me a network" behavior, required to execute this test, you need to have a shared pool, and the default network and router configured.
In that case, I went and create a subnet pool with the following command:
# set the public network as default
openstack network set public --default
# Create the subnet pool
openstack subnet pool create --share --default --pool-prefix 10.0.0.0/24 --default-prefix-length 26 shared-default
Then I got this error:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/tempest/api/compute/admin/test_auto_allocate_network.py", line 177, in test_server_multi_create_auto_allocate
min_count=3)
File "/usr/lib/python2.7/site-packages/tempest/common/compute.py", line 253, in create_test_server
for server in servers:
File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
self.force_reraise()
File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
six.reraise(self.type_, self.value, self.tb)
File "/usr/lib/python2.7/site-packages/tempest/common/compute.py", line 236, in create_test_server
clients.servers_client, server['id'], wait_until)
File "/usr/lib/python2.7/site-packages/tempest/common/waiters.py", line 76, in wait_for_server_status
server_id=server_id)
tempest.exceptions.BuildErrorException: Server 2b0cf5c8-1707-461d-8836-2730be4cf3bd failed to build and is in ERROR status
Details: {u'message': u'Exceeded maximum number of retries. Exhausted all hosts available for retrying build failures for instance 2b0cf5c8-1707-461d-8836-2730be4cf3bd.', u'code': 500, u'created': u'2019-04-04T10:34:37Z'}
I believe this is because there aren't enough resources to create 3 vm's.
Now, I am not an neutron specialist here, so my suggestion is one of the bellow:
1 - Keep the test in the skip list
2 - Contact someone who understand about network, to show us how to really configure the subnet pool properly based on our network configuration
I also want to point, this test wasn't being executed before.
Here's how validate-tempest create the public network to execute the tests:
I believe we must set a way to link the subnet pool with the ext-subnet, but I don't know how. I check the documentation, but I wasn't able to find it.
So here's my findings:
With https:/ /github. com/openstack/ python- tempestconf/ commit/ ca51d4d94c7b874 44c65eb33734ee7 6e74834188 we added support to microversions and so, tempest started to have compute. min_microversio n and compute. max_microversio n option in tempest.conf. allocate_ network started to run. This test tries to create 3 servers, and auto allocate networks for that, failing with this:
With these two options, the test tempest test_auto_
Traceback (most recent call last): python2. 7/site- packages/ tempest/ api/compute/ admin/test_ auto_allocate_ network. py", line 177, in test_server_ multi_create_ auto_allocate python2. 7/site- packages/ tempest/ common/ compute. py", line 198, in create_test_server python2. 7/site- packages/ tempest/ lib/services/ compute/ servers_ client. py", line 97, in create_server 'servers' , post_body) python2. 7/site- packages/ tempest/ lib/common/ rest_client. py", line 283, in post 'POST', url, extra_headers, headers, body, chunked) python2. 7/site- packages/ tempest/ lib/services/ compute/ base_compute_ client. py", line 48, in request python2. 7/site- packages/ tempest/ lib/common/ rest_client. py", line 679, in request _error_ checker( resp, resp_body) python2. 7/site- packages/ tempest/ lib/common/ rest_client. py", line 790, in _error_checker BadRequest( resp_body, resp=resp) lib.exceptions. BadRequest: Bad request f9d02c346b3dc03 fc', u'code': 400}
File "/usr/lib/
min_count=3)
File "/usr/lib/
**kwargs)
File "/usr/lib/
resp, body = self.post(
File "/usr/lib/
return self.request(
File "/usr/lib/
method, url, extra_headers, headers, body, chunked)
File "/usr/lib/
self.
File "/usr/lib/
raise exceptions.
tempest.
Details: {u'message': u'Unable to automatically allocate a network for project 5dbbfe79176e475
Checking the documentation in [1] in order to have the "Get me a network" behavior, required to execute this test, you need to have a shared pool, and the default network and router configured.
In that case, I went and create a subnet pool with the following command:
# set the public network as default
openstack network set public --default
# Create the subnet pool prefix- length 26 shared-default
openstack subnet pool create --share --default --pool-prefix 10.0.0.0/24 --default-
Then I got this error:
Traceback (most recent call last): python2. 7/site- packages/ tempest/ api/compute/ admin/test_ auto_allocate_ network. py", line 177, in test_server_ multi_create_ auto_allocate python2. 7/site- packages/ tempest/ common/ compute. py", line 253, in create_test_server python2. 7/site- packages/ oslo_utils/ excutils. py", line 220, in __exit__ force_reraise( ) python2. 7/site- packages/ oslo_utils/ excutils. py", line 196, in force_reraise reraise( self.type_ , self.value, self.tb) python2. 7/site- packages/ tempest/ common/ compute. py", line 236, in create_test_server servers_ client, server['id'], wait_until) python2. 7/site- packages/ tempest/ common/ waiters. py", line 76, in wait_for_ server_ status id=server_ id) exceptions. BuildErrorExcep tion: Server 2b0cf5c8- 1707-461d- 8836-2730be4cf3 bd failed to build and is in ERROR status 1707-461d- 8836-2730be4cf3 bd.', u'code': 500, u'created': u'2019- 04-04T10: 34:37Z' }
File "/usr/lib/
min_count=3)
File "/usr/lib/
for server in servers:
File "/usr/lib/
self.
File "/usr/lib/
six.
File "/usr/lib/
clients.
File "/usr/lib/
server_
tempest.
Details: {u'message': u'Exceeded maximum number of retries. Exhausted all hosts available for retrying build failures for instance 2b0cf5c8-
I believe this is because there aren't enough resources to create 3 vm's.
Now, I am not an neutron specialist here, so my suggestion is one of the bellow:
1 - Keep the test in the skip list
2 - Contact someone who understand about network, to show us how to really configure the subnet pool properly based on our network configuration
I also want to point, this test wasn't being executed before.
Here's how validate-tempest create the public network to execute the tests:
openstack network create public --external \
--provider- network- type flat \
--provider- physical- network datacentre
openstack network set datacentre --default
openstack subnet create ext-subnet \ n-pool \ 10.0.0. 100,end= 10.0.0. 120 \
--allocatio
start=
--no-dhcp \
--gateway 10.0.0.1 \
--network public \
--subnet-range 10.0.0.0/24
I believe we must set a way to link the subnet pool with the ext-subnet, but I don't know how. I check the documentation, but I wasn't able to find it.
1 - https:/ /docs.openstack .org/neutron/ rocky/admin/ config- auto-allocation .html