Instead of spawning our own threads and relying on the oslo.messaging
executor blocking, lets just use oslo.messaging's internal threading
capabilities. This converts rpc.Connection to rpc.MessagingService,
which is an oslo.service-based service and sets up messaging to managed
there instead.
Closes-bug: #1583330
Change-Id: I9f5a15f1c5dff7e90761887c519a15888096636b
When a resource is deleted, its not currently removed from the tenant
resource cache. This causes a cache hit if the tenant attempts to re-create
the same type of resource, but the resource is then later ignored because
it has been deleted. This adds a callback used by the TRM to remove it
from the resource cache when its state machine is deleted.
Change-Id: I5dcbeda7de240a693fc7a4944dd34a37b10d174b
Closes-bug: #1531597
This converts from using our own auth config to relying on keystoneclient
and keystone authtoken middleware instead. We construct a keystone session
instead and pass that into clients.
Switching to session-backed novaclient exposes a race in our novaclient
usage where we attempt to access attributes on a server object before
its data is completely lazily loaded. This adds a small spin before
we attempt to access its server status.
This also cleans up the default config a bit as well as silents some
noisy debug logging from isol8601 and cliff.
Change-Id: Ic41dc48e44f692d768ab0eafc0a65d98255ae260
This adds support for running multiple RUG processes to scale out
and distribute appliance load across them. It uses a hash ring implementation
lifted from Ironic (with modification). The gist is:
* Workers now maintain a copy of the hash ring, which is hashed using the
list of members in the cluster.
* A new subprocess connects to an external coordination service via tooz, ie
memcache or zookeeper. This service's only purpose is to track cluster
membership and report changes to this subprocess. On membership changes,
the coordination subprocess creates a REBALANCE event and puts it on the
internal notification queue. There is no leadership election required.
* When a worker gets a REBALANCE event, it rebalances the hash ring based
on the new membership list.
* Prior to processing any events bound for a specified router, the worker
first checks the hash manager to find if the resource is assigned to it.
If not, it ignores it. If it is, it processes the event. This also applies
to incoming command events.
Partially implements: blueprint rug-scaling
Change-Id: I8d04100ffc0e2f2223ebf4b079551dac99224344
In preparation for scale out RUG, this adds a database layer
(built on oslo.db) that will be used for managing debug modes.
Instead of tracking debug'd/ignored routers and tenants in-memory
or on disk as files, this uses a database. This means that putting
things into debug mode via rug-ctl are now persistent, and the file-based
approach is no longer available. A sqlite database (the default) can be
used for single node installs, or the RUG can be pointed at mysql/pg to
handle this in larger environments.
This also adds a global debug mode that can be used to ignore all events
during maintanence periods.
A new optional 'reason' argument has been added to the debug modes, allowing
operators to add a note when entering a tenant/router/cluster into debug
mode.
Change-Id: I3f5129e11b11cf5aaed8889da3b204104e5ad203
Closes-bug: #1470619
Partially implements: blueprint rug-scaling
Moves eventlet + six to where they should be and runs requirements'
update.py through the repo, setting correct liberty constraints.
Change-Id: Ieb24cdf1a2e3d895b33a588012a0153cfe9d93a8
This replaces use of openstack.common.gettextutils with oslo.i18n.
It switches to using the finer grained message catalogs and classifies
log msgs that are currently translated into their respective catalog.
Change-Id: Ia8abe17e5b88ba7994d8dd29763375f3eeb57ed6
This was originally proposed as two separate patches but a module dependency
issue requires them to be squashed into one patch.
* Migrate to oslo.log
This updates logging to use olso.log. Also updates the default logging format
to be a bit more standard, and sets up devstack to configure colorized logging
in the screen session.
This will likely need to be squashed into the oslo.messaging patch but pushing
seperately for the sake of initial review.
* Rework messaging layer for oslo.messaging
Instead of setting up kombu connections directly this uses oslo.messaging.
oslo.messaging doesn't expose all the kombu/rabbit-isms that let us setup a
single connectino to sniff the notifications and RPC buses. Instead, we need
to subscribe to each as different connectinos. The child process that listens
for notifications now spawns multiple threads, one for each consumer we setup.
This also updates the Sender class to use an oslo.messaging notifier instead of
setting up notifications for commands directly with kombu. The ceilometer
Publisher uses the same approach when sending its messages.
The old code that created Events from messages is now split between a
notifications endpoint object and another for RPC messages.
Change-Id: Ia7cc26dc20ed57bdf21571e260d006669d6f3310
This removes akanda.rug's minimal usage of openstack.common.importutils
in favor of the equivalent oslo_utils.import_utils.
Note the old module is still left in place as its used by other old
oslo-incubator things.
Change-Id: I256c87db84d55fb6957252d2593b9ed15b7f35aa
blessed is not in openstack g-r and blocks us from aligning there. This makes
the dependency optional. If it is not installed, the cli browse command emits
a warning telling the user to install it. The browse section of the CLI is the
only place its used and doesn't affect any other functionality.
Change-Id: If446c2135936c8ea4083eb9fc712a98031b28ac4
This removes akanda.rug's usage of openstack.common.jsonutils
and instead uses the equivalent oslo_serialiation.jsonutils.
Note the old module is still left in place as its used by other old
oslo-incubator things.
Change-Id: I94c3d0433180120fc55328ae9ae6917af518ffc9
This removes akanda.rug's usage of openstack.common.context
and instead uses the equivalent oslo_context.context.
Note the old module is still left in place as its used by other old
oslo-incubator things.
Change-Id: I3343106d4da59dede7ca32e66c8ec7ed1abb4ebb