Commit Graph

626 Commits

Author SHA1 Message Date
ChangBo Guo(gcb)
23092b6f84 Use memory mode for sqlite in db test
Config option sqlite_db is deprecated in
0a1bae9859079fb21a03716be947c5f1da6db0a2, and deprecate argumentsqlite_db in method set_defaults in
https://review.openstack.org/#/c/350945/, should use config option
connection instead. For watcher, we test database with sqlite in memory
mode [1] as below:

cfg.CONF.set_override("connection", "sqlite://",
                      group="database", enforce_type=True)

and don't use config option sqlite_db, so remove unused code.

[1]http://docs.sqlalchemy.org/en/rel_1_0/core/engines.html#sqlite

Change-Id: I9b1f995e1b7004bcfe6c5a854c2f83b24e5bfb56
2016-09-09 19:51:15 +08:00
Jenkins
414685ab53 Merge "Add documentation for Scoring Module" 2016-09-07 14:20:32 +00:00
Tomasz Kaczynski
dd924dd9d5 Add documentation for Scoring Module
This change is updating the glossary with Scoring Module terms
and adding an information page about implementing scoring engine
plugin.

Partially-Implements: blueprint scoring-module
Change-Id: I411370dcc003ed837d8ce67659ecbfef3548ee11
2016-09-07 08:13:36 +00:00
Jenkins
dd5b5428db Merge "Fix incorrect strings and formatting" 2016-09-06 10:58:16 +00:00
Michelle Mandel
3b673fe9bd Fix incorrect strings and formatting
There were a few typos and some lines of code that weren't formatted
properly. Now, the typos are fixed and the misformatted code is
corrected.

Change-Id: I6009e44f65b9be1ae9edc806618342c334b2fa92
2016-09-02 14:46:05 -04:00
Bin Zhou
c1cbd9ebf4 Modify use of assertTrue(A in B)
Developers should use assertIn(A, B) instead of assertTrue(A in B ).

TrivialFix

Change-Id: Ie169e731c800b5d77fd231f09ac7f92090287ef3
2016-09-02 12:43:56 +08:00
Jenkins
8a38c4f479 Merge "Add release notes for Newton blueprints" 0.29.0 2016-08-30 07:36:57 +00:00
Jenkins
107cc76cdb Merge "TrivialFix: Remove cfg import unused" 2016-08-29 14:44:40 +00:00
Alexandr Stavitskiy
6e8dc5297e Merge scoring base files
Merge scoring_engine.py and scoring_container.py to base.py

Change-Id: I5cada2c9f7832827c1bccfdea1b0a2138b18bfc9
Closes-Bug: #1617376
2016-08-29 14:59:47 +03:00
Antoine Cabot
7cce4b9ed4 Add release notes for Newton blueprints
Change-Id: Id643dae85b1df86796d27fa885aa7c7303d4f4d8
2016-08-29 12:56:02 +02:00
Cao Xuan Hoang
deb5cb3fc2 TrivialFix: Remove cfg import unused
This patch removes cfg import unused in
watcher/api/controllers/v1/goal.py
watcher/api/controllers/v1/strategy.py
watcher/decision_engine/cluster/history/ceilometer.py
watcher/decision_engine/model/collector/manager.py
watcher/decision_engine/strategy/selection/default.py
watcher/tests/common/test_ceilometer_helper.py
watcher/tests/decision_engine/fake_strategies.py
watcher/tests/decision_engine/strategy/selector/test_strategy_selector.py

Change-Id: I0f30a056c3efa49faed857b6d1001a2367d384ac
2016-08-29 15:01:28 +07:00
Jenkins
3ed44383ab Merge "TrivialFix: Remove logging import unused" 2016-08-29 07:48:35 +00:00
Cao Xuan Hoang
720884cd55 TrivialFix: Remove logging import unused
This patch removes logging import unused in
watcher/applier/manager.py
watcher/applier/rpcapi.py
watcher/decision_engine/goal/base.py
watcher/decision_engine/model/notification/base.py
watcher/decision_engine/model/notification/filtering.py

Change-Id: I0b967e4931223b3b7e9459fb1483ed8185a1a7a0
2016-08-29 12:46:02 +07:00
gecong1973
249cd11533 Remove unused LOG
delete unused LOG in some files

Change-Id: I38f2a91d2e6b24b14e1d46fd8e9a5f87ea2f3171
2016-08-29 10:03:33 +08:00
Jenkins
f42106ca34 Merge "Add unit tests for continuous.py" 2016-08-26 17:44:30 +00:00
Jenkins
359debb6b0 Merge "Update configuration section for notifications" 2016-08-26 17:22:29 +00:00
Jenkins
dbcab41fae Merge "Doc on how to add notification endpoints" 2016-08-26 17:22:22 +00:00
Jenkins
28ff52f8ba Merge "Notification and CDM partial update" 2016-08-26 17:01:23 +00:00
Jenkins
781eb64c6a Merge "Added start/end date params on ceilometer queries" 2016-08-26 16:29:33 +00:00
Jenkins
45a0bda1ae Merge "Fix loading of plugin configuration parameters" 2016-08-26 16:26:17 +00:00
Jenkins
190d5ae899 Merge "Remove unreachable line" 2016-08-26 16:16:44 +00:00
David TARDIVEL
e4ba59e130 Update configuration section for notifications
Watcher consumes now notications sent by Nova services.
We have to configure Nova to publish its notifications into
the dedicated Watcher notification queue.

Change-Id: I29f2fa12dfe3a7ce0b014778109a08bbe78b4679
Partially-Implements: blueprint cluster-model-objects-wrapper
2016-08-26 15:57:54 +00:00
Vincent Françoise
f238167edc Doc on how to add notification endpoints
In this changeset, I updated the CDMC plugin documentation to explain
how to implement and register new notification endpoints.

Change-Id: Ib8c014e82051647edef5c1272f63429f76673227
Partially-Implements: blueprint cluster-model-objects-wrapper
2016-08-26 17:46:50 +02:00
Vincent Françoise
77b7fae41e Notification and CDM partial update
In this changeset, I implemented the notification handling (Rx only)
system for consuming incoming notifications, more especially the Nova
ones. The notifications handlers also contain the logic which
incrementally updates the Compute model.

Change-Id: Ia036a5a2be6caa64b7f180de38821b57c624300c
Partially-implements: blueprint cluster-model-objects-wrapper
2016-08-26 17:46:48 +02:00
Jenkins
8c23c08776 Merge "Check unspecified parameters create audit" 2016-08-26 14:53:17 +00:00
Viacheslav Samarin
103f541abd Remove unreachable line
This patch set removes unreachable line from nova_helper.py

Change-Id: I0befe271cc244b73fb9f4d79cc1d04b951b67135
Closes-Bug: #1617354
2016-08-26 17:43:59 +03:00
Jenkins
5fe6281e5c Merge "Correct watcher reraising of exception" 2016-08-26 14:16:45 +00:00
Vincent Françoise
c61793811e Added start/end date params on ceilometer queries
In this changeset, I added the start_time and end_time params
to the Ceilometer helper which can drastically reduce the execution
time of the queries.

Change-Id: I39cb3eef584acfca1b50ff6ec1b65f38750802d2
2016-08-26 14:16:19 +00:00
gengchc2
ecea228c4c Correct watcher reraising of exception
When an exception was caught and rethrown, it should call 'raise'
without any arguments because it shows the place where
an exception occured initially instead of place where
the exception re-raised

Change-Id: I662583cd3cda2424d5a510cae7e815c97a51c2fe
2016-08-26 12:52:13 +00:00
jinquanni
1fafcc5ef1 Check unspecified parameters create audit
Currently, create audit with unspecified parameters will success.
This is not reasonable, we shoud return a FAILED status to
notify the admin user.

Change-Id: Ifbcb3b8d9e736607b05b1eb408ec0f41bdf58a2f
Closes-Bug: #1599879
2016-08-26 19:18:20 +08:00
David TARDIVEL
32c13d00fe Fix loading of plugin configuration parameters
When the load a plugin, we need to reload once the watcher
configuration data, in order to include the plugin parameters in
cfg.CONF data dict. To reload the conf, we just call self.conf().
But every time we call this method, cfg.CONF is cleaned, and we
lost previously loaded parameters. This generated the exception
RequiredOptError and the plugin was not correctly loaded.

To fix it, we have just to add the watcher configuration
filename as argument of self.conf().

Change-Id: Ic2384b68f6d604640127fe06893d0f808aee34b7
Closes-Bug: #1617240
2016-08-26 12:08:45 +02:00
Tomasz Kaczynski
a1cb142009 Add Scoring Module implementation
This change is adding the main logic for the scoring module,
defines entry points for the scoring engine plugins and provides
a watcher-sync tool to enable Watcher database synchronization
without needing to restart any Watcher service.

Partially-Implements: blueprint scoring-module
Change-Id: If10daae969ec27a7008af5173359992e957dcd5e
2016-08-26 07:13:39 +00:00
Jenkins
ab10201c72 Merge "Added strategy ID + Action Plan syncing" 2016-08-25 21:08:08 +00:00
Jenkins
42b45a5949 Merge "Fixed flaky tempest test" 2016-08-25 15:50:38 +00:00
licanwei
da67b246a5 Add unit tests for continuous.py
Add unit tests about functions 'execute_audit'
and 'is_audit_inactive'

Change-Id: If9eb4d95166a486a59cc1535106944243bb7eb30
Closes-Bug: #1616759
2016-08-25 16:52:58 +08:00
OpenStack Proposal Bot
6d41c23e50 Updated from global requirements
Change-Id: I4501b494acc27f9471ea0ba1cf0151242ce17002
2016-08-25 05:06:56 +00:00
Vincent Françoise
7b228348a0 Fixed flaky tempest test
Fixed the flaky test_delete_audit test which was failing if the delete
query was sent before the audit reaches an 'idle' state.

Change-Id: I244643b1f7c9b31baa5c25753e62dd3da0a53544
2016-08-24 14:45:51 +02:00
Jenkins
eb421709d9 Merge "Updated from global requirements" 2016-08-24 11:55:02 +00:00
Andreas Jaeger
e741728eb8 Remove pot files
We do not store pot files anymore in repositories,
instead they are published at
http://tarballs.openstack.org/translation-source/watcher/master/ after
each commit and thus always accurate.

Remove the outdated and obsolete file.

Change-Id: I24f18c0a62f2c5339479d07904fb2ce0a888c696
2016-08-24 08:40:53 +02:00
OpenStack Proposal Bot
35201c8358 Updated from global requirements
Change-Id: I430ed2e1a4e2c29e35f57c6362589eb0ed36465c
2016-08-24 01:40:02 +00:00
Vincent Françoise
6be758bc5a Added strategy ID + Action Plan syncing
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
2016-08-22 10:08:05 +02:00
Jenkins
5f205d5602 Merge "Fixes to get cluster data model" 2016-08-22 07:51:46 +00:00
Prashanth Hari
9450a7079b Fixes to get cluster data model
Due to the recent code refactor in the cluster data model
compute model is failing to 'get_latest_cluster_data_model'
attribute

Change-Id: Iba848db6d03cf1b682c4000ca48cf846b0ffa79b
Closes-Bug: #1614296
2016-08-19 15:44:09 -04:00
OpenStack Proposal Bot
64f45add5f Updated from global requirements
Change-Id: I1651d322933e085773210920de257572eb142089
2016-08-19 09:12:46 +00:00
Jenkins
3a804ae045 Merge "Fix double self._goal definition" 2016-08-18 17:00:13 +00:00
Jenkins
638fd557dc Merge "Scheduler of decision_engine fix" 2016-08-18 15:44:05 +00:00
Alexandr Stavitskiy
4e3593a71d Fix double self._goal definition
This patch set removes second self._goal definition.

Change-Id: I343b82e1584ab30129e6f15cc9c15cee07250497
Closes-Bug: #1614568
2016-08-18 17:53:09 +03:00
Viacheslav Samarin
01164b0790 Scheduler of decision_engine fix
This patch set renames 'OS-EXT-STS:instance_state' to 'OS-EXT-STS:vm_state'
for correct working of decision_engine scheduler.

Change-Id: I20805a079a991d5f3b8565f52d5f7280c2389bee
Closes-Bug: #1614511
2016-08-18 16:49:20 +03:00
OpenStack Proposal Bot
9933955c7d Updated from global requirements
Change-Id: Id07d8af7e1c717d52005e73bf43baa67f60e2242
2016-08-18 05:58:34 +00:00
Jenkins
efdf6c93fc Merge "Modify libvirt_opts="-d -l" to libvirtd_opts="-d -l"" 2016-08-17 06:28:26 +00:00