[Engine-devel] External events and flood rate

--_000_D290AD8432118048947689BA3AE8A9B33C9B351CSACEXCMBX04PRDh_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi All, I've been working on submitting external events to oVirt through the REST A= PI. It seems to be working in general, although it appears that, no matter = what value I put for the flood rate in the event, only 1 or so events are a= llowed every 30 seconds. If I send another event during this time, I get an= operation failed exception. Should the flood rate have any impact on this?= Is there any way to allow my code to get an event through when needed or s= hould I have a thread that shoots them off every 30 seconds if several occu= r too quickly together? -Chris Chris Morrissey Software Engineer NetApp Inc. 919.476.4428 --_000_D290AD8432118048947689BA3AE8A9B33C9B351CSACEXCMBX04PRDh_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr= osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:= //www.w3.org/TR/REC-html40"> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
<meta name=3D"Generator" content=3D"Microsoft Word 14 (filtered medium)"> <style><!-- /* Font Definitions */ @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Calibri","sans-serif";} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:purple; text-decoration:underline;} span.EmailStyle17 {mso-style-type:personal-compose; font-family:"Calibri","sans-serif"; color:windowtext;} .MsoChpDefault {mso-style-type:export-only; font-family:"Calibri","sans-serif";} @page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in;} div.WordSection1 {page:WordSection1;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext=3D"edit"> <o:idmap v:ext=3D"edit" data=3D"1" /> </o:shapelayout></xml><![endif]--> </head> <body lang=3D"EN-US" link=3D"blue" vlink=3D"purple"> <div class=3D"WordSection1"> <p class=3D"MsoNormal">Hi All,<o:p></o:p></p> <p class=3D"MsoNormal"><o:p> </o:p></p> <p class=3D"MsoNormal">I’ve been working on submitting external event= s to oVirt through the REST API. It seems to be working in general, althoug= h it appears that, no matter what value I put for the flood rate in the eve= nt, only 1 or so events are allowed every 30 seconds. If I send another event during this time, I get an operation f= ailed exception. Should the flood rate have any impact on this? Is there an= y way to allow my code to get an event through when needed or should I have= a thread that shoots them off every 30 seconds if several occur too quickly together?<o:p></o:p></p> <p class=3D"MsoNormal"><o:p> </o:p></p> <p class=3D"MsoNormal">-Chris<o:p></o:p></p> <p class=3D"MsoNormal"><o:p> </o:p></p> <p class=3D"MsoNormal"><b>Chris Morrissey<o:p></o:p></b></p> <p class=3D"MsoNormal">Software Engineer<o:p></o:p></p> <p class=3D"MsoNormal">NetApp Inc.<o:p></o:p></p> <p class=3D"MsoNormal">919.476.4428<o:p></o:p></p> <p class=3D"MsoNormal"><o:p> </o:p></p> </div> </body> </html> --_000_D290AD8432118048947689BA3AE8A9B33C9B351CSACEXCMBX04PRDh_--

----- Original Message -----
From: "Christopher Morrissey" <Christopher.Morrissey@netapp.com> To: engine-devel@ovirt.org Sent: Thursday, September 19, 2013 12:50:38 AM Subject: [Engine-devel] External events and flood rate
Hi All,
I’ve been working on submitting external events to oVirt through the REST API. It seems to be working in general, although it appears that, no matter what value I put for the flood rate in the event, only 1 or so events are allowed every 30 seconds. If I send another event during this time, I get an operation failed exception. Should the flood rate have any impact on this? Is there any way to allow my code to get an event through when needed or should I have a thread that shoots them off every 30 seconds if several occur too quickly together?
Well, the 30 sec is the default if no flood rate is given This is an example of how the flood rate should be set by the REST API <event> <description>any description</description> <severity>normal</severity> <origin>Customer1</origin> <custom_id>1</custom_id> <flood_rate>10</flood_rate> </event> Can you please check that the format you are using matches that ? If you are using the same format and it still not working for you , please open a BZ Thanks Eli Mesika
-Chris
Chris Morrissey
Software Engineer
NetApp Inc.
919.476.4428
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel

Eli, any reason for hardcoding this [1]? i'd move it to vdc_config. [1] Math.max(auditLogable.getEventFloodInSec(), 30) // Min duration for External Events is 30 sec On 09/19/2013 12:50 AM, Morrissey, Christopher wrote:
Hi All,
I’ve been working on submitting external events to oVirt through the REST API. It seems to be working in general, although it appears that, no matter what value I put for the flood rate in the event, only 1 or so events are allowed every 30 seconds. If I send another event during this time, I get an operation failed exception. Should the flood rate have any impact on this? Is there any way to allow my code to get an event through when needed or should I have a thread that shoots them off every 30 seconds if several occur too quickly together?
-Chris
*Chris Morrissey*
Software Engineer
NetApp Inc.
919.476.4428
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
-- Michael Pasternak RedHat, ENG-Virtualization R&D

Thanks for looking into this Michael. Only allowing one external event every 30 seconds seems like kind of a high initial setting. However, I've put in a workaround on our side that will retry sending the event after 30 seconds and queue the rest if an error is received while logging. -Chris
-----Original Message----- From: Michael Pasternak [mailto:mpastern@redhat.com] Sent: Monday, September 23, 2013 6:36 AM To: Eli Mesika Cc: Morrissey, Christopher; engine-devel@ovirt.org Subject: Re: [Engine-devel] External events and flood rate
Eli,
any reason for hardcoding this [1]? i'd move it to vdc_config.
[1] Math.max(auditLogable.getEventFloodInSec(), 30) // Min duration for External Events is 30 sec
On 09/19/2013 12:50 AM, Morrissey, Christopher wrote:
Hi All,
I've been working on submitting external events to oVirt through the REST API. It seems to be working in general, although it appears that, no matter what value I put for the flood rate in the event, only 1 or so events are allowed every 30 seconds. If I send another event during this time, I get an operation failed exception. Should the flood rate have any impact on this? Is there any way to allow my code to get an event through when needed or should I have a thread that shoots them off every 30 seconds if several occur too quickly together?
-Chris
*Chris Morrissey*
Software Engineer
NetApp Inc.
919.476.4428
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
--
Michael Pasternak RedHat, ENG-Virtualization R&D

----- Original Message -----
From: "Michael Pasternak" <mpastern@redhat.com> To: "Eli Mesika" <emesika@redhat.com> Cc: "Christopher Morrissey" <Christopher.Morrissey@netapp.com>, engine-devel@ovirt.org Sent: Monday, September 23, 2013 1:35:43 PM Subject: Re: [Engine-devel] External events and flood rate
Eli,
any reason for hardcoding this [1]? i'd move it to vdc_config.
The reason was to lower the risk of external event flooding , but I agree that it can be configurable....
[1] Math.max(auditLogable.getEventFloodInSec(), 30) // Min duration for External Events is 30 sec
On 09/19/2013 12:50 AM, Morrissey, Christopher wrote:
Hi All,
I’ve been working on submitting external events to oVirt through the REST API. It seems to be working in general, although it appears that, no matter what value I put for the flood rate in the event, only 1 or so events are allowed every 30 seconds. If I send another event during this time, I get an operation failed exception. Should the flood rate have any impact on this? Is there any way to allow my code to get an event through when needed or should I have a thread that shoots them off every 30 seconds if several occur too quickly together?
-Chris
*Chris Morrissey*
Software Engineer
NetApp Inc.
919.476.4428
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
--
Michael Pasternak RedHat, ENG-Virtualization R&D
participants (3)
-
Eli Mesika
-
Michael Pasternak
-
Morrissey, Christopher