Steps to reproduce:
- Setup designate and neutron with dns-integration
- Create a zone in designate
- Create two floating ips with dns entries in that zone
- Try to look up the ptr records
ubuntu@jh-devstack-03:~/devstack$ openstack ptr record show RegionOne:6cace681-69aa-4cb5-a878-7bd2a11e5090
+-------------+------------------------------------------------+
| Field | Value |
+-------------+------------------------------------------------+
| action | None |
| address | 172.24.4.9 |
| description | None |
| id | RegionOne:16cde9a1-b931-4521-9378-e79cfd7b7114 |
| ptrdname | None |
| status | ACTIVE |
| ttl | None |
+-------------+------------------------------------------------+
Note the mismatch in the IDs.
See http://paste.openstack.org/show/625918/ for complete sample output.
Issue first seen with Ocata, but reproducible with current master.
Logs seem to indicate that designate-central is responding with a list of all FIPs, but designate-api only expects a single response:
Nov 09 12:20:21 jh-devstack-03 designate-api[20338]: 2017-11-09 12:20:21.811 20338 DEBUG designate.central.rpcapi [req-821cfab6-e1af-4ca4-89b8-0b6a8ad6c91d f508fd532e604617a4417f7c3c0e1e7f cc796f87cd9d484dbd0d0d0ca0109fbd - - -] Calling designate.central.get_floatingip() o
ver RPC wrapped /opt/stack/designate/designate/loggingutils.py:24
Nov 09 12:20:21 jh-devstack-03 designate-api[20338]: 2017-11-09 12:20:21.912 20338 INFO designate.api.v2.controllers.floatingips [req-821cfab6-e1af-4ca4-89b8-0b6a8ad6c91d f508fd532e604617a4417f7c3c0e1e7f cc796f87cd9d484dbd0d0d0ca0109fbd - - -] Retrieved <FloatingIP key:'RegionOne:16cde9a1-b931-4521-9378-e79cfd7b7114' address:'172.24.4.9' ptrdname:'None'>
Nov 09 12:20:21 jh-devstack-03 designate-api[20338]: 2017-11-09 12:20:21.914 20338 INFO eventlet.wsgi [req-821cfab6-e1af-4ca4-89b8-0b6a8ad6c91d f508fd532e604617a4417f7c3c0e1e7f cc796f87cd9d484dbd0d0d0ca0109fbd - - -] 192.168.0.6,192.168.0.6 - - [09/Nov/2017 12:20:21] "GET
/v2/reverse/floatingips/RegionOne:6cace681-69aa-4cb5-a878-7bd2a11e5090 HTTP/1.1" 200 485 0.155651
Nov 09 12:20:21 jh-devstack-03 designate-central[20194]: 2017-11-09 12:20:21.819 20194 DEBUG designate.network_api.base [req-821cfab6-e1af-4ca4-89b8-0b6a8ad6c91d f508fd532e604617a4417f7c3c0e1e7f cc796f87cd9d484dbd0d0d0ca0109fbd - - -] Returning endpoints: [(u'https://192.1
68.0.6:9696/', u'RegionOne')] _endpoints /opt/stack/designate/designate/network_api/base.py:60 Nov 09 12:20:21 jh-devstack-03 designate-central[20194]: 2017-11-09 12:20:21.820 20194 DEBUG designate.network_api.neutron [req-821cfab6-e1af-4ca4-89b8-0b6a8ad6c91d f508fd532e604617a4417f7c3c0e1e7f cc796f87cd9d484dbd0d0d0ca0109fbd - - -] Attempting to fetch FloatingIPs fro
m https://192.168.0.6:9696/ @ RegionOne _call /opt/stack/designate/designate/network_api/neutron.py:117 Nov 09 12:20:21 jh-devstack-03 designate-central[20194]: 2017-11-09 12:20:21.821 20194 DEBUG neutronclient.client [req-821cfab6-e1af-4ca4-89b8-0b6a8ad6c91d f508fd532e604617a4417f7c3c0e1e7f cc796f87cd9d484dbd0d0d0ca0109fbd - - -] REQ: curl -i https://192.168.0.6:9696//v2.0/
floatingips?tenant_id=cc796f87cd9d484dbd0d0d0ca0109fbd -X GET -H "User-Agent: python-neutronclient" -H "X-Auth-Token: {SHA1}0b7e4504efb09de4fbf9c1db2af9bb084a274d9a" http_log_req /usr/local/lib/python2.7/dist-packages/neutronclient/common/utils.py:195 Nov 09 12:20:21 jh-devstack-03 designate-central[20194]: 2017-11-09 12:20:21.823 20194 DEBUG urllib3.connectionpool [req-821cfab6-e1af-4ca4-89b8-0b6a8ad6c91d f508fd532e604617a4417f7c3c0e1e7f cc796f87cd9d484dbd0d0d0ca0109fbd - - -] Starting new HTTPS connection (1): 192.168
.0.6 _new_conn /usr/local/lib/python2.7/dist-packages/urllib3/connectionpool.py:824 Nov 09 12:20:21 jh-devstack-03 designate-central[20194]: 2017-11-09 12:20:21.861 20194 DEBUG urllib3.connectionpool [req-821cfab6-e1af-4ca4-89b8-0b6a8ad6c91d f508fd532e604617a4417f7c3c0e1e7f cc796f87cd9d484dbd0d0d0ca0109fbd - - -] https://192.168.0.6:9696 "GET //v2.0/float
ingips?tenant_id=cc796f87cd9d484dbd0d0d0ca0109fbd HTTP/1.1" 200 1547 _make_request /usr/local/lib/python2.7/dist-packages/urllib3/connectionpool.py:396 Nov 09 12:20:21 jh-devstack-03 designate-central[20194]: 2017-11-09 12:20:21.863 20194 DEBUG neutronclient.client [req-821cfab6-e1af-4ca4-89b8-0b6a8ad6c91d f508fd532e604617a4417f7c3c0e1e7f cc796f87cd9d484dbd0d0d0ca0109fbd - - -] RESP: 200 {'Content-Length': '1547', 'Server
': 'Apache/2.4.18 (Ubuntu)', 'Connection': 'close', 'Date': 'Thu, 09 Nov 2017 12:20:21 GMT', 'Content-Type': 'application/json', 'X-Openstack-Request-Id': 'req-f658235e-1b9c-4ff7-96a9-5a8b3a607e70'} {"floatingips": [{"router_id": null, "status": "DOWN", "description": "", "tags": [], "updated_at": "2017-11-09T12:14:26Z", "dns_domain": "openstackgate.local.", "floating_network_id": "d355fc06-e7b8-4560-a90c-1280dbd70557", "fixed_ip_address": null, "floating_ip_address": "172.24.4.9", "revision_number": 1, "port_id": null, "id": "16cde9a1-b931-4521-9378-e79cfd7b7114", "dns_name": "test-fip1", "created_at": "2017-11-09T12:14:26Z", "tenant_id": "cc796f87cd9d484dbd0d0d0ca0109fbd", "project_id": "cc796f87cd9d484dbd0d0d0ca0109fbd"}, {"router_id": null, "status": "DOWN", "description": "", "tags": [], "updated_at": "2017-11-09T12:18:10Z", "dns_domain": "", "floating_network_id": "d355fc06-e7b8-4560-a90c-1280dbd70557", "fixed_ip_address": null, "floating_ip_address": "172.24.4.23", "revision_number": 0, "port_id": null, "id": "6cace681-69aa-4cb5-a878-7bd2a11e5090", "dns_name": "", "created_at": "2017-11-09T12:18:10Z", "tenant_id": "cc796f87cd9d484dbd0d0d0ca0109fbd", "project_id": "cc796f87cd9d484dbd0d0d0ca0109fbd"}, {"router_id": null, "status": "DOWN", "description": "", "tags": [], "updated_at": "2017-11-09T12:15:55Z", "dns_domain": "openstackgate.local.", "floating_network_id": "d355fc06-e7b8-4560-a90c-1280dbd70557", "fixed_ip_address": null, "floating_ip_address": "172.24.4.17", "revision_number": 1, "port_id": null, "id": "d756105e-6970-4c9b-a549-9819234756b5", "dns_name": "test-fip2", "created_at": "2017-11-09T12:15:55Z", "tenant_id": "cc796f87cd9d484dbd0d0d0ca0109fbd", "project_id": "cc796f87cd9d484dbd0d0d0ca0109fbd"}]} http_log_resp /usr/local/lib/python2.7/dist-packages/neutronclient/common/utils.py:20 Nov 09 12:20:21 jh-devstack-03 designate-central[20194]: 4
Nov 09 12:20:21 jh-devstack-03 designate-central[20194]: 2017-11-09 12:20:21.863 20194 DEBUG neutronclient.client [req-821cfab6-e1af-4ca4-89b8-0b6a8ad6c91d f508fd532e604617a4417f7c3c0e1e7f cc796f87cd9d484dbd0d0d0ca0109fbd - - -] GET call to neutron for https://192.168.0.6:
9696//v2.0/floatingips?tenant_id=cc796f87cd9d484dbd0d0d0ca0109fbd used request id req-f658235e-1b9c-4ff7-96a9-5a8b3a607e70 _cs_request /usr/local/lib/python2.7/dist-packages/neutronclient/client.py:127 Nov 09 12:20:21 jh-devstack-03 designate-central[20194]: 2017-11-09 12:20:21.864 20194 DEBUG designate.network_api.neutron [req-821cfab6-e1af-4ca4-89b8-0b6a8ad6c91d f508fd532e604617a4417f7c3c0e1e7f cc796f87cd9d484dbd0d0d0ca0109fbd - - -] Added 3 FloatingIPs from https://19
2.168.0.6:9696/ @ RegionOne _call /opt/stack/designate/designate/network_api/neutron.py:144 Nov 09 12:20:21 jh-devstack-03 designate-central[20194]: 2017-11-09 12:20:21.883 20194 DEBUG designate.central.service [req-821cfab6-e1af-4ca4-89b8-0b6a8ad6c91d f508fd532e604617a4417f7c3c0e1e7f cc796f87cd9d484dbd0d0d0ca0109fbd - - -] No record information found for 16cde9a
1-b931-4521-9378-e79cfd7b7114 _format_floatingips /opt/stack/designate/designate/central/service.py:1927 Nov 09 12:20:21 jh-devstack-03 designate-central[20194]: 2017-11-09 12:20:21.907 20194 DEBUG designate.storage.impl_sqlalchemy [req-821cfab6-e1af-4ca4-89b8-0b6a8ad6c91d f508fd532e604617a4417f7c3c0e1e7f cc796f87cd9d484dbd0d0d0ca0109fbd - - -] Fetched zone <Zone id:'5576b769
-92f1-4ae8-b89c-1b619ee4ad9e' type:'PRIMARY' name:'4.24.172.in-addr.arpa.' pool_id:'794ccc2c-d751-44fe-b57f-8894c9f5c842' serial:'1510229958' action:'NONE' status:'ACTIVE'> _find_zones /opt/stack/designate/designate/storage/impl_sqlalchemy/__init__.py:262 Nov 09 12:20:21 jh-devstack-03 designate-central[20194]: 2017-11-09 12:20:21.910 20194 DEBUG designate.central.service [req-821cfab6-e1af-4ca4-89b8-0b6a8ad6c91d f508fd532e604617a4417f7c3c0e1e7f cc796f87cd9d484dbd0d0d0ca0109fbd - - -] No record information found for d756105
e-6970-4c9b-a549-9819234756b5 _format_floatingips /opt/stack/designate/designate/central/service.py:1927
Indeed looking at the code (http:// git.openstack. org/cgit/ openstack/ designate/ tree/designate/ central/ service. py#n1985) in get_floatingip() there is a call to get_floatingip() that should filter for the specific fip_id we are looking for, but the result of that call is discarded and the function goes on to simply decide that the first entry of the list of all floating ips for the tenant is a good result to return ... :-(