~ubuntu-branches/ubuntu/wily/heat/wily-proposed

« back to all changes in this revision

Viewing changes to heat/engine/stack_lock.py

  • Committer: Package Import Robot
  • Author(s): James Page, Corey Bryant, James Page
  • Date: 2015-03-30 11:11:18 UTC
  • mfrom: (1.1.23)
  • Revision ID: package-import@ubuntu.com-20150330111118-2qpycylx6swu4yhj
Tags: 2015.1~b3-0ubuntu1
[ Corey Bryant ]
* New upstream milestone release for OpenStack kilo:
  - d/control: Align with upstream dependencies.
  - d/p/sudoers_patch.patch: Rebased.
  - d/p/fix-requirements.patch: Rebased.

[ James Page ]
* d/p/fixup-assert-regex.patch: Tweak test to use assertRegexpMatches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
import contextlib
15
15
import uuid
16
16
 
17
 
from oslo.config import cfg
18
 
from oslo import messaging
19
 
from oslo.utils import excutils
 
17
from oslo_config import cfg
 
18
from oslo_log import log as logging
 
19
import oslo_messaging as messaging
 
20
from oslo_utils import excutils
20
21
 
21
22
from heat.common import exception
22
23
from heat.common.i18n import _LI
23
24
from heat.common.i18n import _LW
24
25
from heat.common import messaging as rpc_messaging
25
26
from heat.db import api as db_api
26
 
from heat.openstack.common import log as logging
27
27
 
28
28
cfg.CONF.import_opt('engine_life_check_timeout', 'heat.common.config')
29
29
 
39
39
 
40
40
    @staticmethod
41
41
    def engine_alive(context, engine_id):
42
 
        client = rpc_messaging.get_rpc_client(version='1.0', topic=engine_id)
 
42
        client = rpc_messaging.get_rpc_client(
 
43
            version='1.0', topic="heat-engine-listener",
 
44
            server=engine_id)
43
45
        client_context = client.prepare(
44
46
            timeout=cfg.CONF.engine_life_check_timeout)
45
47
        try:
132
134
        try:
133
135
            self.acquire()
134
136
            yield
 
137
        except exception.ActionInProgress:
 
138
            raise
135
139
        except:  # noqa
136
140
            with excutils.save_and_reraise_exception():
137
141
                self.release(stack_id)