Move from oslo RPC to oslo.messaging.
Implements: blueprint oslo-messaging
Co-Authored-By: sdake@redhat.com
Change-Id: I2d222c248dd2cd405b8ec35c4c8198ed001fb69f
Overriding CONF.default_log_levels means we loose some explicitly set
default values such as 'iso8601=WARN'. Also explicitly overriding
CONF.default_log_levels means that default_log_levels cannot be set in a
config file.
Change-Id: Ib5103b88ec3f9ccd9d516032c6a13dc2fa4bcb5e
Currently we create the ThreadGroupManager and EngineListener
objects in the service constructor, which is not necessarily
going to work if multiple worker processes are specified in
the config file (which fork multiple workers after the constructor).
The ThreadGroupManager appears to work, even when it is created before
the fork, but this is due to some magic in the oslo ProcessLauncher
implementation which decouples parent/child use of the eventlet hub.
So instead, we move all service startup code into the start() method,
which is the entry point for services, triggered via the oslo Services
class run_service method:
- Don't create anything common to the workers in the constructor
- Move ThreadGroup and EngineListener creation into start()
- Create the periodic tasks from bin/heat-engine, which means
the periodic tasks will only be created by the parent, not
duplicated in every worker process.
These changes should mean we work correctly with both the ServiceLauncher
(num_engine_workers==1) and ProcessLauncher(num_engine_workers>1) oslo
abstractions, and solves the issues observed when running multiple
workers with the impl_qpid rpc_backend.
Change-Id: If3a11050a03660560a364dec871f85c4b56c1c25
Closes-Bug: #1321303
After enhancements to Oslo Message class, re-enable lazy translation to
enable REST API responses to be translated to the requested user locale.
bp i18n-messages
Change-Id: I4be508858547029d454412746609fd380af415c1
This patch fixes all the missed and newly introduced violations of the H306
style checking rule and enables it in tox.
Change-Id: I5566e66421d5397c0103958f02ea38e6e3c68892
Implements: blueprint reduce-flake8-ignored-rules (partial)
This reverts commit 5604168784.
Problems have been reported on systems using QPID. The gate only tests
RabbitMQ.
Change-Id: Iaf83dc7582835ce5bf4534116c918640da7373aa
Partial-Bug: #1321303
The engine is single-threaded and thus needs more workers to handle more
concurrent requests on a single machine.
Change-Id: I36117c3876f84a2ff7ba5576444fdbf7716cc69e
This mirrors work done in other OpenStack projects
to add systemd notification support to signal that
a given process is ready to accept requests.
The heat-api, heat-api-cfn, heat-engine, and
heat-api-cloudwatch processes are all covered by
a new, single, 'onready' configuration file option.
Additionally, the sample configuration file has been
updated to match.
Implements: blueprint systemd-integration
Change-Id: I90d2b915e2568a65ed9ed78923c9982e19f9c948
Signed-off-by: Lon Hohberger <lhh@redhat.com>
Revert enabling lazy translation, which doesn't work in many places
because we're doing string concatenation.
This reverts commit 1864efa320, reversing
changes made to 92e3e3ce74.
Closes-Bug: #1281644
Change-Id: Iac0be685f8bb60f81715c0dd3dbe35787e38ee39
After enhancements to Oslo Message class, re-enable lazy translation to
enable REST API responses to be translated to the requested user locale.
bp i18n-messages
Change-Id: I15ecffd678393c27c34336035d37915655e9f350
Oslo version 96d1f887dda21b43ba4376187f31953dee6f5273
This commit just migrates Heat to new db related code from Oslo
Partially implements blueprint oslo-db-support
Change-Id: Ib0de40a70857fb3e029a2282f06746269a628c71
Late in the Havana cycle bug 1225099 was found in the lazy
translation code, and to be safe it was decided to disable lazy
translation for Havana. This change does that.
Change-Id: Ia934a7df9386baf6ae8eb9ff48c24386c47ecd23
Partial-bug: 1225099
Add support for doing language resolution for a request, based on the
Accept-Language HTTP header. Using the lazy gettext functionality, from
oslo gettextutils, it is possible to use the resolved language to
translate exception messages to the user requested language and
return that translation from the API.
The patch removes individually imported _() so they don't replace the
one installed service-wide.
Also, it adds the ability to fully re-create a remote error
with the same kwargs with which it was originally created, so that we
can translate it and show it to the user.
Partially implements bp user-locale-api.
Change-Id: I63edc8463836bfff257daa8a2c66ed5d3a444254
This avoids registering multiple times the option if the registering
functions are called multiple path by different code paths. It's
necessary for the default configuration sample generator to have options
only registered once.
The update of oslo.notifier is needed to avoid it using the inexistant
$host option.
Change-Id: If31974d7ef7fdbf85a88e950ff06c60ccbd6c31d
Signed-off-by: Julien Danjou <julien@danjou.info>
avoid using two separate sets of translation messages when
HEAT_LOCALEDIR environment variable presents.
Fixes bug #1196184
Change-Id: Ief773b9f2674909de461e2b07f1b07d3c66521cc
Fix regression caused by the __init__.py refactoring, which means
we try to use cfg.CONF.host before registering it.
fixes bug #1174302
Change-Id: Iff4d75f53e242d7df8c7071cbeeead034a7ad9b0
Fixes bug #1173575
This is currently broken since heat-engine always listens to the
'engine' topic and there isn't actually a good use case for this to be
configurable, so let's kill it.
Change-Id: I35c0292c921f81857f80a7f111df5ac330d54ecf
The one reason we kept our own version was because of the qpid
logging that is quite useful. But this is now easily done via
the "default_log_levels" option.
I have setup the api servers with:
ampqlib,qpid.messaging,keystone,eventlet
and the engine with:
ampqlib,qpid.messaging,keystone,eventlet,sqlalchemy
bug: 1143629
Change-Id: I04eeab469ab59da550e08188d53b2cfbb576c04d
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
The cfg API is now available via the oslo-config library, so switch to
it and remove the copied-and-pasted version.
Add the 2013.1b3 tarball to tools/pip-requires - this will be changed
to 'oslo-config>=2013.1' when oslo-config is published to pypi. This
will happen in time for grizzly final.
Add dependency_links to setup.py so that oslo-config can be installed
from the tarball URL specified in pip-requires.
Remove the 'deps = pep8==1.3.4' from tox.ini as it means all the other
deps get installed with easy_install which can't install oslo-config
from the URL.
Excluded code from oslo-incubator in the pep8 check.
Retain dummy cfg.py file until keystoneclient middleware has been
updated (I18c450174277c8e2d15ed93879da6cd92074c27a).
Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
Lots of (mostly whitespace) cleanups to align all the non-test code with
pep8 v1.3.4
ref bug 1092057
Change-Id: I444b288444dba4ec1da5854bd276d091c06d8489
Signed-off-by: Steven Hardy <shardy@redhat.com>
Register the engine options as soon as we import something from the engine
package. This means we do not need to explicitly do it in all of the unit
tests.
Change-Id: I8fb0c8665d0e0255521e21a6aac223ad1e3b1b25
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Don't import the heat-engine service module until the configuration options
have been initialised. This will allow us to read the configuration during
initialisation of the engine.
Change-Id: I2bc70d903434eac1fa248640018f038c5ef2bead
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Use openstack.common routines. One of the parameters changed to
create_consumer().
Thanks to Russell Bryant for assistance with sorting out that problem.
Change-Id: I4badc7ca22298cd0aafc57a2335b3d6801289be8
Signed-off-by: Steven Dake <sdake@redhat.com>
Importing rpc.common requires the use of the global cfg.CONF.
In fact, most of common requires the use of this global. This
patch removes all the object specific access to config options
and directly accesses the global in prep for rpc openstack-common
import.
Change-Id: I5989a436964c199df0dc38dbb191dc3d867e5ce7
Signed-off-by: Steven Dake <sdake@redhat.com>
Allows heat to match openstack-common log calling conventions such
as using a context object or instance UUID for better traceability.
Change-Id: Idaa6c04270d9d7143c85988d685c0f9e241b635b
Signed-off-by: Steven Dake <sdake@redhat.com>
Fixes #47
The code that causes the URI TOO LONG error is in eventlet.wsgi.
So for the time being we're replacing that with paste.httpserver which serves
WSGI apps, too.
Longer term, we want to use eventlet but they need to make the maximum URL
length configurable.