<html><body>
<p><font size="2" face="sans-serif">Hi Hua,</font><br>
<br>
<font size="2" face="sans-serif">I have some comments about this:</font><br>
<br>
<font size="2" face="sans-serif">A></font><br>
<font size="2" face="sans-serif"> remove heat poller can be a way, but some of its logic needs to make sure it work and performance not burden.</font><br>
<font size="2" face="sans-serif">1) for old heat poller it is quick loop, with fixed interval, to make sure stack status update quickly can be reflected in bay status</font><br>
<font size="2" face="sans-serif">2) for periodic task running, it seems dynamic loop, and period is long, it was added for some stacks creation timeout, 1) loop exit, this 2) loop can help update the stack and also conductor crash issue</font><br>
<br>
<br>
<font size="2" face="sans-serif">It would be ideal to put in one place for looping over the stacks, but periodic tasks need to consider if it really just need to loop</font><br>
<font size="2" face="sans-serif">IN_PROGRESS status stack ? And what's the interval for loop that ? (60s or short, loop performance)</font><br>
<br>
<font size="2" face="sans-serif">Does heat have other status transition  path, like delete_failed --> (status reset) --> become OK.  etc.</font><br>
<br>
<br>
<br>
<font size="2" face="sans-serif">B> For remove db operation in bay_update case. I did not understand your suggestion.</font><br>
<font size="2" face="sans-serif">bay_update include update_stack and poll_and_check(it is in heat poller), if you removed heat poller to periodic task(as you said in your 3). It still needs db operations.</font><br>
<br>
<br>
<br>
<font size="2" face="sans-serif">C> For allow admin user to show stacks in other tenant, it seems OK. Does other projects try this before? Is it reasonable case for customer ?</font><br>
<br>
<br>
<br>
<font size="2" face="sans-serif">Thanks</font><br>
<br>
<br>
<font size="2" face="sans-serif">Best Wishes,</font><br>
<font size="2" face="sans-serif">--------------------------------------------------------------------------------</font><br>
<font size="2" face="sans-serif">Kai Qiang Wu (吴开强  Kennan)<br>
IBM China System and Technology Lab, Beijing<br>
<br>
E-mail: wkqwu@cn.ibm.com<br>
Tel: 86-10-82451647<br>
Address: Building 28(Ring Building), ZhongGuanCun Software Park,  <br>
         No.8 Dong Bei Wang West Road, Haidian District Beijing P.R.China 100193</font><br>
<font size="2" face="sans-serif">--------------------------------------------------------------------------------</font><br>
<font size="2" face="sans-serif">Follow your heart. You are miracle! </font><br>
<br>
<img width="16" height="16" src="cid:1__=C7BBF433DF8F55C68f9e8a93df938@cn.ibm.com" border="0" alt="Inactive hide details for 王华 ---08/13/2015 11:31:53 AM---any comments on this? On Wed, Aug 12, 2015 at 2:50 PM, 王华 <wan"><font size="2" color="#424282" face="sans-serif">王华 ---08/13/2015 11:31:53 AM---any comments on this? On Wed, Aug 12, 2015 at 2:50 PM, 王华 <wanghua.humble@gmail.com> wrote:</font><br>
<br>
<font size="1" color="#5F5F5F" face="sans-serif">From:      </font><font size="1" face="sans-serif">王华 <wanghua.humble@gmail.com></font><br>
<font size="1" color="#5F5F5F" face="sans-serif">To:        </font><font size="1" face="sans-serif">openstack-dev@lists.openstack.org</font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Date:      </font><font size="1" face="sans-serif">08/13/2015 11:31 AM</font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Subject:   </font><font size="1" face="sans-serif">Re: [openstack-dev] [magnum]problems for horizontal scale</font><br>
<hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br>
<br>
<br>
<font size="3" face="serif">any comments on this?</font><br>
<br>
<font size="3" face="serif">On Wed, Aug 12, 2015 at 2:50 PM, 王华 <</font><a href="mailto:wanghua.humble@gmail.com" target="_blank"><font size="3" color="#0000FF" face="serif"><u>wanghua.humble@gmail.com</u></font></a><font size="3" face="serif">> wrote:</font>
<ul style="padding-left: 9pt"><font size="3" face="serif">Hi All,</font><br>
<br>
<font size="3" face="serif">In order to prevent race conditions due to multiple conductors, my solution is as blew:</font><br>
<font size="3" face="serif">1. remove the db operation in bay_update to prevent race conditions.Stack operation is atomic. Db operation is atomic. But the two operations together are not atomic.So the data in the db may be wrong.</font><br>
<font size="3" face="serif">2. sync up stack status and stack parameters(now only node_count) from heat by periodic tasks. bay_update can change stack parameters, so we need to sync up them.</font><br>
<font size="3" face="serif">3. remove heat poller, because we have periodic tasks.</font><br>
<br>
<font size="3" face="serif">To sync up stack parameters from heat, we need to show stacks using admin_context. But heat don't allow to show stacks in other tenant. If we want to show stacks in other tenant, we need to store auth context for every bay. That is a problem. Even if we store the auth context, there is a timeout for token. The best way I think is to let heat allow admin user to show stacks in other tenant. </font><br>
<br>
<font size="3" face="serif">Do you have a better solution or any improvement for my solution?</font><br>
<br>
<font size="3" face="serif">Regards,</font><br>
<font size="3" face="serif">Wanghua</font></ul>
<tt><font size="2">__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe<br>
</font></tt><tt><font size="2"><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a></font></tt><tt><font size="2"><br>
</font></tt><br>
</body></html>