Use the network name and pick subnet_id from subnet_ids
Use the network name and pick subnet_id from subnet_ids as some operators have repeating subnet names but no network names. This will fix the following error: ``` 2023-11-02 15:52:26.572376 | 5254009a-8986-d38c-8bcc-000000018786 | FATAL | Create a neutron port for a new address | undercloud | error={"changed": false, "extra_data": {"data": null, "details": "Invalid input for operation: Failed to create port on network 4241be4a-437a-4a10-8825-3ddd26993d23, because fixed_ips included invalid subnet da79981d-ec7e-4de0-967f-6872a5b82c6e.", "response": "{\"NeutronError\": {\"type\": \"InvalidInput\", \"message\": \"Invalid input for operation: Failed to create port on network 4241be4a-437a-4a10-8825-3ddd26993d23, because fixed_ips included invalid subnet da79981d-ec7e-4de0-967f-6872a5b82c6e.\", \"detail\": \"\"}}"}, "msg": "BadRequestException: 400: Client Error for url: https://10.10.10.10:13696/v2.0/ports, Invalid input for operation: Failed to create port on network 4241be4a-437a-4a10-8825-3ddd26993d23, because fixed_ips included invalid subnet da79981d-ec7e-4de0-967f-6872a5b82c6e. Change-Id: Id195be06b9e0c53604a4508c7106e79504060d48 ```
This commit is contained in:
parent
dc99354cf0
commit
3e6ab291cf
|
@ -236,7 +236,7 @@ outputs:
|
|||
- dns_listen_ips|length == 0
|
||||
block:
|
||||
- name: Get the subnet id for the proper network
|
||||
openstack.cloud.subnets_info:
|
||||
openstack.cloud.networks_info:
|
||||
name:
|
||||
if:
|
||||
- public_net_is_ctlplane
|
||||
|
@ -247,7 +247,7 @@ outputs:
|
|||
"$NETWORK_subnet"
|
||||
params:
|
||||
$NETWORK: {get_param: [ServiceNetMap, DesignateBindNetwork]}
|
||||
register: subnet_info
|
||||
register: network_info
|
||||
|
||||
- name: Create the extra IPs
|
||||
include_role:
|
||||
|
@ -256,4 +256,4 @@ outputs:
|
|||
vars:
|
||||
hosts_for_ports: "{{ groups.designate_bind }}"
|
||||
network_name: {get_param: [ServiceNetMap, DesignateBindNetwork]}
|
||||
subnet_id: "{{ subnet_info.openstack_subnets[0].id }}"
|
||||
subnet_id: "{{ network_info.subnet_ids[0] }}"
|
||||
|
|
Loading…
Reference in New Issue