In tripleo we have two networks on the overcloud
# neutron net-show default-net
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| id | cd8b1087-068a-4510-937c-9d2b2bbcf034 |
| name | default-net |
| provider:network_type | local |
| provider:physical_network | |
| provider:segmentation_id | |
| router:external | False |
| shared | True |
| status | ACTIVE |
| subnets | f9e73be1-43da-493a-907e-bfdb6a9d79e3 |
| tenant_id | 9569ac5250b04c73b220b87bc43870de |
+---------------------------+--------------------------------------+
# neutron net-show ext-net
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| id | 8e4d4115-c1a1-404b-aa6f-d3241f12b3a0 |
| name | ext-net |
| provider:network_type | local |
| provider:physical_network | |
| provider:segmentation_id | |
| router:external | True |
| shared | False |
| status | ACTIVE |
| subnets | ca360565-9220-4706-bb7c-c9215f1f3273 |
| tenant_id | 9569ac5250b04c73b220b87bc43870de |
+---------------------------+--------------------------------------+
The admin user has access to both networks and needs to specify which network to start a instance on
This Errors
# nova boot --image cirros --flavor 1 qt
ERROR: Multiple possible networks found, use a Network ID to be more specific. (HTTP 400) (Request-ID: req-7e99b3f7-c201-4295-9cbf-e7c6430f9818)
This works
# nova boot --image cirros --flavor 1 --nic net-id=cd8b1087-068a-4510-937c-9d2b2bbcf034 qt
In tempest we have the same problem for example (there are others)
# testr run tempest.api.compute.admin.test_quotas.QuotasAdminTestJSON
File "/opt/stack/tempest/tempest/services/compute/json/servers_client.py", line 82, in create_server
Details: {u'badRequest': {u'message': u'Multiple possible networks found, use a Network ID to be more specific.', u'code': 400}}
From what I can see its because BaseComputeTest.create_test_server doesn't specify a network, if I hard code the network id into create_server the test passes
diff --git a/tempest/api/compute/base.py b/tempest/api/compute/base.py
index d9ede31..0b0105f 100644
--- a/tempest/api/compute/base.py
+++ b/tempest/api/compute/base.py
@@ -101,7 +101,7 @@ class BaseComputeTest(tempest.test.BaseTestCase):
image_id = kwargs.get('image_id', cls.image_ref)
resp, body = cls.servers_client.create_server(
- name, image_id, flavor, **kwargs)
+ name, image_id, flavor, networks=[{"uuid": "cd8b1087-068a-4510-937c-9d2b2bbcf034"}], **kwargs)
# handle the case of multiple servers
servers = [body]
Should this option be exposed in the config file? e.g. default network for instance if none is provided?
Isn't the answer 'don't run tempest as admin' ?