OpenStack Orchestration (Heat)
Go to file
Anant Patil 634c24ecfe Convergence: Concurrency subtle issues
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
2015-11-26 09:45:49 +00:00
bin Deprecate heat-keystone-setup 2015-11-13 10:28:42 +08:00
contrib Correctly determine when SSL termination config changes 2015-11-23 16:09:50 -06:00
devstack/upgrade Fix grenade upgrade script dependency 2015-10-29 14:24:03 +01:00
doc Fix wait condition doc sample 2015-11-24 09:28:52 +01:00
etc/heat Do not use api-paste.ini osprofiler options 2015-11-17 09:34:18 +00:00
heat Convergence: Concurrency subtle issues 2015-11-26 09:45:49 +00:00
heat_integrationtests Split abandon into pre-abandon(export) and abandon 2015-11-20 09:17:41 -06:00
heat_upgradetests In-tree grenade support for Heat 2015-07-02 17:23:22 +05:30
rally-scenarios Replace github with openstack git repo 2015-10-21 09:51:40 +08:00
tools py34: cleanup 2015-10-08 20:10:54 +05:30
.coveragerc Change ignore-errors to ignore_errors 2015-09-21 14:26:58 +00:00
.gitignore Ignore .eggs directory (created by the new pbr) 2015-07-22 10:35:25 +10:00
.gitreview Update .gitreview for org move. 2012-12-02 17:46:15 +00:00
.testr.conf Add separate requirements.txt to integration tests 2015-04-01 09:02:13 +00:00
CONTRIBUTING.rst Workflow documentation is now in infra-manual 2014-12-05 03:30:36 +00:00
HACKING.rst cleanup of hacking.rst heat doc 2015-04-28 16:47:07 -04:00
LICENSE Initial commit (basics copied from glance) 2012-03-13 21:48:07 +11:00
README.rst replace git protocol by https 2015-10-22 10:06:05 +08:00
babel.cfg Add setup.py and friends 2012-03-14 09:25:54 +11:00
bandit.yaml tox environment for `bandit` 2015-07-08 09:13:35 -04:00
config-generator.conf Added CORS support to Heat 2015-10-19 09:18:20 -07:00
install.sh install.sh: stop using deprecated option group for rabbit 2015-09-01 19:01:34 +02:00
openstack-common.conf Switch to oslo.service 2015-06-23 08:30:39 +02:00
pylintrc Directives to not use variable names that conflict with pdb 2012-03-20 07:16:16 -04:00
requirements.txt Merge "Add senlin client" 2015-11-23 15:22:57 +00:00
setup.cfg Add senlin client 2015-11-19 14:01:00 +08:00
setup.py Updated from global requirements 2015-09-22 10:40:48 +00:00
test-requirements.txt Updated from global requirements 2015-11-20 04:54:32 +00:00
tox.ini Remove [H405] and [H404] ignoring in tox.ini 2015-10-12 14:08:16 +03:00
uninstall.sh Add uninstall script for Heat 2012-06-23 22:41:30 -04:00

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

Python client

https://git.openstack.org/cgit/openstack/python-heatclient

References

We have integration with