<div dir="ltr">Hi all,<br><br>This topic came up in the 2015-12-15 meeting[1], and again briefly today.<br>After working with the code that came out of the deployment library spec[2] I<br>had some concerns with how we are storing the templates.<br><br>Simply put, when we are dealing with 100+ files from tripleo-heat-templates<br>how can we ensure consistency in Swift without any atomicity or transactions.<br>I think this is best explained with a couple of examples.<br><br> - When we create a new deployment plan (upload all the templates to swift)<br>   how do we handle the case where there is an error? For example, if we are<br>   uploading 10 files - what do we do if the 5th one fails for some reason?<br>   There is a patch to do a manual rollback[3], but I have concerns about<br>   doing this in Python. If Swift is completely inaccessible for a short<br>   period the rollback wont work either.<br><br> - When deploying to Heat, we need to download all the YAML files from Swift.<br>   This can take a couple of seconds. What happens if somebody starts to<br>   upload a new version of the plan in the middle? We could end up trying to<br>   deploy half old and half new files. We wouldn't have a consistent view of<br>   the database.<br><br>We had a few suggestions in the meeting:<br><br> - Add a locking mechanism. I would be concerned about deadlocks or having to<br>   lock for the full duration of a deploy.<br> - Store the files in a tarball (so we only deal with one file). I think we<br>   could still hit issues with multiple operations unless we guarantee that<br>   only one instance of the API is ever running.<br><br>I think these could potentially be made to work, but at this point are we<br>using the best tool for the job?<br><br>For alternatives, I see a can think of a couple of options:<br><br>- Use a database, like we did for Tuskar and most OpenStack API's do.<br>- Invest time in building something on Swift.<br>- Glance was transitioning to be a Artifact store. I don't know the status of<br>  this or if it would meet out needs.<br><br>Any input, ideas or suggestions would be great!<br><br>Thanks,<br>Dougal<br><br><br>[1]: <a href="http://eavesdrop.openstack.org/meetings/tripleo/2015/tripleo.2015-12-15-14.03.log.html#l-89">http://eavesdrop.openstack.org/meetings/tripleo/2015/tripleo.2015-12-15-14.03.log.html#l-89</a><br>[2]: <a href="https://specs.openstack.org/openstack/tripleo-specs/specs/mitaka/tripleo-overcloud-deployment-library.html">https://specs.openstack.org/openstack/tripleo-specs/specs/mitaka/tripleo-overcloud-deployment-library.html</a><br>[3]: <a href="https://review.openstack.org/#/c/257481/">https://review.openstack.org/#/c/257481/</a></div>