Error in sink formatv4 neutron_floatingip handler

Bug #1772925 reported by Eran
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
New
Undecided
Unassigned

Bug Description

Working with OpenStack kolla, designet fails with formats types.

[handler:neutron_floatingip]
zone_id = "f6150699-b84c-4891-bcfc-79f9e4e308f2"
formatv4 = '%(octet0)s-%(octet1)s-%(octet2)s-%(octet3)s.%(zone)s'
formatv4 = %(hostname)s.prv.%(zone)s
formatv4 = '%(hostname)s.%(project)s.prv.%(zone)s'
formatv6 = %(hostname)s.prv.%(zone)s
formatv6 = '%(hostname)s.%(project)s.prv.%(zone)s'

in the DNS it only register the formatv4 = '%(octet0)s-%(octet1)s-%(octet2)s-%(octet3)s.%(zone)s' failing with the others.

~$openstack recordset list agt.lab.
+--------------------------------------+----------------------------+------+----------------------------------------------------------------------+--------+--------+
| id | name | type | records | status | action |
+--------------------------------------+----------------------------+------+----------------------------------------------------------------------+--------+--------+
| 1b92e3f6-f2c7-4553-87a0-3b8fc1b7491d | agt.lab. | NS | agt.lab. | ACTIVE | NONE |
| 6e0a2ab2-6eb6-426c-a6cf-1c0abf62430a | agt.lab. | SOA | agt.lab. <email address hidden>. 1527084878 3549 600 86400 3600 | ACTIVE | NONE |
| 263f9851-c8b7-4218-94c7-e82d783d1d40 | 172-31-100-15.agt.lab. | A | 172.31.100.15 | ACTIVE | NONE |
| e3bc7a01-219a-4b51-b882-86ed0addaaab | 172-31-100-4.agt.lab. | A | 172.31.100.4 | ACTIVE | NONE |

Looking in the logs found the next errors.

# tail -f /var/lib/docker/volumes/kolla_logs/_data/designate/designate-sink.log

2018-05-23 10:10:11.306 22 INFO designate.service [-] Starting sink service (version: 5.0.1)
2018-05-23 10:14:38.598 23 ERROR oslo_messaging.notify.dispatcher [req-cea0d843-21d2-4122-a211-9652ba539aa3 - - - - -] Callback raised an exception.: KeyError: 'hostname'
2018-05-23 10:14:38.598 23 ERROR oslo_messaging.notify.dispatcher Traceback (most recent call last):
2018-05-23 10:14:38.598 23 ERROR oslo_messaging.notify.dispatcher File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/oslo_messaging/notify/dispatcher.py", line 84, in _exec_callback
2018-05-23 10:14:38.598 23 ERROR oslo_messaging.notify.dispatcher message["metadata"])
2018-05-23 10:14:38.598 23 ERROR oslo_messaging.notify.dispatcher File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/designate/sink/service.py", line 116, in info
2018-05-23 10:14:38.598 23 ERROR oslo_messaging.notify.dispatcher handler.process_notification(context, event_type, payload)
2018-05-23 10:14:38.598 23 ERROR oslo_messaging.notify.dispatcher File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/designate/notification_handler/neutron.py", line 85, in process_notification
2018-05-23 10:14:38.598 23 ERROR oslo_messaging.notify.dispatcher resource_type='floatingip')
2018-05-23 10:14:38.598 23 ERROR oslo_messaging.notify.dispatcher File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/designate/notification_handler/base.py", line 171, in _create
2018-05-23 10:14:38.598 23 ERROR oslo_messaging.notify.dispatcher 'name': fmt % event_data,
2018-05-23 10:14:38.598 23 ERROR oslo_messaging.notify.dispatcher KeyError: 'hostname'
2018-05-23 10:14:38.598 23 ERROR oslo_messaging.notify.dispatcher

Revision history for this message
Erik Olof Gunnar Andersson (eandersson) wrote :

This is unfortunately a bug with Kolla. The problem is that the Neutron payload does not contain hostname, and cannot be used as a parameter.

For that reason Kolla removed those suggestions with this patch.
https://github.com/openstack/kolla-ansible/commit/5ae4b7c02957a067ea3b757a2ea389e548153936#diff-182e3de6ae03bcb6096c97287901258d

You can see an example of a payload sent by Neutron here.
https://github.com/openstack/designate/blob/master/designate/tests/resources/sample_notifications/neutron/floatingip.update.end_associate.json

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.