<div dir="ltr">Hi,<div><br></div><div style>In our OpenStack installation we have an issue when creating new instances, we need to execute some long running processes before calling "nova boot" and the call blocks for the end user for a while. We would like to return "immediately" to the caller with a final instance UUID and do the work on the background, but it's only generated when during actual instance creation, which is a no go in our situation.</div>

<div style><br></div><div style>I read the proposed <a href="https://blueprints.launchpad.net/nova/+spec/launch-instances-async">https://blueprints.launchpad.net/nova/+spec/launch-instances-async</a> blueprint, and I agree with Vish's take, the cleanest way would be to create the job construct and return a 202+URI, but it would not solve our situation, the calling system has some restrictions on pooling for updates and even creating callbacks that we could use to update them once the instance was created.</div>

<div style><br></div><div style>With all these restrictions in mind, one solution would be to allow a "--custom-instance-uuid=abc123" option. According to our spikes, we would only need to make sure that the param value would find its way into base_options (<a href="https://github.com/openstack/nova/blob/a17d03c43f1f118c4a1e16e092cd0a570f0f1694/nova/compute/api.py#L570">https://github.com/openstack/nova/blob/a17d03c43f1f118c4a1e16e092cd0a570f0f1694/nova/compute/api.py#L570</a>) as "uuid=<param_uuid>" to make it work, there would be no need to change code after this point. To prevent misuse we could add a configuration option to allow/deny this parameter, perhaps restricting it to admin users, but once <a href="https://blueprints.launchpad.net/nova/+spec/db-enforce-unique-keys">https://blueprints.launchpad.net/nova/+spec/db-enforce-unique-keys</a> is implemented I don't believe this would be a big issue.</div>

<div style><br></div><div style>I would like to have some opinions on this before spending time implementing it, feedback on how to improve it, overlooked issues and alternatives are super welcome.<br></div><div><br clear="all">

<div>Thanks,</div><div>Rafael Rosa Fu<div><a href="http://www.grokpodcast.com/" target="_blank">grokpodcast.com</a></div></div>
</div></div>