[openstack-dev] [designate] Records for floating addresses are not removed when an instance is removed

Jaime Fernández jjjaime at gmail.com
Mon Nov 16 10:36:25 UTC 2015


Thanks Matt. The link was very useful. However, I couldn't make it work.

The event 'port.delete.end' has the following payload:

> {u'port_id': u'86580146-1772-4e32-8d7b-92bbb9131ae5'}
>
It only provides the port_id. But without the tenant_id, I cannot get the
context associated to the tenant. I've tried with all_tenants:

> context = DesignateContext.get_admin_context(all_tenants=True,
> edit_managed_records=True)
>
but it does not find any record.

Is there any option in get_admin_context that permits me to delete records
without knowing the tenant_id (although the records were created assigned
to that tenant_id)?

On Fri, Nov 13, 2015 at 7:51 PM, Matt Fischer <matt at mattfischer.com> wrote:

> You can do it like we did for juno Designate as covered in our Vancouver
> talk start about 21 minutes:
>
> https://www.youtube.com/watch?v=N8y51zqtAPA
>
> We've not ported the code to Kilo or Liberty yet but the approach may
> still work.
>
>
> On Fri, Nov 13, 2015 at 9:49 AM, Jaime Fernández <jjjaime at gmail.com>
> wrote:
>
>> When removing an instance (with one floating address assigned) in
>> Horizon, designate-sink only receives an event for instance removal. As a
>> result, only the instance is removed but the floating addresses records are
>> not removed.
>> I'm not sure if it's a bug in openstack (I guess that it should also
>> notify about the unassignment of floating addresses) or it should be
>> considered in the nova notification handler (
>> https://github.com/openstack/designate/blob/master/designate/notification_handler/nova.py#L72
>> ).
>> However, it is not possible to add metadata in the floating IP records to
>> save the instance_id and remove them easily when an instance is removed.
>> What's the best approach to remove the floating address records of an
>> instance that is being removed?
>>
>> __________________________________________________________________________
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe:
>> OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20151116/d76e8b0f/attachment.html>


More information about the OpenStack-dev mailing list