Re: [openstack-dev] [vitrage] about aodh alarm notification
Agree. It seems I missed the first clause in Alexeys 2nd proposal. `get_all` in constructor could be a good solution. On Mon, Nov 28, 2016 at 12:18 PM <dong.wenj...@zte.com.cn> wrote: Hi all, Maybe call the get_all method in the AodhDriver constructor and cache all the alarms is a simple way. BR, dwj *Yujun Zhang <zhangyujun+...@gmail.com <zhangyujun%2b...@gmail.com>>* 2016-11-28 11:23 收件人 "OpenStack Development Mailing List (not for usage questions)" < openstack-dev@lists.openstack.org>, "dong.wenj...@zte.com.cn" < dong.wenj...@zte.com.cn> 抄送 "Hefetz, Idan (Nokia - IL)" <idan.hef...@nokia.com>, " zhang.yuj...@zte.com.cn" <zhang.yuj...@zte.com.cn> 主题 Re: [openstack-dev] [vitrage] about aodh alarm notification Hi, Alexey My comments inline. On Mon, Nov 28, 2016 at 1:52 AM Weyl, Alexey (Nokia - IL) < *alexey.w...@nokia.com* <alexey.w...@nokia.com>> wrote: 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. I think it might not be easily accepted since sending only the changes on update notification looks more reasonable to me. 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. I doubt this will degrade the performance for the first notification since there will be additional conversation to retrieve the full data. My proposal is to share a cache between snapshot service and listener service and I think it is a common requirements for all datasource using PUSH method. __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [vitrage] about aodh alarm notification
Hi, Alexey My comments inline. On Mon, Nov 28, 2016 at 1:52 AM Weyl, Alexey (Nokia - IL) < alexey.w...@nokia.com> wrote: > 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. > I think it might not be easily accepted since sending only the changes on update notification looks more reasonable to me. > 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. > I doubt this will degrade the performance for the first notification since there will be additional conversation to retrieve the full data. My proposal is to share a cache between snapshot service and listener service and I think it is a common requirements for all datasource using PUSH method. > __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [vitrage] about aodh alarm notification
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.wenj...@zte.com.cn [mailto:dong.wenj...@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@lists.openstack.org; zhang.yuj...@zte.com.cn Subject: 答复: RE: RE: [openstack-dev] [vitrage] about aodh alarm notification EmThe 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.w...@nokia.com<mailto:alexey.w...@nokia.com>> 2016-11-24 23:50 收件人 "dong.wenj...@zte.com.cn<mailto:dong.wenj...@zte.com.cn>" <dong.wenj...@zte.com.cn<mailto:dong.wenj...@zte.com.cn>> 抄送 "Hefetz, Idan (Nokia - IL)" <idan.hef...@nokia.com<mailto:idan.hef...@nokia.com>>, "Afek, Ifat (Nokia - IL)" <ifat.a...@nokia.com<mailto:ifat.a...@nokia.com>>, "openstack-dev@lists.openstack.org<mailto:openstack-dev@lists.openstack.org>" <openstack-dev@lists.openstack.org<mailto:openstack-dev@lists.openstack.org>>, "zhang.yuj...@zte.com.cn<mailto:zhang.yuj...@zte.com.cn>" <zhang.yuj...@zte.com.cn<mailto:zhang.yuj...@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.wenj...@zte.com.cn<mailto:dong.wenj...@zte.com.cn> [mailto:dong.wenj...@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@lists.openstack.org<mailto:openstack-dev@lists.openstack.org>; zhang.yuj...@zte.com.cn<mailto:zhang.yuj...@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.w...@nokia.com<mailto:alexey.w...@nokia.com>> 2016-11-24 16:25 收件人 "dong.wenj...@zte.com.cn<mailto:dong.wenj...@zte.com.cn>" <dong.wenj...@zte.com.cn<mailto:dong.wenj...@zte.com.cn>>, "Afek, Ifat (Nokia - IL)" <ifat.a...@nokia.com<mailto:ifat.a...@nokia.com>>, "Hefetz, Idan (Nokia - IL)" <idan.hef...@nokia.com<mailto:idan.hef...@nokia.com>>, "zhang.yuj...@zte.com.cn<mailto:zhang.yuj...@zte.com.cn>" <zhang.yuj...@zte.com.cn<mailto:zhang.yuj...@zte.com.cn>> 抄送 "openstack-dev@lists.openstack.org<mailto:openstack-dev@lists.openstack.org>" <openstack-dev@lists.openstack.org<mailto:openstack-dev@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.r
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.wenj...@zte.com.cn [mailto:dong.wenj...@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@lists.openstack.org; zhang.yuj...@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.w...@nokia.com<mailto:alexey.w...@nokia.com>> 2016-11-24 16:25 收件人 "dong.wenj...@zte.com.cn<mailto:dong.wenj...@zte.com.cn>" <dong.wenj...@zte.com.cn<mailto:dong.wenj...@zte.com.cn>>, "Afek, Ifat (Nokia - IL)" <ifat.a...@nokia.com<mailto:ifat.a...@nokia.com>>, "Hefetz, Idan (Nokia - IL)" <idan.hef...@nokia.com<mailto:idan.hef...@nokia.com>>, "zhang.yuj...@zte.com.cn<mailto:zhang.yuj...@zte.com.cn>" <zhang.yuj...@zte.com.cn<mailto:zhang.yuj...@zte.com.cn>> 抄送 "openstack-dev@lists.openstack.org<mailto:openstack-dev@lists.openstack.org>" <openstack-dev@lists.openstack.org<mailto:openstack-dev@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.wenj...@zte.com.cn<mailto:dong.wenj...@zte.com.cn> [mailto:dong.wenj...@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.yuj...@zte.com.cn<mailto:zhang.yuj...@zte.com.cn> Cc: openstack-dev@lists.openstack.org<mailto:openstack-dev@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 __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
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.wenj...@zte.com.cn [mailto:dong.wenj...@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.yuj...@zte.com.cn Cc: openstack-dev@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 __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
[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__ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev