designate does not handle compute.instance.update events

Bug #1733305 reported by Dmitrii Shcherbakov
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Designate
Triaged
Wishlist
Unassigned

Bug Description

It would be instrumental for designate to handle instance update events coming from nova over AMQP as DNS names may change over the lifetime of an instance.

Moreover, format{v4,v6} may depend on a display_name of a given node which may change.

Currently only compute.instance.create.end and compute.instance.delete.start are processed in designate:

https://github.com/openstack/designate/blob/stable/pike/designate/notification_handler/nova.py#L58-L62

nova code-path:

https://github.com/openstack/nova/blob/stable/pike/nova/objects/instance.py#L665-L812
    def save(self, expected_vm_state=None,
             expected_task_state=None, admin_state_reset=False):
        """Save updates to this instance
...
         notifications.send_update(context, old_ref, new_ref)
...

https://github.com/openstack/nova/blob/stable/pike/nova/notifications/base.py#L220-L251
def send_update(context, old_instance, new_instance, service="compute",
...
        send_update_with_states(context, new_instance, old_vm_state,
...
        try:
            old_display_name = None
            if new_instance["display_name"] != old_instance["display_name"]:
                old_display_name = old_instance["display_name"]
            send_instance_update_notification(context, new_instance,
...

https://github.com/openstack/nova/blob/stable/pike/nova/notifications/base.py#L220-L251
def send_instance_update_notification(context, instance, old_vm_state=None,
            old_task_state=None, new_vm_state=None, new_task_state=None,
            service="compute", host=None, old_display_name=None):
    """Send 'compute.instance.update' notification to inform observers
    about instance state changes.
    """
    payload = info_from_instance(context, instance, None, None) # <--- default payload
...
    if old_display_name:
        payload["old_display_name"] = old_display_name

    rpc.get_notifier(service, host).info(context,
                                         'compute.instance.update', payload) # <--- actual notification
...

Tags: cpe-onsite
Revision history for this message
Graham Hayes (grahamhayes) wrote :

This seems like a nice to have - no objections to the code being written, but it wil not be a priority

Changed in designate:
importance: Undecided → Wishlist
status: New → Triaged
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.