<div dir="ltr">Hello Community!<div><br></div><div>Recently with CI performance degradation ironic team meet with the following problem. Quick automated cleaning is enabled on grenade jobs which is started exactly after nova instance is deleted.</div><div>We do not wait for cleaning is finished in nova virt driver before mark instance as deleted [0] as result </div><div>new tests may be started when ironic perform cleaning of nodes from previous tests.</div><div>During last time CI become much slower which leads to grenade job failures.</div><div><br></div><div>To fix it we need to wait for cleaning is completed before start new tests/grenade phases (ironic resources should be available again after base smoke tests/resources destroy phase).</div><div>Since grenade cleanup resources in reverse order [1] there is no way to wait for resources are available again on ironic side.</div><div><br></div><div>The possible options here are:</div><div><ol><li>Wait for resource are available again in ironic grenade plugin after base smoke tests finished before running resources phase.</li><li>Ensure that ironic node is available again right after destroy phase. Two options are available here </li><ol><li>Modify nova resources destroy phase [2] to honor ironic case and wait for resources there.</li><li>Add new phase right after 'destroy'. (Previously there were 'force_destroy' phase which we tried to use [3] )</li></ol></ol></div><div>[0] <a href="https://github.com/openstack/nova/blob/master/nova/virt/ironic/driver.py#L1137">https://github.com/openstack/nova/blob/master/nova/virt/ironic/driver.py#L1137</a></div><div>[1]<a href="https://github.com/openstack-dev/grenade/blob/11dd94308ed5c25a8f28f86b03b20b251f0a05a1/inc/plugin#L111"> https://github.com/openstack-dev/grenade/blob/11dd94308ed5c25a8f28f86b03b20b251f0a05a1/inc/plugin#L111</a></div><div>[2] <a href="https://github.com/openstack-dev/grenade/blob/11dd94308ed5c25a8f28f86b03b20b251f0a05a1/projects/60_nova/resources.sh#L142">https://github.com/openstack-dev/grenade/blob/11dd94308ed5c25a8f28f86b03b20b251f0a05a1/projects/60_nova/resources.sh#L142</a></div><div>[3] <a href="https://review.openstack.org/#/c/489410/">https://review.openstack.org/#/c/489410/</a></div></div>