tripleo-ansible roles/tripleo_ceph_client putting ctlplane IPs in mon_host instead of storage network IPs when using composable networks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Fix Committed
|
High
|
John Fulton |
Bug Description
Deployed overcloud (3 control, 3 ceph-storage, 2 compute) with network isolation built 24 hours ago using fixes from the following bugs:
https:/
https:/
Glance public endpoint returned 503. Glance logs show:
ERROR glance_
On inspection of controllers it looks like ceph-ansible correctly configured /etc/ceph/ceph.conf with storage network IPs but that new ceph client role assigned IPs from provisioning network (192.168.24.1) and not the storage network.
[root@oc0-
mon host = [v2:172.
[root@oc0-
mon host = 192.168.
[root@oc0-
Changed in tripleo: | |
status: | New → Triaged |
importance: | Undecided → High |
root cause
This is the task that sets the IP:
- name: Get ceph_mon_ip addresses
tripleo_ ceph_client_ mon_ips: "{{ (tripleo_ ceph_client_ mon_ips | default([]))
| union([ (hostvars[ item][' storage_ ip']
| default( hostvars[ item][' ctlplane_ ip']))] ) }}"
set_fact:
loop: "{{ groups['ceph_mon'] | list }}"
It would work with network isolation PROVIDED that you used the default name of the storage network. In my case I had customized it.
- name: Controller cloud_0_ subnet api_cloud_ 0_subnet cloud_0_ subnet mgmt_cloud_ 0_subnet cloud_0_ subnet
description: |
Controller role that has all the controler services loaded and handles
Database, Messaging and Network functions.
CountDefault: 1
tags:
- primary
- controller
# Create external Neutron bridge for SNAT (and floating IPs when using
# ML2/OVS without DVR)
- external_bridge
networks:
External:
subnet: external_
InternalApi:
subnet: internal_
Storage:
subnet: storage_
StorageMgmt:
subnet: storage_
Tenant:
subnet: tenant_
...
So the task does the right thing when I modify it like this:
- name: Get ceph_mon_ip addresses
tripleo_ ceph_client_ mon_ips: "{{ (tripleo_ ceph_client_ mon_ips | default([]))
| union([ (hostvars[ item][' storage_ cloud_0_ ip']
| default( hostvars[ item][' ctlplane_ ip']))] ) }}"
set_fact:
loop: "{{ groups['ceph_mon'] | list }}"
Focussing on the workaround:
vs
We should probably not hard code either of the above.
We could back track futher to determine what they set based on the composable networks feature, for example:
https:/ /github. com/openstack/ tripleo- heat-templates/ blob/master/ roles/Controlle r.yaml
has:
networks:
Storage:
subnet: storage_subnet
While my customization used:
networks: cloud_0_ subnet
Storage:
subnet: storage_
So we COULD backtrack all the way up to networks and then work our way down to Storage and then grab whatever subnet is there to reason
storage_subnet --> storage_ip cloud_0_ subnet --> storage_cloud_0_ip
storage_