Failed to create port on network <UUID>, because fixed_ips included invalid subnet <UUID>
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Magnum |
In Progress
|
Undecided
|
Felipe Reyes | ||
magnum (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
[Impact]
When creating a new "cluster"that overrides the fixed network defined in the cluster template, but not the subnet.
It would be expected that the cluster create request fails with a 400 error since the client is submitting an invalid request.
[Environment]
Focal Ussuri
[Test Case]
1. Create a new cluster template WITHOUT a fixed network/subnet set.
openstack coe cluster template create k8s-cluster-
--image fedora-coreos-32 \
--keypair testkey \
--external-
--flavor m1.small \
--network-
--coe kubernetes \
--fixed-network admin_net \
--fixed-subnet admin_subnet
2. Create a new cluster using the template previously created and select an existing network
openstack coe cluster create \
--cluster-
--timeout 120 \
--fixed-network private \
k8scluster
Expected result
The cluster gets created
Actual result:
The cluster creation fails with the following error:
$ openstack coe cluster show k8scluster -f json -c faults | jq -r '.faults'
{
"default-master": "Resource CREATE failed: BadRequest: resources.
"default-worker": "Resource CREATE failed: BadRequest: resources.
}
Changed in magnum (Ubuntu): | |
status: | New → Confirmed |
the issue can be reproduced using master (with devstack)
$ openstack coe cluster template create k8s-cluster- template --image fedora- coreos- 35.20220116. 3.0-openstack. x86_64 --keypair testkey --external-network public --flavor m1.small --network-driver flannel --coe kubernetes template accepted ------- ------- ---+--- ------- ------- ------- ------- ------- ------- ---+ ------- ------- ---+--- ------- ------- ------- ------- ------- ------- ---+ a710-4f24- 8850-f9911e7ff0 d5 | coreos- 35.20220116. 3.0-openstack. x86_64 | storage_ driver | overlay2 | template | 03T19:45: 21.945595+ 00:00 | ------- ------- ---+--- ------- ------- ------- ------- ------- ------- ---+ template k8s-cluster- template \ ...
Request to create cluster template k8s-cluster-
+------
| Field | Value |
+------
| insecure_registry | - |
| labels | {} |
| updated_at | - |
| floating_ip_enabled | True |
| fixed_subnet | - |
| master_flavor_id | - |
| uuid | 9c7edc11-
| no_proxy | - |
| https_proxy | - |
| tls_disabled | False |
| keypair_id | testkey |
| public | False |
| http_proxy | - |
| docker_volume_size | - |
| server_type | vm |
| external_network_id | public |
| cluster_distro | fedora-coreos |
| image_id | fedora-
| volume_driver | - |
| registry_enabled | False |
| docker_
| apiserver_port | - |
| name | k8s-cluster-
| created_at | 2023-10-
| network_driver | flannel |
| fixed_network | - |
| coe | kubernetes |
| flavor_id | m1.small |
| master_lb_enabled | False |
| dns_nameserver | 8.8.8.8 |
| hidden | False |
| tags | - |
+------
$ openstack coe cluster create \
--cluster-