[openstack-dev] [vitrage] about aodh alarm notification

Weyl, Alexey (Nokia - IL) alexey.weyl at nokia.com
Sun Nov 27 17:46:21 UTC 2016


Hi Dong,

I can think of 2 solutions for this problem:

1.       We can talk with the AODH developers and check if they can add additional data for the aodh notifications.

2.       We can add a cache in the aodh driver, and call the get_all method in the AodhDriver constructor or when the first notification happens and fill the cache with the data. Then for each notification that arrives you  will update that cache in the aodh notification service, and send then event with all the data you need.

BR,
Alexey

From: dong.wenjuan at zte.com.cn [mailto:dong.wenjuan at zte.com.cn]
Sent: Friday, November 25, 2016 2:28 AM
To: Weyl, Alexey (Nokia - IL)
Cc: Hefetz, Idan (Nokia - IL); Afek, Ifat (Nokia - IL); openstack-dev at lists.openstack.org; zhang.yujunz at zte.com.cn
Subject: 答复: RE: RE: [openstack-dev] [vitrage] about aodh alarm notification


Em....The solution goes back to my first question.
Snapshot service calls get_all, and caches all the alarms.
But listener service can't get the cache because there are two services and can't share the cache.


BR,
dwj





"Weyl, Alexey (Nokia - IL)" <alexey.weyl at nokia.com<mailto:alexey.weyl at nokia.com>>

2016-11-24 23:50

收件人

"dong.wenjuan at zte.com.cn<mailto:dong.wenjuan at zte.com.cn>" <dong.wenjuan at zte.com.cn<mailto:dong.wenjuan at zte.com.cn>>

抄送

"Hefetz, Idan (Nokia - IL)" <idan.hefetz at nokia.com<mailto:idan.hefetz at nokia.com>>, "Afek, Ifat (Nokia - IL)" <ifat.afek at nokia.com<mailto:ifat.afek at nokia.com>>, "openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>" <openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>, "zhang.yujunz at zte.com.cn<mailto:zhang.yujunz at zte.com.cn>" <zhang.yujunz at zte.com.cn<mailto:zhang.yujunz at zte.com.cn>>

主题

RE: RE: [openstack-dev] [vitrage] about aodh alarm notification







It seems that you will need to have a cache for that issue.
Due to the fact that AODH alarms aren’t deleted, and stay alive (in AODH) when their state is changed to ok (but in this case aren’t supposed to appear in Vitrage), and then when the state is changed back to error (‘alarm’) they are supposed to appear in Vitrage with all the data, the most simple way to do that (without touching the core processor and architecture) is by saving those alarms of AODH in cache in the AODH driver, update its data every change that arrive to the driver, and then when a notification arrives and if the state that arrived is different than OK and the state that was in the cache is OK then send an event with all the data updated in the cache to the queue, otherwise send only the data received from the oslo bus to the queue (don’t forget of course to update the cache each time an event received, and each time we call the get_all of aodh (every snapshot_interval time) we can update the data in the cache as well.

Alexey

From: dong.wenjuan at zte.com.cn<mailto:dong.wenjuan at zte.com.cn> [mailto:dong.wenjuan at zte.com.cn]
Sent: Thursday, November 24, 2016 11:24 AM
To: Weyl, Alexey (Nokia - IL)
Cc: Hefetz, Idan (Nokia - IL); Afek, Ifat (Nokia - IL); openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>; zhang.yujunz at zte.com.cn<mailto:zhang.yujunz at zte.com.cn>
Subject: 答复: RE: [openstack-dev] [vitrage] about aodh alarm notification


Hi Weyl Alexey,

Another question:
If we received the alarm.creation notification with the 'ok' state, we filter it and don't create vertex in the Graph.
The next received the alarm state_change notification, all the other alarm details are missing in the vertex.
How can I handle this? Thanks~


BR,
dwj



"Weyl, Alexey (Nokia - IL)" <alexey.weyl at nokia.com<mailto:alexey.weyl at nokia.com>>

2016-11-24 16:25


收件人

"dong.wenjuan at zte.com.cn<mailto:dong.wenjuan at zte.com.cn>" <dong.wenjuan at zte.com.cn<mailto:dong.wenjuan at zte.com.cn>>, "Afek, Ifat (Nokia - IL)" <ifat.afek at nokia.com<mailto:ifat.afek at nokia.com>>, "Hefetz, Idan (Nokia - IL)" <idan.hefetz at nokia.com<mailto:idan.hefetz at nokia.com>>, "zhang.yujunz at zte.com.cn<mailto:zhang.yujunz at zte.com.cn>" <zhang.yujunz at zte.com.cn<mailto:zhang.yujunz at zte.com.cn>>

抄送

"openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>" <openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>

主题

RE: [openstack-dev] [vitrage] about aodh alarm notification











Hi Dong,

Good question, I will explain how you can handle this problem in Vitrage.

You don't need the cache mechanism here, it is much more simplier.

When you get a new alarm with get_all or by notification of 'alarm.creation' you will create the alarm with its correct data \ properties.
Then when you receive a notification of 'alarm.rule_change', 'alarm.state_transition', 'alarm.deletion' all you need to do is only to update the correct property that has changed in the aodh vertex.
Thus, When you create the Vertex in the transformer, you know the aodh uuid so you know the vitrage_id, and you can pass only the properties that you have received and want to update (and not all the properties that there in the aodh vertex). All the other properties that you haven't received that haven't changed you can pass them as None and they won't be changed in the graph.

Hope this explains everything.
If you have other questions, you are more than welcome to ask.

Best Regrads,
Alexey


From: dong.wenjuan at zte.com.cn<mailto:dong.wenjuan at zte.com.cn> [mailto:dong.wenjuan at zte.com.cn]
Sent: Thursday, November 24, 2016 9:39 AM
To: Afek, Ifat (Nokia - IL); Weyl, Alexey (Nokia - IL); Hefetz, Idan (Nokia - IL); zhang.yujunz at zte.com.cn<mailto:zhang.yujunz at zte.com.cn>
Cc: openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>
Subject: [openstack-dev] [vitrage] about aodh alarm notification


Hi Vitrages,

Currently there are four aodh alarm notifications we need to handle:
'alarm.creation', 'alarm.rule_change', 'alarm.state_transition', 'alarm.deletion'

Only the alarm.creation notification carries the alarm detail info.
So we need to cache the alarm info.
When we receive other notifications, we can fill all fields from the cache.

But if the alarm creates before vitrage servies startup, we can't get the alarm.creation notification.
So we need to get_all when vitrage services startup.
As `SnapshotsService` will get all alarms info when it startup.
But `SnapshotsService` and `ListenerService` are two services,
they can't share the cache data unless they communicate with each other.
This wil be a big change.

Are there any other better solutions? I need some help, thanks :)

BR,
dwj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20161127/c59a8294/attachment.html>


More information about the OpenStack-dev mailing list