Introduce TaskFlowServiceController which uses taskflow
jobboard feature and saves jobs info into persistence backend.
Jobboard could be operated via RedisTaskFlowDriver or
ZookeeperTaskFlowDriver, that could be set via the config.
RedisTaskFlowDriver is intoduced as default backend for jobboard.
Usage of jobboard allows to resume jobs in case of restart/stop
of Octavia controller services.
Persistence backend saves state of flow tasks that required in
case of resuming job. SQLAlchemy backend is used here.
Bump taskflow version to 3.7.1 and add dependency to
SQLAlchemy-Utils (required for taskflow sqlalchemy
backend support).
Story: 2005072
Task: 30806
Task: 30816
Task: 30817
Change-Id: I92ee4e879e98e4718d2e9aba56486341223a9157
Split _get_delete_load_balancer_flow, create
separate methods for store generation.
Change-Id: I71117717a7fdff349473c43975ad639c0448713e
Story: 2005072
Task: 30807
Fixed endpoints logs for listener, pool and member as well.
Rework _get_create_amp_for_lb_subflow due to issue with taskflow
decider and retry subflow.
Retry subflow was not ignored properly for spare amphorae case,
so _get_create_amp_for_lb_subflow has been split to
3 separate subflows each of them linked to graph flow.
This is work around and can be removed when proper mechanism
implemeneted in taskflow library. (added several todos about it).
Change-Id: Ibd114fa14123e6de6c5d6f260e32cf7f2b28805a
Story: 2005072
Task: 30814
This patch converts the member flows to use the provider driver
data model.
It also stops storing sqlalchemy models in the flow storage in
preparation for enabling jobboard.
Change-Id: Ic15e4311ce244e71b65069359c6c08e49f6b8d00
Story: 2005072
Task: 30810
This patch converts the listener flows to use the provider driver
data model.
It also stops storing sqlalchemy models in the flow storage in
preparation for enabling jobboard.
Change-Id: Ic44019b8877f008e6d7a75ceed1b7fd958e051d0
Story: 2005072
Task: 30808
Use taskflow retry for connectivity wait. [1]
This reqired for redis jobboard implementation as each retry expand
claim for job on worker. This means that worker is proccesing job and
it should not be released for other workers to work on it.
Adopted for v2 flows.
[1] - https://docs.openstack.org/taskflow/latest/user/atoms.html#retry
Story: 2005072
Task: 33477
Change-Id: I2cf241ea965ad56ed70ebde83632ab855f5d859e
Fix an issue that prevents graceful shutdown of controller workers.
cotyledon.Service.terminate function is by definition the graceful
termination function and doesn't have any 'graceful' optional boolean
argument (https://cotyledon.readthedocs.io/en/latest/api.html).
Because of this error, message_listener.wait() was never called in the
consumers' termination functions, so flows could be interrupted before
completion and could leave resources such as load balancer in a
PENDING_* provisioning state.
By default cotyledon.Service terminates the server after a timeout if
the worker could not shutdown itself gracefully. The default value
for the timeout is 300 seconds (set in devstack plugin) and can be
overriden using the graceful_shutdown_timeout setting in octavia.conf
The default value will be updated to a lower value when work on
persistant taskflow will be merged.
Story: 2006603
Task: 36770
Change-Id: I3f776bd018246897c9a889699a2d0ecbbfbb7098
This patch creates an Amphora v2 provider driver as well as a
V2 controller worker.
This is in preparation for having the amphora driver use the new
provider driver data models and rely less on native Octavia database
access.
It is also a prepartion step for enabling TaskFlow JobBoard as
this work will move to storing dictionaries in the flows instead
of database models.
Change-Id: Ia65539a8c39560e2276750d8e79a637be4c0f265
Story: 2005072
Task: 30806
Includes some updates to docs and configs and related files to remove
references to neutron-lbaas. Also remove handlers.
Change-Id: I3082962841d3b645f3cbd1a6b41fc7fb28dcf7e6
This patch updates the amphroa driver to pass the flavor dictionary
over to the controller worker at load balancer creation time.
This flavor dictionary is then inserted into the load balancer
creation flow.
Change-Id: I615937fdf9edf335fb18999f1b7c11eb6202a3d1
This also fix build-openstack-sphinx-docs, there was a change introduced
in sphinx 1.6.6:
https://github.com/sphinx-doc/sphinx/pull/4335/files
If the size of __init__.py is less than 2, then the module would be
skipped which will cause the sphinx consistency checking failing later.
Change-Id: I9d8764b6e907aceed8bb8a9b04711145d0eb32ad
This adds a way to configure the event streamer transport URL
so it can post to a different queue, e.g. Neutron's
Change-Id: I69d3d6d30e33878052f2c56b8c79a14cc4ec1b24
Also fix an incorrect exposure of /healthmonitors on /pools and a badly
ordered flow for member updates.
Change-Id: Id256ea94293519b75983f7a44945ac9bbbf25cd1
Implements: blueprint member-put-list
This will allow an operator to force the failover of a load
balancer's underlying amphora for upgrades or other
maintenance.
- Adds a new failover endpoint to the queue
- Adds the functionality to the worker
- Adds the failover command to the producer
- Adds a failover controller so
/lodabalancer/123/failover will initiate
a failover and return 202
- Adds logic to insert the server group into the
failover flow
Change-Id: Ic4698066773828ae37b55a8d79bd2df6fc6624be
Currently uses 'get_notification_transport' for RPC. Notification
transports are for oslo.messaging notifications, not RPC.
Change-Id: I787c230e0eb3b1ce8500ec76b1319684520aa512
Closes-Bug: #1699597
DeprecationWarning:
Using function/method 'oslo_messaging.transport.get_transport()'
is deprecated: use get_rpc_transport or get_notification_transport.
Replace get_transport with get_notification_transport.
Change-Id: Ia32198e7e673154aeaa15757b1f733be61d8f58a
Warning: Using function/method 'oslo_messaging.transport.get_transport()'
is deprecated: use get_rpc_transport or get_notification_transport
Change-Id: Ib686e6761983fd7e988f33d5cfc4864e62c6763f
This became a lot more complicated than originally anticipated... When
we made the decision to use the pool_id as the hm_id, someone should
have smacked us.
Depends-On: I8dd385e3c993942473e67d04367cdf74495dbeef
Change-Id: I8c9f3bfe6766eac93642b656efd8876279d3d378
Closes-Bug: #1692171
* Fill the create LB log message correctly with ID
* Create the full path when creating certs (prevents annoying errors)
Change-Id: Iadace0f7f84ada920139b4476b8e854eec6ab1f7
There is a pool of threads that are typically used
here in this executor, to be safe shut it down on
worker/consumer shutdown (the python interpreter
will also do this on exist, but its better to be
explicit than not).
Change-Id: I374233a1cc1b7995a96d79532c0208cd355185ba
oslo.messaging allow dispatcher to restrict endpoint methods since
5.11.0 in d3a8f280ebd6fd12865fd20c4d772774e39aefa2, set with
DefaultRPCAccessPolicy to fix FutureWarning like:
"The access_policy argument is changing its default value to <class
'oslo_messaging.rpc.dispatcher.DefaultRPCAccessPolicy'> in version '?',
please update the code to explicitly set None as the value:
access_policy defaults to LegacyRPCAccessPolicy which exposes private
methods. Explicitly set access_policy to DefaultRPCAccessPolicy or
ExplicitRPCAccessPolicy.
Change-Id: I9a644624d4bfdf8830fe0012dc269da8a52559ee
Adds a new cascading delete method to the REST API.
When a load balancer is deleted it will alo delete
all associated listeners, pools, memebers, healthmonitors,
and L7 Policies
Change-Id: I0fd88923dc76e573b92d83f68d292ded913b13a6
This commit modifies the controller worker and its tasks and flows
in order to enable the manipulation of L7 policies and rules
in Octavia as well as unit tests for the same. It is one in a chain
of commits designed to keep the size of each individual commit
manageable / reviewable. Jinja template and documentation updates
will come in later commits.
Partially-Implements: blueprint lbaas-l7-rules
Partially-Implements: blueprint layer-7-switching
Change-Id: I13de3f89d9236cf508744b04c1d8de04296a34f3
EvenStream will be used to serialize messages from the octavia
database to neutron-lbaas database via oslo_messaging. Also
renaming update mixin class since its not really a mixin. The
health manager will make changes to the octavia database when
members etc are marked as down and up etc which would result
in databases that were not in sync between neutron-lbaas and
octavia. A mechanism to communicate database changes from
octavia back to neutron is required so this CR attempts
to use a oslo_messaging system to communicate those changes,
Docimpact - /etc/octavia.conf the user can set the option
event_streamer_driver = neutron_event_streamer
to setup a queue to connect to neutron-lbaas.
if this option is left blank it will default to
the noop_event_streamer which will do nothing
effectively turning the Queue off.
Co-Authored-By: Brandon Logan <brandon.logan@rackspace.com>
Change-Id: I77a049dcc21e3ee6287e661e82365ab7b9c44562
This makes more sense and also suppresses the error messages when
launching the service returned from oslo_messaing.get_rpc_server
service. Instead of that service wait() being called, the Consumer's
wait will be called.
Change-Id: I63816e92fbe26a4213946e6ab584531bdc3b7dd2
Closes-Bug: #1527418
Oslo messaging RPCServers should not be launched to receive messages by calling
the wait method. The wait method is meant to be called after stop to finish
processing messages that were on the queue before the stop method was called.
Instead this uses oslo_service to launch the RPCServer.
Change-Id: I5aa4b0f349b26b523bd9853f2a2cd239c2991ea9
Closes-Bug: #1513689
We should delegate (when possible) formatting to the logger in order to
perform formatting only when needed, by using:
LOG.<level>(message, data)
instead of:
LOG.<level>(message % data)
and
try:
...
except ...:
LOG.exception("lorem ipsum")
instead of:
try:
...
except ... as e:
LOG.error("lorem ipsum: %s:", e)
This change removes also some incorrect usages of _LW in debug logs.
Change-Id: I6c62ceffbb99d2dee76160d398c6166132f6471c
The Oslo libraries have moved all of their code out of the 'oslo'
namespace package into per-library packages. The namespace package was
retained during kilo for backwards compatibility, but will be removed by
the liberty-2 milestone. This change removes the use of the namespace
package, replacing it with the new package names.
The patches in the libraries will be put on hold until application
patches have landed, or L2, whichever comes first. At that point, new
versions of the libraries without namespace packages will be released as
a major version update.
Please merge this patch, or an equivalent, before L2 to avoid problems
with those library releases.
Blueprint: remove-namespace-packages
https://blueprints.launchpad.net/oslo-incubator/+spec/remove-namespace-packages
Change-Id: Ib9106f86b1a04825c24bb2be284c17590f941d3c
Queue producer handler was not sending pool_id, it was sending a healthmonitor
id instead, which doesn't exist. Changed queue consumer and controller worker
to relfect this change as well. Also had to handle None expected codes better
in jinja config.
Change-Id: Icbd6e4f34ddba107af529634400eb41ad4cb9d38