[nova][vitrage] Nova extended server attributes
Hi, Is there a way to get Nova extended server attributes (and specifically, OS-EXT-SRV-ATTR:instance_name) as part of the notification that is sent upon instance creation? In Vitrage we are using the immediate notifications from Nova, but this specific information is missing. Thanks, Ifat
On 12/19/2018 11:29 AM, Ifat Afek wrote:
Is there a way to get Nova extended server attributes (and specifically, OS-EXT-SRV-ATTR:instance_name) as part of the notification that is sent upon instance creation?
In Vitrage we are using the immediate notifications from Nova, but this specific information is missing.
We could add it into the versioned notification payload if that works for you (I heard vitrage was moving to using versioned notifications). If you only need it on create, it could go here: https://github.com/openstack/nova/blob/86a23f417a3e569afd74b513dc977780b40ea... or more generically here: https://github.com/openstack/nova/blob/86a23f417a3e569afd74b513dc977780b40ea... The tricky thing about that value is it gets generated from config: https://github.com/openstack/nova/blob/86a23f417a3e569afd74b513dc977780b40ea... So depending on what "instance_name_template" is configured to be on each service that sends the notification, the value could be different, which could break unsuspecting consumers. It looks like the instance.create.* versioned notifications all get sent from the nova-compute service though which aligns with how "instance_name_template" is used to generate the guest name in the hypervisor. If you only need that value for instance.create notifications, maybe we should just restrict it to that rather than *all* InstancePayload-generated versioned notifications since the value isn't stored in the database. -- Thanks, Matt
Hi, Indeed, Vitrage now uses the Nova versioned notifications (we pushed that code a few days ago). I'm only interested at the instance.create.* notifications, so I'll try to add the OS-EXT-SRV-ATTR:instance_name where you suggested. Thanks! Ifat On Wed, Dec 19, 2018 at 7:52 PM Matt Riedemann <mriedemos@gmail.com> wrote:
On 12/19/2018 11:29 AM, Ifat Afek wrote:
Is there a way to get Nova extended server attributes (and specifically, OS-EXT-SRV-ATTR:instance_name) as part of the notification that is sent upon instance creation?
In Vitrage we are using the immediate notifications from Nova, but this specific information is missing.
We could add it into the versioned notification payload if that works for you (I heard vitrage was moving to using versioned notifications).
If you only need it on create, it could go here:
https://github.com/openstack/nova/blob/86a23f417a3e569afd74b513dc977780b40ea...
or more generically here:
https://github.com/openstack/nova/blob/86a23f417a3e569afd74b513dc977780b40ea...
The tricky thing about that value is it gets generated from config:
https://github.com/openstack/nova/blob/86a23f417a3e569afd74b513dc977780b40ea...
So depending on what "instance_name_template" is configured to be on each service that sends the notification, the value could be different, which could break unsuspecting consumers.
It looks like the instance.create.* versioned notifications all get sent from the nova-compute service though which aligns with how "instance_name_template" is used to generate the guest name in the hypervisor. If you only need that value for instance.create notifications, maybe we should just restrict it to that rather than *all* InstancePayload-generated versioned notifications since the value isn't stored in the database.
--
Thanks,
Matt
participants (2)
-
Ifat Afek
-
Matt Riedemann