<div dir="ltr"><div><div>Hi,<br><br></div>I'm working on implementing rebuild() in the nova.virt.ironic driver so that we can support the --preserve-ephemeral option. I have a design question and would love some feedback on it.<br>
<br>The way to trigger a deploy is to set the 
provision state to ACTIVE. However, for a rebuild, we cannot currently 
use this, since the API will return an error saying that the target 
state and the current provision state are the same, and return an error.<br>
<br>I can think of a couple of ways around this:<br><br>(1) If target and current provision state are ACTIVE, go ahead and allow the (re)deploy.<br><br>(2)
 Add a new provision state that would set the instance to a sort of 
temporary limbo state, expecting to be redeployed at some point by 
setting target to ACTIVE (as normal).<br>
<br>Both changes would require changing NodeStatesController.<div>provision()
 for the new behaviour. However, I'm not sure which is preferable, or if
 there is another option I haven't considered.<br><br></div>Thoughts?<br>
<br></div>-Dave<br></div>