634c24ecfe
To avoid certain concurrency related issues, the DB update API needs to be given the traversal ID of the stack intended to be updated. By making this change, we can void having following at all the places: if current_traversal != stack.current_traversal: return The check for current traversal should be implicit, as a part of stack's store and state_set methods, where self.current_traversal should be used as expected traversal to be updated. All the state changes or updates in DB to the stack object go through this implicit check (using update...where). When stack updates are triggered, the current traversal should be backed up as previous traversal, a new traversal should be generated and the stack should be stored in DB with expected traversal as the previous traversal. This will ensure that no two updates can simultaneously succeed on same stack with same traversal ID. This was one of our primary goal. Following example cases describe the issues we encounter: 1. When 2 updates, U1 and U2 try to update a stack concurrently: 1. Current traversal(CT) is X 2. U1 loads stack with CT=X 3. U2 loads stack with CT=X 4. U2 stores the stack and updates CT=Y 5. U1 stores the stack and updates the CT=Z Both the updates have succeeded, and both would be running until one of the workers does stack.current_traversal == current_traversal and bail out. Ideally, U1 should have failed: only one should be allowed in case of concurrent update. When both U1 and U2 pass X as the expected traversal ID of the stack, then this problem is solved. 2. A resource R is being provisioned for stack with current traversal CT=X: 1. An new update U is issued, it loads the stack with CT=X. 2. Resource R fails and loads the stack with CT=X to mark it as FAILED. 3. Update U updates the stack with CT=Y and goes ahead with sync_point etc., marks stack as UPDATE_IN_PROGRESS 4. Resource marks the stack as UPDATE_FAILED, which to user means that update U has failed, but it actually is going on. With this patch, when Resource R fails, it will supply CT=X as expected traversal to be updated and will eventually fail because update U with CT=Y has taken over. Partial-Bug: #1512343 Change-Id: I6ca11bed1f353786bb05fec62c89708d98159050 |
||
---|---|---|
bin | ||
contrib | ||
devstack/upgrade | ||
doc | ||
etc/heat | ||
heat | ||
heat_integrationtests | ||
heat_upgradetests | ||
rally-scenarios | ||
tools | ||
.coveragerc | ||
.gitignore | ||
.gitreview | ||
.testr.conf | ||
CONTRIBUTING.rst | ||
HACKING.rst | ||
LICENSE | ||
README.rst | ||
babel.cfg | ||
bandit.yaml | ||
config-generator.conf | ||
install.sh | ||
openstack-common.conf | ||
pylintrc | ||
requirements.txt | ||
setup.cfg | ||
setup.py | ||
test-requirements.txt | ||
tox.ini | ||
uninstall.sh |
README.rst
Heat
Heat is a service to orchestrate multiple composite cloud applications using templates, through both an OpenStack-native REST API and a CloudFormation-compatible Query API.
Why heat? It makes the clouds rise and keeps them there.
Getting Started
If you'd like to run from the master branch, you can clone the git repo:
git clone https://git.openstack.org/openstack/heat
- Wiki: http://wiki.openstack.org/Heat
- Developer docs: http://docs.openstack.org/developer/heat
- Template samples: https://git.openstack.org/cgit/openstack/heat-templates
Python client
https://git.openstack.org/cgit/openstack/python-heatclient
References
- http://docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_CreateStack.html
- http://docs.amazonwebservices.com/AWSCloudFormation/latest/UserGuide/create-stack.html
- http://docs.amazonwebservices.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html
- http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=tosca
We have integration with
- https://git.openstack.org/cgit/openstack/python-novaclient (instance)
- https://git.openstack.org/cgit/openstack/python-keystoneclient (auth)
- https://git.openstack.org/cgit/openstack/python-swiftclient (s3)
- https://git.openstack.org/cgit/openstack/python-neutronclient (networking)
- https://git.openstack.org/cgit/openstack/python-ceilometerclient (metering)
- https://git.openstack.org/cgit/openstack/python-cinderclient (storage service)
- https://git.openstack.org/cgit/openstack/python-glanceclient (image service)
- https://git.openstack.org/cgit/openstack/python-troveclient (database as a Service)
- https://git.openstack.org/cgit/openstack/python-saharaclient (hadoop cluster)
- https://git.openstack.org/cgit/openstack/python-barbicanclient (key management service)
- https://git.openstack.org/cgit/openstack/python-designateclient (DNS service)
- https://git.openstack.org/cgit/openstack/python-magnumclient (container service)
- https://git.openstack.org/cgit/openstack/python-manilaclient (shared file system service)
- https://git.openstack.org/cgit/openstack/python-mistralclient (workflow service)
- https://git.openstack.org/cgit/openstack/python-zaqarclient (messaging service)
- https://git.openstack.org/cgit/openstack/python-monascaclient (monitoring service)