More refactoring of the SQLAlchemy database layer to improve
compatility with eventlet on newer Pythons.
Inspired by 0ce2c41404
Related-Bug: 2067815
Change-Id: Ib5e9aa288232cc1b766bbf2a8ce2113d5a8e2f7d
(cherry picked from commit 753c44b0c4)
(cherry picked from commit 54b3b58428)
This component is responsible for selecting an appropriate Planner based
on predefined property value passed to concrete Strategy.
Change-Id: I86de95886df5d7e9558512569601e9ea3babb0e9
Implements: bp watcher-planner-selector
Co-Authored-By: Canwei Li <li.canwei2@zte.com.cn>
Now there are only one scheduler for launching audit task and
executing audit jobs. We have found an exception where the scheduler
stops for some reason when executing audit.
In order to keep launching audit task normal, we need to split into
two schedulers.
Change-Id: I45dccaf062290cfc7d7fcfc27fe11d6f87f38afa
Add new start_time and end_time fields in the audit table
Partially Implements: blueprint add-start-end-time-for-continuous-audit
Change-Id: I6bb838d777b2c7aa799a70485980e5dc87838456
This patch set adds background job that reschedules CONTINUOUS
audits from FAILED to ACTIVE decision engine nodes using round-robin
algorithm. It also contains fix for main[1] HA PS about filtering audits.
[1]: https://review.openstack.org/#/c/578102/
Partially-Implements: blueprint support-watcher-ha-active-active-mode
Change-Id: Ib248a6cd3adbd3927c47db6bb819300361492411
This patch set adds hostname field to Audit and Action Plan
objects to track services which execute these objects.
Change-Id: I786e419952925c380c969b12cc60f9a1004af96b
Partially-Implements: blueprint support-watcher-ha-active-active-mode
Both Continuous and Oneshot audits made same action in
do_execute, so it's a good idea to move it to the base
class
TrivialFix
Change-Id: Ic0353f010509ce45f94126e4db0e629417128ded
when we update a existing audit's interval, the interval of
'execute_audit' job is still the old value.
We need to update the interval of 'execute_audit' job.
Change-Id: I402efaa6b2fd3a454717c3df9746c827927ffa91
Closes-Bug: #1738140
If scheduler uses db job store, the self.scheduler is None
beacuse execute_audit is class method.
We get [] from self.scheduler.get_jobs()
and can't remove the cancelled audit.
Change-Id: I1768c847465bbefbc9794281328edb07fea83b03
Closes-Bug: #1726345
Currently continuous audit fails once it fails
because continous audit tries to remove job
even if job is not exists.
This patch set fixes it.
Change-Id: Ic461408c97d71e14c57e368f8436b26fe355fa4e
Closes-Bug: #1706857
This patch set adds WatcherJobStore class that allows to link
jobs and services.
Partially-Implements: blueprint background-jobs-ha
Change-Id: I575887ca6dae60b3b7709e6d2e2b256e09a3d824
New audit state SUSPENDED is added in this patch set. If audit
state with continuous mode is changed from ONGOING to SUSPENDED,
audit's job is removed and the audit is not executed.
If audit state changed from SUSPENDED to ONGOING in reverse,
audit is executed again periodically.
Change-Id: I32257f56a40c0352a7c24f3fb80ad95ec28dc614
Implements: blueprint suspended-audit-state
actionplan.save() will send a send_update notification.
This notification need eagerly loaded,
so we should set eager=True for actionplan.list.
Change-Id: Iafe35b9782fb0cc52ba5121c155f62c61ef70e1f
Closes-Bug: #1673679
This patch set adds support of auto-triggering of action plans.
Change-Id: I36b7dff8eab5f6ebb18f6f4e752cf4b263456293
Partially-Implements: blueprint automatic-triggering-audit
In this changeset, I implemented the following notifications:
- audit.planner.start
- audit.planner.end
- audit.planner.error
Partially Implements: blueprint audit-versioned-notifications-api
Change-Id: I29d371f8cb3fd7948c87bec97186e24a88e8fdb6
In this changeset, I implemented the sending of update notifications
whenever an audit is modified.
Change-Id: I5ccc2516ce896ae7d4ef542b133e8f052eaed602
Partially-Implements: blueprint audit-versioned-notifications-api
In this changeset, I modified all existing Watcher objects to now
rely on oslo.versionedobjects as a base.
Change-Id: I3c9b1ca6da529d128743b99020350f28926ea1a2
Partially-Implements: blueprint watcher-versioned-objects
In this changeset, I implemented the logic which cancels
any audit or action plan whose goal has been re-synced
(upon restarting the Decision Engine).
Partially Implements: blueprint efficacy-indicator
Change-Id: I95d2739eb552d4a7a02c822b11844591008f648e
This patch fixes various typos and other nits in the strategies. It
also updates some of the log messages to be a little more operator
friendly.
Change-Id: Ic9268c6d7376dad215a1a40798485b1d836ba7ae
Closes-Bug: #1604248
The dict.keys()[0] will raise a TypeError in PY3,
as dict.keys() doesn't return a list any more in PY3
but a view of list.
Change-Id: If15a153c9db9b654e761f8ad50d5d66a427efa4e
Closes-Bug: #1583419
This patch set adds implementation for CONTINUOUS type
of audit.
Change-Id: I5f4ec97b2082c8a6b3ccebe36b2a343fa4a67d19
Implements: blueprint continuously-optimization