<div dir="ltr"><div>AFAIC, there are several problems (in API) here:<div>1. We cannot stop/reset particular nodes.</div><div><div>2. Cluster status doesn't address changes which were done via CLI.</div>3. Cluster status in its current form is not enough to manage cluster (i.e. to determine actions what can be applied to cluster at the moment). It doesn't reflect the fact that some nodes can be in 'provisioned' state, some are in 'provisioning', 'deploying', 'ready' statuses.</div><br><div>First two seem clear enough. We could add ability to stop/reset particular nodes and reflect CLI-driven changes in the cluster status.</div><div>To address the last point my proposal was (<a href="https://bugs.launchpad.net/fuel/7.0.x/+bug/1449086/comments/7" target="_blank">bug/1449086/comments/7</a>) to break status into several binary states, i.e. binaries: 'new', '<span style class="">deployment</span>', 'ready', etc., each of which is set to true when cluster has at least one node in corresponding status (I united 'provisioning', 'provisioned' and 'deploying' into one as it is done now).</div><div><br>Now it looks more <span style class="">reasonable to me to keep the original status as is and add bitwise one mentioned above (to address states of different nodes) because 'error' state is determinative for cluster (when cluster is in 'error' state it is no matter that some nodes are in 'ready' state). <br>So, <br>cluster is in 'new' state when all nodes are in 'discover' state, <br>it is in 'operational' state when all nodes are in 'ready' state, <br>cluster is in 'deployment' state when not all of its nodes are in </span><span style class="">'discover' or 'ready' state but there are no nodes in 'error' and 'removing'</span> states.<br>New bitwise status is actual in '<span style class="">deployment' state of cluster</span>. It gives to UI/CLI sufficient data to determine what actions can be applied to cluster at the moment.<br></div><div><br></div><div>I've combined some of the states combinations into the table:<br></div><div>
<table width="665" cellpadding="4" cellspacing="0">
<colgroup><col width="63">
<col width="87">
<col width="77">
<col width="403">
</colgroup><tbody><tr valign="top">
<td style="border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0,0,0) -moz-use-text-color rgb(0,0,0) rgb(0,0,0);padding:0.04in 0in 0.04in 0.04in" width="63">
<p>'new' flag</p>
</td>
<td style="border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0,0,0) -moz-use-text-color rgb(0,0,0) rgb(0,0,0);padding:0.04in 0in 0.04in 0.04in" width="87">
<p>'deployment' flag</p>
</td>
<td style="border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0,0,0) -moz-use-text-color rgb(0,0,0) rgb(0,0,0);padding:0.04in 0in 0.04in 0.04in" width="77">
<p>'ready' flag</p>
</td>
<td style="border:1px solid rgb(0,0,0);padding:0.04in" width="403">
<p>description, actions allowed<br>
</p>
</td>
</tr>
<tr valign="top">
<td style="border-width:medium medium 1px 1px;border-style:none none solid solid;border-color:-moz-use-text-color -moz-use-text-color rgb(0,0,0) rgb(0,0,0);padding:0in 0in 0.04in 0.04in" width="63">
<p>false</p>
</td>
<td style="border-width:medium medium 1px 1px;border-style:none none solid solid;border-color:-moz-use-text-color -moz-use-text-color rgb(0,0,0) rgb(0,0,0);padding:0in 0in 0.04in 0.04in" width="87">
<p>false</p>
</td>
<td style="border-width:medium medium 1px 1px;border-style:none none solid solid;border-color:-moz-use-text-color -moz-use-text-color rgb(0,0,0) rgb(0,0,0);padding:0in 0in 0.04in 0.04in" width="77">
<p>false</p>
</td>
<td style="border-width:medium 1px 1px;border-style:none solid solid;border-color:-moz-use-text-color rgb(0,0,0) rgb(0,0,0);padding:0in 0.04in 0.04in" width="403">
<p>There are no nodes in cluster or all nodes are in 'error'/'removing' state. Cluster is in 'new'/'error'/'remove' state here so we don't care about these flags.</p>
</td>
</tr>
<tr valign="top">
<td style="border-width:medium medium 1px 1px;border-style:none none solid solid;border-color:-moz-use-text-color -moz-use-text-color rgb(0,0,0) rgb(0,0,0);padding:0in 0in 0.04in 0.04in" width="63">
<p>false</p>
</td>
<td style="border-width:medium medium 1px 1px;border-style:none none solid solid;border-color:-moz-use-text-color -moz-use-text-color rgb(0,0,0) rgb(0,0,0);padding:0in 0in 0.04in 0.04in" width="87">
<p>true</p>
</td>
<td style="border-width:medium medium 1px 1px;border-style:none none solid solid;border-color:-moz-use-text-color -moz-use-text-color rgb(0,0,0) rgb(0,0,0);padding:0in 0in 0.04in 0.04in" width="77">
<p>false</p>
</td>
<td style="border-width:medium 1px 1px;border-style:none solid solid;border-color:-moz-use-text-color rgb(0,0,0) rgb(0,0,0);padding:0in 0.04in 0.04in" width="403">
<p>All nodes are under provisioning/deployment. Deployment can be
stopped.</p>
</td>
</tr>
<tr valign="top">
<td style="border-width:medium medium 1px 1px;border-style:none none solid solid;border-color:-moz-use-text-color -moz-use-text-color rgb(0,0,0) rgb(0,0,0);padding:0in 0in 0.04in 0.04in" width="63">
<p>true</p>
</td>
<td style="border-width:medium medium 1px 1px;border-style:none none solid solid;border-color:-moz-use-text-color -moz-use-text-color rgb(0,0,0) rgb(0,0,0);padding:0in 0in 0.04in 0.04in" width="87">
<p>true</p>
</td>
<td style="border-width:medium medium 1px 1px;border-style:none none solid solid;border-color:-moz-use-text-color -moz-use-text-color rgb(0,0,0) rgb(0,0,0);padding:0in 0in 0.04in 0.04in" width="77">
<p>false</p>
</td>
<td style="border-width:medium 1px 1px;border-style:none solid solid;border-color:-moz-use-text-color rgb(0,0,0) rgb(0,0,0);padding:0in 0.04in 0.04in" width="403">
<p>Part of nodes is in 'discover' state, remaining part is under
provisioning/deployment. Deployment can be started for the first
part or/and stopped for the second part of nodes.</p>
</td>
</tr>
<tr valign="top">
<td style="border-width:medium medium 1px 1px;border-style:none none solid solid;border-color:-moz-use-text-color -moz-use-text-color rgb(0,0,0) rgb(0,0,0);padding:0in 0in 0.04in 0.04in" width="63">
<p>true</p>
</td>
<td style="border-width:medium medium 1px 1px;border-style:none none solid solid;border-color:-moz-use-text-color -moz-use-text-color rgb(0,0,0) rgb(0,0,0);padding:0in 0in 0.04in 0.04in" width="87">
<p>false</p>
</td>
<td style="border-width:medium medium 1px 1px;border-style:none none solid solid;border-color:-moz-use-text-color -moz-use-text-color rgb(0,0,0) rgb(0,0,0);padding:0in 0in 0.04in 0.04in" width="77">
<p>true</p>
</td>
<td style="border-width:medium 1px 1px;border-style:none solid solid;border-color:-moz-use-text-color rgb(0,0,0) rgb(0,0,0);padding:0in 0.04in 0.04in" width="403">
<p>Part of nodes is in 'discover' state, remaining part is in
'ready' state. Deployment can be started for the first part and
second part can be reset.</p>
</td>
</tr>
<tr valign="top">
<td style="border-width:medium medium 1px 1px;border-style:none none solid solid;border-color:-moz-use-text-color -moz-use-text-color rgb(0,0,0) rgb(0,0,0);padding:0in 0in 0.04in 0.04in" width="63">
<p>true</p>
</td>
<td style="border-width:medium medium 1px 1px;border-style:none none solid solid;border-color:-moz-use-text-color -moz-use-text-color rgb(0,0,0) rgb(0,0,0);padding:0in 0in 0.04in 0.04in" width="87">
<p>true</p>
</td>
<td style="border-width:medium medium 1px 1px;border-style:none none solid solid;border-color:-moz-use-text-color -moz-use-text-color rgb(0,0,0) rgb(0,0,0);padding:0in 0in 0.04in 0.04in" width="77">
<p>true</p>
</td>
<td style="border-width:medium 1px 1px;border-style:none solid solid;border-color:-moz-use-text-color rgb(0,0,0) rgb(0,0,0);padding:0in 0.04in 0.04in" width="403">
<p>We have some nodes in every of the states: 'discover',
provisioning/deployment, 'ready'. So, we can allow different
actions for nodes in different states.</p>
</td>
</tr>
</tbody></table>
<p>false</p>
<p>true</p>
<p>true</p>
<p>Part of nodes is under provisioning/deployment, remaining part is in
'ready' state. Deployment can be stopped for the first part and
second part can be reset.</p>
</div><div>I didn't show another 2 combinations here as they aren't related to '<span style class="">deployment' state of cluster</span> (as well as the first one in the table).<br></div><br></div>Also, we should be careful with the order of nodes deployment/reset. I'm not sure whether it is written in our docs that cluster may be non-functional if user tries to deploy nodes in the wrong order (e.g. computes first). We could show some warnings about that. Same applies to selective reset if we will implement it.<br><br><div><div><br></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">Aleksey Kasatkin
<br><br></div></div></div>
<br><div class="gmail_quote">On Fri, May 22, 2015 at 5:33 PM, Roman Prykhodchenko <span dir="ltr"><<a href="mailto:me@romcheg.me" target="_blank">me@romcheg.me</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">Hi folks!<br>
<br>
Recently I encountered an issue [1] that the Deploy Changes button in the web ui is still active when a provisioning of single node is started using the command line client.<br>
The background for that issue is that the provisioning task does not seem to update the cluster status correctly and Nailgun’s API returns it as NEW even while some of the node are been provisioned.<br>
<br>
The reason for raising this thread in the mailing list is that provisioning a node is a feature for developers and basically end-users should not do that. What is the best solution for that: fix Nailgun to set the correct status, or make this provisioning feature available only for developers?<br>
<br>
1. <a href="https://bugs.launchpad.net/fuel/7.0.x/+bug/1449086" target="_blank">https://bugs.launchpad.net/fuel/7.0.x/+bug/1449086</a><br>
<br>
<br>
- romcheg<br>
<br>
</div></div><br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>