<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style>
<!--
@font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:Calibri}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
        {color:#0563C1;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:#954F72;
        text-decoration:underline}
span.EmailStyle17
        {font-family:"Calibri","sans-serif";
        color:windowtext}
.MsoChpDefault
        {font-family:"Calibri","sans-serif"}
@page WordSection1
        {margin:72.0pt 72.0pt 72.0pt 72.0pt}
-->
</style><style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1" vlink="#954F72" lang="EN-US" link="#0563C1">
<div style="direction: ltr;font-family: Courier New;color: #000000;font-size: 10pt;">
Hey Phil, (sorry for top-post, web client)<br>
<br>
There's no firm rule for requiring .start/.end and I think your criteria defines it well. Long running transactions (or multi complex-step transactions).
<br>
<br>
The main motivator behind .start/.end code was .error notifications not getting generated in many cases. We had no idea where something was failing. Putting a .start before the db operation let us know "well, at least the service got the call"<br>
<br>
For some operations like resize, migrate, etc., the .start/.end is good for auditing and billing. Although, we could do a better job by simply managing the launched_at, deleted_at times better.
<br>
<br>
Later, we found that by reviewing .start/.end deltas we were able to predict pending failures before timeouts actually occurred.
<br>
<br>
But no, they're not mandatory and a single notification should certainly be used for simple operations.
<br>
<br>
Cheers!<br>
-S<br>
<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF915883"><font size="2" color="#000000" face="Tahoma"><b>From:</b> Day, Phil [philip.day@hp.com]<br>
<b>Sent:</b> Monday, September 22, 2014 8:03 AM<br>
<b>To:</b> OpenStack Development Mailing List (openstack-dev@lists.openstack.org)<br>
<b>Subject:</b> [openstack-dev] [Nova] - do we need .start and .end notifications in all cases ?<br>
</font><br>
</div>
<div></div>
<div>
<div class="WordSection1">
<p class="MsoNormal">Hi Folks,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I’d like to get some opinions on the use of pairs of notification messages for simple events.   I get that for complex operations on an instance (create, rebuild, etc) a start and end message are useful to help instrument progress and how
 long the operations took.    However we also use this pattern for things like aggregate creation, which is just a single DB operation – and it strikes me as kind of overkill and probably not all that useful to any external system compared to a a single event
 “.create” event after the DB operation.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">There is a change up for review to add notifications for service groups which is following this pattern (<a href="https://review.openstack.org/#/c/107954/" target="_blank">https://review.openstack.org/#/c/107954/</a>) – the author isn’t
 doing  anything wrong in that there just following that pattern, but it made me wonder if we shouldn’t have some better guidance on when to use a single notification rather that a .start/.end pair.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Does anyone else have thoughts on this , or know of external systems that would break if we restricted .start and .end usage to long-lived instance operations ?</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Phil</p>
<p class="MsoNormal"> </p>
</div>
</div>
</div>
</div>
</body>
</html>