Compare commits

...

498 Commits
1.0.1 ... 1.6.0

Author SHA1 Message Date
Zuul
c2e16bfa96 Merge "listen to 'compute.instance.resize.confirm.end' event" 2017-12-08 03:11:54 +00:00
Zuul
13644429b7 Merge "Fix migrate action with migration_type 'cold'" 2017-12-07 13:15:28 +00:00
Zuul
b8cc506fbe Merge "Updated from global requirements" 2017-12-07 05:06:45 +00:00
licanwei
c91f6479f0 Server with PAUSE status can also live-migrate
Closes-Bug: #1728477
Change-Id: I39a2672df842b62177fd0c4dbec7b92b398cfb96
2017-12-06 02:02:44 +00:00
Hidekazu Nakamura
92572c5dec Fix migrate action with migration_type 'cold'
Migration action with migration_type 'cold' does not work.
This patch fixes nova_helper to follow Pike release python-novaclient.

Change-Id: I0637cefad68cd4b7077a5d3e6b5db5562e7f2917
Closes-Bug: #1736624
2017-12-06 09:39:30 +09:00
OpenStack Proposal Bot
a8f08065fd Updated from global requirements
Change-Id: I2171946082a8a9daf7e5edc20bfe0c8cb084768f
2017-12-05 16:58:02 +00:00
Zuul
0745d904fc Merge "Notifications Changes Multiple Global Efficacy" 2017-12-01 09:26:17 +00:00
Zuul
bc4a58d2d7 Merge "Make gnocchi as default datasource" 2017-12-01 09:08:57 +00:00
Alexander Chadin
f14795d29f Make gnocchi as default datasource
This patch set follows deprecation steps
and changes default datasource to gnocchi

Closes-Bug: #1735180
Change-Id: I3b7ec47af7707359373a424a6469d28cbf9ce177
2017-12-01 08:21:44 +00:00
Zuul
e0104074b6 Merge "Updated from global requirements" 2017-11-30 14:04:55 +00:00
Zuul
2993dea376 Merge "extend-node-status" 2017-11-29 13:35:54 +00:00
Zuul
17b6019ea9 Merge "Fix Bug Unable to get scoped data model" 2017-11-29 10:06:17 +00:00
OpenStack Proposal Bot
5969e5b52a Updated from global requirements
Change-Id: Idc1a12df6d888880ff7858cff18cc1972920204d
2017-11-29 09:26:19 +00:00
aditi
e55f3793b6 Fix Bug Unable to get scoped data model
This patch removes 'audit_scope' from __init__ of
BaseClusterDataModelCollector class, as it is a singleton class
and cannot be instantiate more than once.

A new method is defined in BaseClusterDataModelCollector in place
of property audit_scope_handler, which takes audit_scope as
argument.

Change-Id: I0664c151d71a711c118d43c180d8b0760b1c81fa
Closes-Bug: #1732849
2017-11-28 10:24:15 +00:00
suzhengwei
901c598dd7 listen to 'compute.instance.resize.confirm.end' event
In one integrated cloud env, there would be many solutions, which would
make the compute resource strongly relocated. Watcher should listen to
all the notifications which represent the compute resource changes, to
update compute CDM. If not, the compute CDM will be stale, Watcher
couldn't work steadily and harmoniously.

Change-Id: I57173f0cce0717aa36c5ff758d972d38013e3ef8
Implements:blueprint listen-all-necessary-notifications
2017-11-27 17:20:49 +08:00
aditi
e41a90d7ad Notifications Changes Multiple Global Efficacy
This patch adds notfication changes after changing the type
of global_efficacy in ActionPlan objects.

Change-Id: I1116cf1d19e4b19e19789f943a631d0400871766
Partially-Implements: blueprint multiple-global-efficacy-indicator
2017-11-27 14:47:02 +05:30
Zuul
051b4fcd06 Merge "Remove setting of version/release from releasenotes" 2017-11-22 12:15:57 +00:00
Zuul
cd045400ed Merge "Can't cancell CONTINUOUS audit" 2017-11-22 06:57:50 +00:00
Zuul
2db668af30 Merge "Add app.wsgi to target of pep8" 2017-11-20 08:35:00 +00:00
Zuul
39b1fcf07f Merge "[Doc] Fix ubuntu version in devstack installation" 2017-11-20 01:09:46 +00:00
chao liu
94babf61da Add app.wsgi to target of pep8
The app.wsgi file should be adjusted to meet pep8 standards and
apply pep8 check to app.wsgi automatically.

Change-Id: I34ec9ce56a329ede76d3d69f6e973d66350d85d1
2017-11-18 09:41:37 +00:00
Hidekazu Nakamura
a5fba7ce28 [Doc] Fix ubuntu version in devstack installation
This patch updates ubuntu version from 14.04 to 16.04
in devstack installation.

Change-Id: Icf096dd8f3fc366567f9cde329987c4f9f02ad48
2017-11-17 13:25:34 +09:00
aditi
24e01b6c98 Remove setting of version/release from releasenotes
Release notes are version independent, so remove version/release
values.
see the discussion [1] and patch [2]
[1] http://lists.openstack.org/pipermail/openstack-dev/2017-November/124480.html
[2] https://review.openstack.org/#/c/520748/

Change-Id: I2c76dc467e1b722531ba71fb589594ae9fcc88d3
2017-11-17 11:33:20 +09:00
OpenStack Proposal Bot
4007f93aac Updated from global requirements
Change-Id: I9be5c9b8b858f5d5d555da5c02337885ecfa901d
2017-11-16 11:31:33 +00:00
OpenStack Proposal Bot
77c9f88fc4 Updated from global requirements
Change-Id: Iccd6926b31e04e4a24fbd6bf68692bd840c66f7f
2017-11-13 22:00:07 +00:00
Zuul
e9b7f067c5 Merge "Migrate to Zuul v3" 2017-11-10 08:27:28 +00:00
Zuul
f8aa02c4a7 Merge "Multiple global efficacy" 2017-11-10 08:21:26 +00:00
Alexander Chadin
3595108e49 Migrate to Zuul v3
This patch does step 1 in the docs: Move Legacy Jobs to Projects.

Partial-Implements: blueprint migrate-to-zuulv3
Change-Id: I0c0713260c2dfa2ba64a5746c342db01c1bc3d75
2017-11-09 11:51:13 +03:00
Hidekazu Nakamura
d536ed248b Fix test runner config issues with os-testr 1.0.0
The os-testr 1.0.0 release had a couple of required config changes due
to it's internal usage of stestr. This commit fixes those by adding a
.stestr.conf (to remove a warning) sets the fixture env variables in
the tox.ini instead of being hidden in .testr.conf and removing the
quotes around posargs to make passing args to ostestr actually work.
Also to keep the expected dev experience stestr is used directly for
places where ostestr was called directly.

Change-Id: I785b0dc1720328b119f0978aa573ad0b89e54c75
Closes-Bug: #1731155
2017-11-09 17:31:39 +09:00
aditi
71730c0eaf Multiple global efficacy
This patch update the global efficacy for server consolidation
strategy, test cases and general format.

Change-Id: I62af1e4be415998669f938b3d587c1ccf4293419
Implements: blueprint multiple-global-efficacy-indicator
2017-11-09 14:51:17 +09:00
Vu Cong Tuan
1b4c5dfc8b Do not use “-y” for package install
According to "code conventions" [1], do not use "-y" option.
Instead, use apt-get install package, yum install package,
or zypper install package.

[1] https://docs.openstack.org/doc-contrib-guide/writing-style/
code-conventions.html

Change-Id: I174c8a0c653e322bbf951d72445b1a43251baa7e
2017-11-08 16:13:30 +07:00
Zuul
4179cfd036 Merge "check task_state in the live_migrate_instance" 2017-11-08 01:50:38 +00:00
Zuul
49550db566 Merge "Change HTTP to HTTPS" 2017-11-08 01:43:26 +00:00
Zuul
e0eba0ee7b Merge "Update doc and add release note about cdm-scoping" 2017-11-07 02:36:38 +00:00
licanwei
165853ee2c check task_state in the live_migrate_instance
If server migration fails, the while loop will not break
until retry to 0,
we can check the task_state to avoid this situation.

Closes-Bug: #1728476
Change-Id: I07e1048eb736263a261456ee78c96fee9db13cb5
2017-11-05 20:04:45 -08:00
XieYingYun
0a7152fa55 Change HTTP to HTTPS
Use https instead of http to ensure the safety without containing our
account/password information

Change-Id: I2e4f120f1d57c6c666d65a9a279eddefd112bf23
2017-11-05 20:20:46 -07:00
OpenStack Proposal Bot
6c29df11ca Updated from global requirements
Change-Id: I691bd81b1b9933211faa336b1ac49aa5a1a7bf17
2017-11-06 02:07:12 +00:00
licanwei
55bd0fd038 Can't cancell CONTINUOUS audit
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
2017-11-02 21:05:41 -07:00
suzhengwei
907cc2df16 add name for audit, update audit notifications
upgrade notifications

Change-Id: Ia8b7f36a8a2965bc8ec2243a10556592926297b2
Implements:blueprint add-name-for-audit
2017-11-01 10:39:43 +08:00
Hidekazu Nakamura
8dcac1597b Update doc and add release note about cdm-scoping
This patch updates document and add release note for cdm-scoping.

Change-Id: I8e9099aa5caf6bf17ea912e7b1a600af3b6d519d
Partially-Implements: blueprint cdm-scoping
2017-10-31 10:01:52 +09:00
Zuul
a3be1587e3 Merge "Update the useful links for Rally job" 2017-10-30 03:13:09 +00:00
Zuul
aa72f984e4 Merge "add name for audit, changes for watcher api/db" 2017-10-30 02:11:26 +00:00
caoyuan
bcd2040025 Update the useful links for Rally job
Change-Id: I1d6463701f9e3d99c261e8738ba0291c32632947
2017-10-30 00:32:50 +00:00
Zuul
f2c9dc9c32 Merge "update API ref doc for ScoringEngine" 2017-10-27 03:33:55 +00:00
Zuul
6c94c235fc Merge "Fix the strategy path of outlet_temp_control.py" 2017-10-26 02:30:20 +00:00
Zuul
7ed45e3ef1 Merge "Add cdm-scoping" 2017-10-25 13:52:10 +00:00
aditi
8722951022 update API ref doc for ScoringEngine
Change-Id: Icdfff4659d280a30768aebc0e8f161a699ffd793
Closes-Bug: #1726646
2017-10-24 14:16:19 +09:00
caoyuan
568d4e831c Fix the strategy path of outlet_temp_control.py
1. fix the path of outlet_temp_control.py
2. remove the unnecessary noqa

Change-Id: Ieb33776baeaa936faf940d9886ffed8ec30e91b3
2017-10-24 01:29:17 +00:00
Zuul
deefc857ba Merge "Optimize the link address" 2017-10-24 00:25:52 +00:00
Zuul
d33736e7f0 Merge "Imported Translations from Zanata" 2017-10-24 00:21:44 +00:00
Zuul
1b1779cc49 Merge "Fix a typo" 2017-10-24 00:21:43 +00:00
Zuul
d727bc3076 Merge "Unify the oslo_log import usage" 2017-10-24 00:21:43 +00:00
Zuul
875b7e1ca3 Merge "Optimise indentation for db client" 2017-10-24 00:21:42 +00:00
Zuul
c7f8755f9c Merge "Correct the schema format" 2017-10-24 00:20:55 +00:00
zhengwei6082
0472715e0c Optimize the link address
Use https instead of http to ensure the safety without containing our
account/password information

Change-Id: I16bdf6067fba4ea841071100d68edae7750946de
2017-10-23 07:03:41 +00:00
OpenStack Proposal Bot
2482e82548 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I73cd252d637f890ed4ba1ea9abe06d5c47917a86
2017-10-23 06:17:23 +00:00
Zuul
e9c420467e Merge "Optimize check_migrated in cinder_helper.py" 2017-10-23 03:53:17 +00:00
Zuul
2d5db7082b Merge "Optimize live_migrate_instance" 2017-10-23 03:53:17 +00:00
caoyuan
4a3a50435a Fix a typo
Update the "peformance" to "performance"

Change-Id: Ief94893db2a3d6d83d865cfe2aa45f524309ff8d
2017-10-21 14:54:16 +08:00
caoyuan
05b57fee7a Unify the oslo_log import usage
In watcher project, some py file use "from oslo_log import log as logging"
for import, but more use "from oslo_log import log"
like https://github.com/openstack/watcher/blob/master/watcher/decision_engine/strategy/strategies/dummy_strategy.py#L19
this patch to unify it.

Change-Id: I9c667bb202bebc7942d1af5ce438375285c2e2ba
2017-10-21 06:32:59 +00:00
caoyuan
3729e39552 Optimise indentation for db client
Optimise indentation for db client, just like the others:
https://github.com/openstack/watcher/blob/master/watcher/conf/nova_client.py#L22

Change-Id: Icfbd4f26ce048fe3c3db430d95795fb0e58b7161
2017-10-21 13:55:47 +08:00
caoyuan
91911c8284 Correct the schema format
refer to https://github.com/openstack/watcher/blob/master/watcher/applier/actions/migration.py#L46

Change-Id: I2da8585ce978034fc9a79c2a0cf7bfb6eed487e2
2017-10-21 13:03:01 +08:00
suzhengwei
d7d56cbd79 add name for audit, changes for watcher api/db
Change-Id: Ibe04f5375d741d15999fde6faf767f15311c6351
Implements:blueprint add-name-for-audit
2017-10-20 14:17:20 +08:00
caoyuan
84fb7423f1 Update the nova api_version default value to 2.53
the api_version has been update, so the doc should change the default
value

refer to https://github.com/openstack/watcher/blob/master/watcher/conf/nova_client.py#L26

Change-Id: I9717294d43203315d0593a4fee8c2ff2caf6f0d0
2017-10-17 14:40:59 +08:00
caoyuan
ee5b01d33b Correct the instance migration link
1. Update the instance migration link
2. remove the unnecessary install-guide link

configure and install Ceilometer by
https://docs.openstack.org/ceilometer/latest is enough
remove the other link.

Change-Id: I2bf408de1023750a3d1f2c9e25293649d99ac428
2017-10-17 10:07:55 +08:00
Zuul
b35feb5432 Merge "optimize update_audit_state" 2017-10-17 01:19:31 +00:00
licanwei
d722b62b97 Optimize check_migrated in cinder_helper.py
There are more than one 'migrating' status in the volume migration.
Others include starting, completing and so on.
So we should check the final status 'success' and 'error'.

Change-Id: I8ee9330aa32ec4516f2bf9e046ea68a72bc8a53d
2017-10-16 00:55:55 -07:00
licanwei
bf713ac7e1 Optimize live_migrate_instance
https://github.com/openstack/python-novaclient/blob/
master/novaclient/v2/servers.py#L468
From nova api version 2.25(Mitaka release), the default value of
block_migration is None which is mapped to 'auto'.
So we can remove 'block_migration' from live_migrate_instance.

Change-Id: I75a581d3146824b1146e2acf5a7fbe4f8368a4e8
2017-10-15 20:22:13 -07:00
Jenkins
8343f4bf46 Merge "Add documentation about saving energy strategy" 2017-10-13 06:51:13 +00:00
Jenkins
cd3f792eef Merge "Invoke version_string in watcher/version.py directly" 2017-10-13 04:51:43 +00:00
Jenkins
7f7f7a9fd2 Merge "Add saving energy strategy description" 2017-10-13 04:50:00 +00:00
Jenkins
d5b778b730 Merge "Fix _build_instance_node for building Compute CDM" 2017-10-13 04:05:56 +00:00
Jenkins
62a902df7c Merge "Fix the telemetry-measurements hyperlink for strategies" 2017-10-13 02:52:06 +00:00
Jenkins
5b6f65630d Merge "Update OpenStack Installation Tutorial to pike" 2017-10-13 02:23:52 +00:00
OpenStack Proposal Bot
e5031ef04a Updated from global requirements
Change-Id: I973ef2867d95fe4f70a43c9015f7571188dc13cd
2017-10-12 22:07:21 +00:00
Jenkins
ab2408ea67 Merge "writing convention: do not use “-y” for package install" 2017-10-12 07:04:58 +00:00
Yumeng_Bao
4c0d2ab4b2 Add saving energy strategy description
Change-Id: Id99d48bd2ca2a2539366d8dc1f7627d7eb472a10
2017-10-12 11:39:02 +08:00
Yumeng_Bao
cf8d7bb2f4 Add documentation about saving energy strategy
Change-Id: I9746239c83ea7bff364ad6939e4174748be2d299
Closes-Bug: #1713402
2017-10-11 14:24:30 +08:00
Jenkins
b3d60cb13d Merge "Optimize the import format by pep8" 2017-10-10 14:33:45 +00:00
Jenkins
ffdc3b554d Merge "Remove explicitly enable neutron" 2017-10-10 13:21:35 +00:00
Jenkins
9933d61065 Merge "Fix Action 'change_node_power_state' FAILED" 2017-10-10 13:19:15 +00:00
Jenkins
b4bc1599e6 Merge "Fix TypeError in function chunkify" 2017-10-10 13:17:26 +00:00
Jenkins
280188a762 Merge "Remove installation guide for openSUSE and SLES" 2017-10-10 13:14:41 +00:00
Jenkins
3942f44e56 Merge "Notification Cancel Action Plan" 2017-10-10 13:12:02 +00:00
Jenkins
6208caba0c Merge "Fix action plan state change when action failed" 2017-10-10 12:06:07 +00:00
Jenkins
f3b3e82313 Merge "Remove the unnecessary word" 2017-10-10 11:02:37 +00:00
zhuzeyu
be69ebd8bd Invoke version_string in watcher/version.py directly
There is already define version_string in version.py
So we don't need generate version in other files, just call it.

Change-Id: I7d8294860523eedad92e213ad00569829e120c39
2017-10-10 11:00:26 +00:00
Hidekazu Nakamura
7d33bf8813 Fix _build_instance_node for building Compute CDM
As of Nova API microversion 2.47, response of GET /servers/detail has flavor
which contains a subset of the actual flavor information used to create the
server instance, represented as a nested dictionary.

Since current watcher nova default api version is 2.53(Pike), This patch
follows the API response change.

Change-Id: Ia575950f0702afa1d093f03ca8ddedd3c410b7de
Closes-Bug: #1722462
2017-10-10 17:21:05 +09:00
zhengwei6082
b3fa8a0f86 writing convention: do not use “-y” for package install
Adhering to coding conventions. Refer to ``Code conventions`` at
https://docs.openstack.org/contributor-guide/ for details.

Change-Id: Ic8b166e17ab0d1cbbf2bb6b831f5e53cae6797ba
2017-10-10 06:13:52 +00:00
caoyuan
9d3cc28d2d Update OpenStack Installation Tutorial to pike
Since the pike is release, OpenStack Installation Tutorial should
update to pike

Change-Id: I565f721cb2acbc692c790707ef6b0d167d6a7b09
2017-10-10 10:37:45 +08:00
aditi
eed2e128b0 Remove explicitly enable neutron
This patch removes, explicitly enabled neutron from local.conf
as devstack now default uses neutron

Change-Id: Icf6bd944dd2262ff23cbcceb762a9ba80f471dbb
2017-10-10 01:59:46 +00:00
caoyuan
7091fe435f Fix the telemetry-measurements hyperlink for strategies
Change-Id: Ie38950967665bdc81eb75f54bc1b3b0a4630fe65
2017-10-09 10:41:54 +08:00
licanwei
7f9b562bbd optimize update_audit_state
save state only if the state is different with audit.state

Change-Id: Ida5156f2e63be55e8dd7de452965270c007ab4ab
2017-10-07 00:59:42 -07:00
caoyuan
f445fc451e Optimize the import format by pep8
Change-Id: Ic96759df51f5572fb6047df4b38bb411ecba8e20
2017-10-05 22:34:13 +08:00
Jenkins
fa7749ac8f Merge "Use Property setters" 2017-10-05 04:21:05 +00:00
Zuul
e6c06c1bdf Merge "Add exception log when migrate action failed" 2017-10-03 17:06:20 +00:00
caoyuan
f461b8c567 Remove the unnecessary word
Change-Id: I7f76f89ae17ffdacde421509dda29b7b7d3f5a4a
2017-10-03 21:06:27 +08:00
LiXiangyu
c717be12a6 Fix TypeError in function chunkify
This patch fixes TypeError of range() in function chunkify, as
range() integer step argument expected, but got str.

Change-Id: I2acde859e014baa4c4c59caa6f4ea938c7c4c3bf
2017-10-02 12:25:20 +00:00
Hidekazu Nakamura
5814914aef Fix action plan state change when action failed
Since default workflow engine action container do_execute method
does not raise exception when action failed, workflow engine action
container execute method never raise exception and
action plan state becomes always SUCCEEDED.

This patch fixes default workflow engine action container do_execute
method to raise exception when action does not return True.

Change-Id: I7eeef69dbdfb5d40e3cf0b1004cbfe199a16bf7b
Closes-Bug: #1719793
2017-10-02 07:09:17 +00:00
Hidekazu Nakamura
fb3c2355a6 Remove installation guide for openSUSE and SLES
Since packages for openSUSE and SLES are not provided,
this patch removes installation guide for openSUSE and SLES.

Change-Id: Ic15d8c4b262e935c7acaef41e18960d0b259d5c9
Closes-Bug: #1715032
2017-10-02 13:52:29 +09:00
aditi
d4e6e82dd2 Notification Cancel Action Plan
This patch adds Notifications for cancel action plan
operation.

Change-Id: I5a89a80729349e3db43ca35ff9fbe8579e86b3b1
Implements: blueprint notifications-actionplan-cancel
2017-09-29 14:44:30 +09:00
Hidekazu Nakamura
816765374d Fix migrate action failure
disk_over_commit flag was removed in Nova API microversion 2.25(Mitaka).

Since current watcher nova default api version is 2.53(Pike),
this patch removes disk_over_commit flag.

Change-Id: Ib141505b9e8cb41997b29c1762e387b1f84f5143
Closes-Bug: #1720054
2017-09-28 14:06:07 +09:00
Hidekazu Nakamura
35e502f666 Add exception log when migrate action failed
As of now we can not know what was happend when migrate action
failed critically.
This patch adds exception log when migrate action failed critically.

Change-Id: I54d0bc54ee1df6f13754771775c58255f53f5008
2017-09-28 11:56:29 +09:00
Jenkins
ee36bb8180 Merge "[Doc] Fix host option" 2017-09-28 02:06:09 +00:00
Hidekazu Nakamura
51b3a15c90 Add cdm-scoping
This patch implements cdm-scoping.
Scoping yaml file is the following:

- compute:
  - availability_zones:
    - name: nova
  - host_aggregates:
    - id: 1
    - name: agg
  - exclude:
    - compute_nodes:
      - name: w012

Change-Id: I44e00218e90c5b08b397b2a9d7fed7c195f6dc55
Partially-Implements: blueprint cdm-scoping
2017-09-27 17:39:24 +09:00
Jenkins
0213bee63b Merge "Fix Watcher DB schema creation" 2017-09-27 08:36:31 +00:00
Alexander Chadin
f516a9c3b9 [Doc] Fix host option
Change-Id: I599856d2d02396f02f91ac4a607520ff60d7b033
2017-09-27 08:10:44 +00:00
aditi
8e89d5489c Use Property setters
At various places in watcher code, we are using property getters
to set property, in this way the property setters defined are
never used, this patch fixes to use property setters to set
property.

Change-Id: Idb274887f383523cea39277b166ec9b46ebcda85
2017-09-27 10:43:43 +09:00
Jenkins
773b20a05f Merge "cleanup test-requirements" 2017-09-26 00:09:48 +00:00
Jenkins
03d6580819 Merge "Update the description for controller node" 2017-09-25 11:08:48 +00:00
Jenkins
afa73238c4 Merge "Update the "IAAS" to "IaaS"" 2017-09-25 10:54:50 +00:00
caoyuan
2467780f9d Update the description for controller node
1. change the controller node description to link
2. correct the link for compute node

Change-Id: Idfdde7f01c38a26dc4962e94431a760a0ed51f82
2017-09-25 03:21:44 +00:00
OpenStack Proposal Bot
25854aabd8 Updated from global requirements
Change-Id: I86b2ed25f98f022597d58335461efc9e0ff61b26
2017-09-24 12:31:19 +00:00
melissaml
e4f4588e69 cleanup test-requirements
python-subunit is not used directly anywhere
and it is dependency of both testrepository
and os-testr
(probably was used by some tox wrapper script before)

Change-Id: I89279430554bc522817c4e2685afef0d95c641dd
2017-09-24 04:40:32 +08:00
caoyuan
1465aa0c5f Update the "IAAS" to "IaaS"
Infrastructure-as-a-Service should short for IaaS

Change-Id: I845fed0c4a1f073dbdea1e8f0e9cdc1655aa3622
2017-09-21 16:38:30 +08:00
caoyuan
e6e0b3dbaa Correct the link for watcher cli
Change-Id: Ic844804278af3abdf5bbb05ea5ef9a1c630da628
2017-09-20 22:17:18 +08:00
Jenkins
d8274e062e Merge "Update the documentation link for doc migration" 2017-09-19 00:06:20 +00:00
lingyongxu
28b9766693 Update the documentation link for doc migration
This patch is proposed according to the Direction 10 of doc
migration(https://etherpad.openstack.org/p/doc-migration-tracking).

Change-Id: I4eb594115e350e28f9136f7003692a1ec0abfcf6
2017-09-18 09:19:33 +00:00
suzhengwei
74bc31e562 extend-node-status
add 'disabled_reason' filed into 'ComputeNode' resource, to distinguish
which nodes are disabled by Watcher and which are not by Watcher.

Implements:blueprint extend-node-status

Change-Id: I7175f14870834a4582e45309529d7e8d9fbb2e6f
2017-09-18 14:27:58 +08:00
OpenStack Proposal Bot
998e86f6c7 Updated from global requirements
Change-Id: I464b3573c2dbab3d97efbec0280298b0331a3cef
2017-09-16 23:26:49 +00:00
Alexander Chadin
a5e7fd90c2 Fix Watcher DB schema creation
This patch set replaces create_schema with upgrade to fix
apscheduler creation issue. It also fixes pep8 warnings to
d09a5945e4a0_add_action_description_table.py

Change-Id: Ica842d585ee3a9cd67e45eb1d7bb1916573d7c9c
2017-09-15 15:30:38 +03:00
Jenkins
a99a9ae69e Merge "Utils: fix usage of strtime" 2017-09-14 07:28:24 +00:00
licanwei
6e6e5907ee Fix Action 'change_node_power_state' FAILED
The return value of ironic_client.node.set_power_state is None, so it's
useless to return the result.
We should check the node state until it's changed or timeout.

Change-Id: I31f75a2c4a721ce4481e6ae7fb83d154a443dad9
Closes-Bug: #1713655
2017-09-13 23:59:35 -07:00
Jenkins
c887499b4d Merge "Fix incorrect config section name of configure doc" 2017-09-14 02:47:17 +00:00
Jenkins
58e4bf2727 Merge "Remove redundant right parenthesis" 2017-09-14 02:44:43 +00:00
OpenStack Proposal Bot
1df395d31d Updated from global requirements
Change-Id: I52665af336d0a0c765d034368a554005505cf30a
2017-09-14 00:11:17 +00:00
Jenkins
f811c8af48 Merge "Remove the unused rootwrap config" 2017-09-13 15:50:59 +00:00
Jenkins
e447393f18 Merge "iso8601.is8601.Utc No Longer Exists" 2017-09-13 13:13:59 +00:00
gaozx
a25be6498c Fix incorrect config section name of configure doc
Change-Id: I3d1e602f3a4beace516c56979b3b21b5683c1b0a
2017-09-13 16:38:50 +08:00
Jenkins
8e372ee153 Merge "Update the documentation link for doc migration" 2017-09-13 07:41:06 +00:00
aditi
7bc984b84a Fix Gate Failure
This Patch fixes gate failure, encountered in recent version
of oslo_messaging.

Change-Id: I6d8ab882a7c157dcf4f78c805a4ce2d9b1fa3f14
Closes-Bug: #1716476
2017-09-12 16:30:22 +09:00
gaozx
eeee32ad36 Remove redundant right parenthesis
Change-Id: Ibdb295d8d5ff8e49b0bebdb71c9c856f49c3881e
2017-09-11 09:48:42 +08:00
chenghuiyu
3a7fc7a8e5 Utils: fix usage of strtime
As oslo_utils.timeutils.strtime() is deprecated in
version '1.6', and will be removed in a future version.

For more informations:
https://docs.openstack.org/oslo.utils/latest/reference/timeutils.html

Change-Id: I1aca257fbe8b08c3478c5da9639835033b19144a
Partial-Bug: #1715325
2017-09-07 16:56:01 +08:00
zhengwei6082
63697d5a6e Update the documentation link for doc migration
This patch is proposed according to the direction 10 of doc
migration(https://etherpad.openstack.org/p/doc-migration-tracking).

Change-Id: Idf2f369fb68c19efa54a06731bb33dc6fa949790
2017-09-07 09:56:40 +08:00
Sampath Priyankara
887fa746ae iso8601.is8601.Utc No Longer Exists
iso8601.UTC is correct datetime UTC field object.
iso8601 >= 0.1.12 includes only iso8601.UTC for python3
while both UTC and Utc() for python2. Less then 0.1.12
included both UTC and Utc() for both python2/3.

Change-Id: I0f8796fba6725eea013b3f8d9ad33c10a402c524
Closes-Bug: #1715486
2017-09-07 10:42:05 +09:00
Jenkins
e74095da1f Merge "Remove unused efficacy indicators" 2017-09-06 09:50:55 +00:00
zhurong
65c7cd0e02 Remove the unused rootwrap config
Watcher doesn't use rootwrap, but have the rootwrap config.
So remove the unused rootwrap config.

Change-Id: Icc32fc958ca8deb08d7b0e5404cbbe19b3ae98c7
2017-09-06 14:46:09 +08:00
Hidekazu Nakamura
5df54ea3fb Remove unused efficacy indicators
AverageCpuLoad and MigrationEfficacy efficacy indicators are not used.
This patch removes unused indicators.

Change-Id: I2b21defd442c135d26f8fd45f6faf9f67c770bde
2017-09-06 12:05:25 +09:00
Yaguo Zhou
51dba60e01 Replace DbMigrationError with DBMigrationError
because DbMigrationError is deprecated

Change-Id: I75ef338d2e22924997804632d26ae3588c4f719b
2017-09-05 23:31:05 +08:00
Jenkins
a9f33467fb Merge "Replace default gnocchi endpoint type" 2017-09-05 10:48:43 +00:00
Jenkins
4640d88adf Merge "Fix DEFAULT_SCHEMA to validate host_aggreates" 2017-09-05 08:45:35 +00:00
zhengwei6082
154aca3948 Replace default gnocchi endpoint type
The default gnocchi endpoint type is publicURL in gnocchiclient.
This patch replaces default gnocchi endpoint type from
internalURL to publicURL
see https://github.com/openstack/keystoneauth/blob/master/keystoneauth1/adapter.py#L347-L351

Change-Id: I0ba2bde46de3025964affe23ef16cce9e5b4670f
2017-09-05 02:11:42 +00:00
Jenkins
fa7afc89ab Merge "Updated from global requirements" 2017-09-04 08:30:54 +00:00
Jenkins
790548fff0 Merge "Modify display_name in strategy documentation" 2017-09-04 08:28:21 +00:00
Hidekazu Nakamura
a2fa13c8ff Fix gnocchiclient creation
Gnocchiclient uses keystoneauth1.adapter so that adapter_options
need to be given.
This patch fixes gnocchiclient creation.

Change-Id: I6b5d8ee775929f4b3fd30be3321b378d19085547
Closes-Bug: #1714871
2017-09-04 14:52:11 +09:00
Hidekazu Nakamura
4c3c84dee9 Fix DEFAULT_SCHEMA to validate host_aggreates
Audit scope JSON schema should restrict key of host_aggregates
to "id" or "name", but that is not working now.
This patch fixes DEFAULT_SCHEMA to validate host_aggregates.

Change-Id: Iea42da41d61435780e247736599a56c026f47914
Closes-Bug: #1714448
2017-09-04 09:50:49 +09:00
OpenStack Proposal Bot
8f585c3def Updated from global requirements
Change-Id: If2d709b80f1783a5b14c9eda4d15da13c9ba5234
2017-09-02 12:15:38 +00:00
Jenkins
c9a43d8da4 Merge "Update default Nova API version to 2.53(Pike)" 2017-09-02 09:00:07 +00:00
Jenkins
2ea7d61ac8 Merge "Restrict existing strategies to their default scope" 2017-09-02 09:00:02 +00:00
Yumeng_Bao
bbfd6711fc Modify display_name in strategy documentation
Display_name in documentation of each strategy should be like[1].
[1]:https://github.com/openstack/watcher/blob/master/watcher/decision_engine/strategy/strategies/workload_balance.py#L143

Change-Id: I31b16dbb81d824e0189fcf96ea7f6e57a289e59a
2017-09-01 14:48:23 +08:00
shangxiaobj
162aaa75ee [Trivialfix]Fix typos in watcher
Fix the typos in watcher.

Change-Id: I3ab77e2a1f862d3790065de4a6ff6c3ef42f226d
2017-08-31 20:47:57 -07:00
suzhengwei
4cb2b45e3a Restrict existing strategies to their default scope
Diffrent stratege has diffrent default scope, restrict them to their
default scope will avoid usage problems.
1)workload_balancing/thermal_optimization/airflow_optimization goals
  react on enabled nodes, so restrict default scope to compute nodes
  with up state and enabled status.
2)server_consolidation goal react on enabled or disabled nodes, So
  restrict default scope to compute nodes with up state and
  enabled/disabled status.

Change-Id: I7437dee699ee2d3dd227a047196d4d8db811b81e
Closes-Bug: #1714002
2017-09-01 11:21:35 +08:00
Jenkins
50935af15f Merge "Fix to use . to source script files" 2017-09-01 01:31:39 +00:00
Hidekazu Nakamura
cf92ece936 Update default Nova API version to 2.53(Pike)
Services are now identified by uuid instead of database id to ensure
uniqueness across cells.
GET /os-services returns a uuid in the id field of the response
from API microversion 2.53(maximum in Pike)

This patch set updates default Nova API version to 2.53.

Change-Id: Ib9fefb794eda3c9e75c6a2f5cfdb0e682b8955f3
Closes-Bug: #1709544
2017-08-30 14:39:31 +09:00
zhengwei6082
b7c4a0467c Fix to use . to source script files
Adhering to coding conventions. Refer to ``Code conventions`` at
https://docs.openstack.org/contributor-guide/ for details.

Change-Id: I54b93214c0e718465a0ea4ebe063061ef7d6e4b2
2017-08-29 18:01:09 +08:00
Jenkins
c12f132699 Merge "Remove unnecessary dict.keys() method calls (api)" 2017-08-29 06:30:49 +00:00
melissaml
0329dafec9 Fix to use "." to source script files
Adhering to coding conventions. Refer to ``Code conventions`` at
https://docs.openstack.org/contributor-guide/ for details.

Change-Id: I23ff70c9caefc870b3cc9d61cd8c18b534f2ffaf
2017-08-29 02:32:28 +08:00
zhengwei6082
e73ead4807 Update the documentation link for doc migration
Change-Id: If429e5023a252d9b86b227488f73cac863b3c658
2017-08-25 16:58:31 +08:00
Jenkins
cb90f60cc1 Merge "Updated from global requirements" 2017-08-25 06:23:39 +00:00
Jenkins
d7994a2466 Merge "Fix KeyError exception" 2017-08-24 12:40:32 +00:00
OpenStack Proposal Bot
62822fa933 Updated from global requirements
Change-Id: I31aaf37bf1ea73c26d9578abe167b43a24bb6c96
2017-08-24 11:51:24 +00:00
Jenkins
3f0ff1ed7e Merge "Updated from global requirements" 2017-08-24 10:09:43 +00:00
Jenkins
8e3b5c90a6 Merge "Remove watcher_tempest_plugin" 2017-08-24 10:09:24 +00:00
OpenStack Proposal Bot
1c5e254124 Updated from global requirements
Change-Id: I48a42877f8157873f4ea376c72d170d978d5e090
2017-08-24 06:03:14 +00:00
Viktor Varga
39e200e5eb Remove unnecessary dict.keys() method calls (api)
Since iter(dict) is equivalent to iter(dict.keys()), it is unnecessary
to call the keys() method of a dict, the dictionary itself is enough
to be referenced. The shorter form is also considered to be more
Pythonic.

This patch removes the unnecessary dict.keys() method calls in api.
This is a part of a larger patch series that removes dict.keys()
method calls.

TrivialFix

Change-Id: I29000f1f05b90d70109fa01393e97e1ebf450c63
2017-08-23 12:51:54 +02:00
Jenkins
2650b89fe5 Merge "Update the documention for doc migration" 2017-08-22 10:10:33 +00:00
zhengwei6082
d5bcd37478 Update the documention for doc migration
Change-Id: I22dc18e6f2f7471f5c804d4d19c631f81a6e196b
2017-08-22 09:06:06 +00:00
Alexander Chadin
0c4b439c5e Remove watcher_tempest_plugin
In accordance with Queens global goal[1], this patch set
removes watcher tempest plugin from watcher repository since
it is stored as independent repository[2]. Jenkins job
gate-watcher-dsvm-multinode-ubuntu-xenial-nv has been modified,
it uses watcher-tempest-plugin repo now.

[1]: https://governance.openstack.org/tc/goals/queens/split-tempest-plugins.html
[2]: http://git.openstack.org/cgit/openstack/watcher-tempest-plugin/

Change-Id: I4d1207fbd73ee2519a6d40342f5fd3c5d3ee8bc7
2017-08-21 17:41:56 +03:00
OpenStack Proposal Bot
0e43504e44 Updated from global requirements
Change-Id: Idd00808c17ecbca5925f91ea2f1257d097af7892
2017-08-18 11:45:04 +00:00
licanwei
322843b21c Fix KeyError exception
During the strategy sync process,
if goal_id can't be found in the goals table,
will throw a KeyError exception.

Change-Id: I62800ac5c69f4f5c7820908f2e777094a51a5541
Closes-Bug: #1711086
2017-08-17 04:25:53 -07:00
Jenkins
1b413f5536 Merge "Remove pbr warnerrors" 2017-08-17 03:07:46 +00:00
Alexander Chadin
f76a628d1f Remove pbr warnerrors
This change removes the now unused "warnerrors" setting,
which is replaced by "warning-is-error" in sphinx
releases >= 1.5 [1].

[1] http://lists.openstack.org/pipermail/openstack-dev/2017-March/113085.html

Change-Id: I32f078169668be08737e47cd15edbdfba42904dc
2017-08-16 11:54:24 +03:00
Jenkins
3e6ea71cbc Merge "Adjust the action state judgment logic" 2017-08-15 09:10:53 +00:00
Jenkins
e5c3df0c2f Merge "workload balance base on cpu or ram util" 2017-08-15 08:37:58 +00:00
Jenkins
6005d6ebdd Merge "Fix gnocchi repository URL in local.conf.controller" 2017-08-14 09:14:54 +00:00
licanwei
965af1b6fd Adjust the action state judgment logic
Only when True is returned, the action state is set to SUCCEEDED
some actions(such as migrate) will return None if exception raised

Change-Id: I52e7a1ffb68f54594f2b00d9843e8e0a4c985667
2017-08-14 02:12:35 -07:00
Jenkins
daf428ad69 Merge "Removed unnecessary setUp calls in tests" 2017-08-11 09:15:01 +00:00
OpenStack Release Bot
ab64dab646 Update reno for stable/pike
Change-Id: I1c1c855b80ad10e343d1c34e17ed11d8255e9fea
2017-08-11 01:09:58 +00:00
Jenkins
eaa09a4cfc Merge "Fix failure to load storage plugin" 2017-08-10 12:41:52 +00:00
suzhengwei
5c86a54d20 workload balance base on cpu or ram util
By the input parameter "metrics", it makes decision to migrate a VM
base on cpu or memory utilization.

Change-Id: I35cce3495c8dacad64ea6c6ee71082a85e9e0a83
2017-08-09 07:04:10 +00:00
Jenkins
e78f2d073f Merge "[Doc] Fix db creation" 2017-08-09 06:26:57 +00:00
Jenkins
47004b7c67 Merge "change ram util metric" 2017-08-09 06:26:48 +00:00
Jenkins
9ecd22f4c8 Merge "Fix exception.ComputeNodeNotFound" 2017-08-08 08:03:28 +00:00
Jenkins
daee2336a4 Merge "get_config_opts method was overwritten" 2017-08-08 01:05:56 +00:00
Jenkins
893b730a44 Merge "Replace map/filter lambda with comprehensions" 2017-08-08 00:39:51 +00:00
Alexander Chadin
d5b6e0a54f [Doc] Fix db creation
This patch set fixes command to create db schema.

Closes-Bug: #1709048
Change-Id: I1214313307fe0375d42e1a22562cd16ae867795d
2017-08-07 15:02:41 +00:00
Fanis Kalimullin
13b89c8dd2 get_config_opts method was overwritten
outlet_temperature strategy relies on a datasource config parameter,
which can be either "ceilometer" or "gnocchi". This patch overrides
get_config_opts method of base class to allow specify datasource.

Change-Id: I551401039e26816568a04c7f2151d5b3c7ed269a
Closes-Bug: #1709024
2017-08-07 11:05:19 +00:00
Jenkins
7a300832b2 Merge "Fix compute CDM to include disabled compute node" 2017-08-07 10:23:46 +00:00
Viktor Varga
d218e6f107 Replace map/filter lambda with comprehensions
List comprehensions and generator expressions are considered to be more
Pythonic (and usually more readable) than map and filter with lambda.
This patch replaces four usages of [map|filter](lambda ...) with the
appropriate list comprehension or generator expression.

TrivialFix

Change-Id: Ifda9030bb8aa196cb7a5977a57ef46dfefd70fa6
2017-08-07 13:22:40 +03:00
suzhengwei
d2f70f9d6f change ram util metric
Metric 'memory.usage' depends on balloon driver,
and shows the memory usage inside guest-os,
while 'memory.resident' represents volume of RAM
used by the instance on the physical machine
So, it is more reasonable to use 'memory.resident'
when calculating node utilization
by gathering instances utilization of the node.

Change-Id: I12dff5176bcf6cb103aa44cafd54f9ecd7170864
2017-08-07 16:04:19 +08:00
Jenkins
4951854f76 Merge "Change exception class from monascaclient" 2017-08-07 08:02:22 +00:00
Jenkins
ffbd263888 Merge "[Doc] Update software version" 2017-08-07 07:41:02 +00:00
Hidekazu Nakamura
985c6c49f9 Fix failure to load storage plugin
Watcher fails to load storage plugin in case there is no installed
Cinder in OpenStack services.

This patch set adds collector_plugins parameter under collector
section in watcher.conf. If plugin name is in collector_plugins,
The plugin is loaded.

Change-Id: Ie3c3543216c925d49b772bf5fe3773ca7d5ae437
Closes-Bug: #1707603
2017-08-07 16:40:40 +09:00
Jenkins
adac2c0c16 Merge "Fix ironic client input parameter" 2017-08-07 07:39:53 +00:00
Jenkins
f700ca4e0f Merge "Fix incorrect action status in notifications" 2017-08-07 07:21:08 +00:00
licanwei
5b741b2a4d Fix exception.ComputeNodeNotFound
compute_model.get_node_by_uuid(node_uuid) will raise a exception
when the compute node isn't in the compute model.

Closes-Bug: #1709004

Change-Id: I667a9dbfcf67f9f895976aadd5300bbea2ffe6f0
2017-08-06 23:16:16 -07:00
OpenStack Proposal Bot
382f641b22 Updated from global requirements
Change-Id: Ie647221a3ab055e7b150d65ffb9287b44ef834cb
2017-08-07 00:56:18 +00:00
Tomasz Trębski
5da5db8b56 Change exception class from monascaclient
monascaclient was recently migrated to
use 'osc' library. Due to that, exception
classes has been changed. This commit adjusts
the exception class to recently released
monascaclient==1.7.0

Depends-On: Ie647221a3ab055e7b150d65ffb9287b44ef834cb
Change-Id: Icfef345c4269ac4cb682049f22a43fdab3d39845
2017-08-04 08:55:10 +00:00
Hidekazu Nakamura
5cc4716a95 Fix gnocchi repository URL in local.conf.controller
This patch set updates gnocchi repository URL in local.conf.controller
bacause it moved from under openstack to their own repository.

Change-Id: I53c6efcb40b26f83bc1867564b9067ae5f50938d
2017-08-04 09:23:02 +09:00
Jenkins
c4888fee63 Merge "Update the documention for doc migration" 2017-08-03 03:21:24 +00:00
Jenkins
76f85591ea Merge "[Doc] Add Configure Cinder Notifications" 2017-08-02 10:25:13 +00:00
Jenkins
b006cadd22 Merge "Ignore autogenerated sample config file" 2017-08-02 10:23:15 +00:00
Jenkins
1fd2053001 Merge "[Doc] Add cinder to architecture diagram" 2017-08-02 10:22:12 +00:00
Jenkins
6a920fd307 Merge "Fix show db version in README" 2017-08-02 08:20:36 +00:00
Jenkins
514eeb75ef Merge "Update State diagram of Action Plan" 2017-08-02 07:08:52 +00:00
licanwei
b43633fa6d Fix ironic client input parameter
The correct parameter is 'os_endpoint_type'

Change-Id: I80b03af8c55ec1d89ff1fbdd9894115b819ccde4
2017-08-01 22:35:01 -07:00
licanwei
d5a7d7674c Fix show db version in README
watcher-db-manage version: Print the current version

Change-Id: Ie08eb682879b2c071f724a6847094650047bde34
2017-08-01 21:54:48 -07:00
Gábor Antal
b532355232 Removed unnecessary setUp calls in tests
TrivialFix

Change-Id: I057d03466b058a42be8ec57dbc42cbd67b75cc3c
2017-08-01 10:50:34 +02:00
Jenkins
bce87b3d05 Merge "Modification of statistic_aggregation method" 2017-08-01 08:12:33 +00:00
Hidekazu Nakamura
783627626c Fix compute CDM to include disabled compute node
Currently compute CDM excludes disabled compute node.
This patch set fixes compute CDM to include disabled compute node.

Change-Id: I8236bb73e0d9bb242251c2abfb59ad5693087afa
Closes-Bug: #1685787
2017-08-01 16:48:47 +09:00
aditi
3043e57066 Update State diagram of Action Plan
This patch updates the state machine diagram for action plan, It
includes new state "cancelling" which is introduced by actionplan
cancel operation

Change-Id: I0af59f2164922c56d59fbad8018e2aecfef97098
2017-08-01 04:49:14 +00:00
Jenkins
be8b163a62 Merge "Added Actuator Strategy" 2017-08-01 00:30:05 +00:00
mergalievibragim
4f38595e4e Modification of statistic_aggregation method
In this patch feching resource_id by resource's original_id was added to
statistic_aggregation method.

Closes-Bug: #1707653 
Change-Id: I70b9346146f810e2236ccdb31de4c3fedf200568
2017-07-31 14:03:18 +00:00
aditi
30def6f35b Fix incorrect action status in notifications
This patch fixes incorrect action status in action execution
notification.

Change-Id: I1859f6183e2b4f8f380b8c9a13e3e0b7feb4b8e2
Closes-Bug: #1706860
2017-07-31 11:06:47 +00:00
Vincent Françoise
0b31828a01 Added Actuator Strategy
This strategy now allow us to create action plans with an explicit
set of actions.

Co-Authored-By: Mikhail Kizilov <kizilov.mikhail@gmail.com>
Change-Id: I7b04b9936ce5f3b5b38f319da7f8737e0f3eea88
Closes-Bug: #1659243
2017-07-31 10:52:07 +00:00
Jenkins
b5ac97bc2d Merge "Fix continuous audit fails once it fails" 2017-07-31 07:41:57 +00:00
Hidekazu Nakamura
398974a7b0 [Doc] Update software version
1. Update python version from 3.4 to 3.5
2. Update Ubuntu version from 14.04 to 16.04
3. Update Fedora version from 19+ to 24+

Change-Id: Ic5e9bbd126e10697300c6ffd51ff55d0b815d5ca
2017-07-31 15:12:41 +09:00
Hidekazu Nakamura
3a29b4e710 Fix continuous audit fails once it fails
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
2017-07-31 11:01:04 +09:00
OpenStack Proposal Bot
8024dbf913 Updated from global requirements
Change-Id: If6105a3b911757ac3204e9c73e793b5cee58c1a8
2017-07-28 13:02:45 +00:00
Jenkins
529b0d34ee Merge "Fix Hardcoded availability zone in nova-helper" 2017-07-28 08:38:30 +00:00
aditi
dac0924194 Fix Hardcoded availability zone in nova-helper
This patch fixes the hardcoded value of availability zone
in nova-helper, Now nova api is used to get the availability zone
of destination node

Change-Id: I4c5a34946ed404df5bbfe34ce99873d32772dbf4
2017-07-28 03:55:13 +00:00
Jenkins
3bb66b645c Merge "Saving Energy Strategy" 2017-07-27 12:32:21 +00:00
Jenkins
63cebc0bfa Merge "dynamic action description" 2017-07-27 12:09:44 +00:00
Yumeng Bao
5a28ac772a Saving Energy Strategy
Add strategy to trigger "power on" and "power off" actions in watcher.

Change-Id: I7ebcd2a0282e3cc7b9b01cf8c744468ce16c56bb
Implements: blueprint strategy-to-trigger-power-on-and-power-off-actions
Co-Authored-By: licanwei <li.canwei2@zte.com.cn>
2017-07-27 19:04:26 +08:00
Jenkins
fe7ad9e42b Merge "Add volume migrate action" 2017-07-27 09:40:14 +00:00
Jenkins
711de94855 Merge "Add release notes for Pike" 2017-07-27 09:40:03 +00:00
licanwei
5817f6833c Fix gate-watcher-python27-ubuntu-xenial FAILURE
There is no exc.HTTPUnauthorized in monascaclient now.

Change-Id: I1942b32d4581d1770819aa083a640f394c17d25a
Closes-Bug: #1706858
2017-07-27 15:20:51 +08:00
licanwei
a24b7f0b61 dynamic action description
Add a new table to save the mapping
Add logic to update the table when action loading
Add logic to show the action description

Change-Id: Ia008a8715bcc666ab0fefe444ef612394c775e91
Implements: blueprint dynamic-action-description
2017-07-26 20:42:01 -07:00
Hidekazu Nakamura
c03668cb02 [Doc] Add cinder to architecture diagram
Cinder data model was added in Pike cycle.
This patch set adds cinder to architecture diagram.

Change-Id: Ibf590996494f4e6ebcc59b26fbd562d079cea9ef
2017-07-26 21:50:33 +09:00
Alexander Chadin
aab18245eb Add release notes for Pike
This patch set adds release notes for Pike release.

Change-Id: I4a962ed3d20ca746a470a7ee8b2de2cf703f94f5
2017-07-26 10:45:15 +03:00
Hidekazu Nakamura
c12178920b [Doc] Add Configure Cinder Notifications
Cinder data model was added in Pike cycle and that needs
configuration in cinder.conf for refreshing the model in
real time.

This patch set adds Add Configure Cinder Notifications section
for explaining the configuration.

Change-Id: I41cc870e2d47c56fd7c9fcdd6f03c95fa939c3f2
2017-07-26 16:31:29 +09:00
zhengwei6082
f733fbeecd Update the documention for doc migration
Change-ID: Ic3dc2a93caac99f1dbe3547350a87fc01d0d4181
2017-07-26 15:26:13 +08:00
Jenkins
67754102c8 Merge "Remove all sphinx warnings" 2017-07-26 01:07:44 +00:00
Jenkins
6545f9c2ad Merge "Update the documention for doc migration" 2017-07-25 13:25:42 +00:00
Jenkins
583c23b9d9 Merge "Update URLs in documents according to document migration" 2017-07-25 13:25:36 +00:00
Jenkins
ea9ab8d6e5 Merge "Update default ironic endpoint type" 2017-07-25 13:20:59 +00:00
Alexander Chadin
8fd57276be Remove all sphinx warnings
This patch set fixes all sphinx warnings and makes
https://docs.openstack.org/watcher/latest/configuration/index.html
available.

Change-Id: I76a715c10cb1d582419ff37869093fa9b8678310
2017-07-25 07:31:53 +00:00
zhengwei6082
1d197e5e8f Update the documention for doc migration
Change-Id: I003f4b0abde102b07646ef180e2506bca19162ff
2017-07-25 06:22:03 +00:00
Hidekazu Nakamura
b33337b7bd Replace voluptuous with JSONSchema in BaseAction
Now that we replaced voluptuous with JSONSchema in all actions,
this patch replaces voluptuous with JSONSchema in BaseAction
and removes validate_parameters method in each action.

Partially Implements: blueprint jsonschema-validation

Change-Id: I07c907ddfa4a568d7fff42776df02218330d56a0
2017-07-25 13:19:13 +09:00
melissaml
d0b9b6ce38 Update URLs in documents according to document migration
Change-Id: I52396f2bed4b0fde889b37cabb6a15225a63cc0d
2017-07-25 10:07:44 +08:00
OpenStack Proposal Bot
3cd847e2ab Updated from global requirements
Change-Id: I5631ff4426442335051cc55c1af2f855b08e19f7
2017-07-23 19:11:17 +00:00
Jenkins
ba907f4905 Merge "Remove testenv for install-guide" 2017-07-22 01:20:07 +00:00
Alexander Chadin
8e787d0a87 Remove testenv for install-guide
Since install-guide is placed in doc/source/
we don't need additional env to build it.

Change-Id: Idcc711a4d5f4a88e960f22795b7e101ae388551e
2017-07-21 12:54:06 +03:00
Jenkins
b45c7b678e Merge "Add title to administrator guide" 2017-07-21 09:37:52 +00:00
Jenkins
ec64e04cc5 Merge "[Doc] Add gnocchi to system architecture diagram" 2017-07-21 07:41:31 +00:00
Jenkins
f206c2d425 Merge "Enable migration to rely on nova-scheduler" 2017-07-21 02:44:31 +00:00
Hidekazu Nakamura
bff76de6f1 Add volume migrate action
This patch adds volume migrate action.

Change-Id: I9f46931d2a7edff4c727d674ec315924b9ae30c2
Implements: blueprint volume-migrate-action
2017-07-21 11:27:37 +09:00
Jenkins
1500bee1c6 Merge "Fix devstack plugin" 2017-07-20 09:27:49 +00:00
Jenkins
9f813fb90d Merge "Update weekly meetings time in docs" 2017-07-20 09:23:31 +00:00
Alexander Chadin
8167eec625 Fix devstack plugin
This patch set fixes devstack plugin by removing head
keyword from watcher-db-manage.

It is related to https://review.openstack.org/#/c/483825/

Change-Id: I3dcea6ae799c94a882e68d66920c5cd87d83d85e
2017-07-20 08:48:57 +00:00
aditi
6731851383 Enable migration to rely on nova-scheduler
This patch removes the requirement to specify destination node,
for migrate action. There can be some strategies that wants to rely
on nova-scheduler for destination node. It will not impact any current
strategy behavior.

Change-Id: Ia12b2f0b8369e632a7959b28e485d86b6cff83e9
Closes-Bug: #1691056
2017-07-20 05:25:08 +00:00
Jenkins
0ddfa278ef Merge "remove useless logging" 2017-07-19 12:42:52 +00:00
Jenkins
aae7699bc5 Merge "Fix dbmanage upgrade and downgrade" 2017-07-19 12:37:59 +00:00
licanwei
8521608e19 Update default ironic endpoint type
The default ironic endpoint type is publicURL in ironicclient.

Change-Id: Ief78c085adafb08abb09c77af7429fbe6c3d7405
2017-07-19 11:04:12 +08:00
Jenkins
2266e2baa3 Merge "New cron type for audit interval" 2017-07-19 02:46:25 +00:00
OpenStack Proposal Bot
e08a0e9af2 Updated from global requirements
Change-Id: Ib1f8d483a2286fde752a5051f8d3a14d1fee63a8
2017-07-18 01:59:22 +00:00
licanwei
844577e9cc remove useless logging
There are many uselees logging in the decision log file:
Arguments dropped when creating context: {u'global_request_id': None}

Change-Id: I7583b2ff6ea1cc15173536ca1cf08cc9f0ecb20d
Closes-Bug: #1704736
2017-07-17 16:15:23 +08:00
Alexander Chadin
0b44492da7 New cron type for audit interval
This patch set adds cron supporting for audit.

Implements: blueprint cron-based-continuous-audits
Change-Id: I8570bebb13332dfba80185e912aeda45b6b4cd70
2017-07-14 11:50:46 +03:00
licanwei
b146e29c39 Fix dbmanage upgrade and downgrade
The argument is '--revision'

Change-Id: Icf3a37ed42dd1dfe4fc9c52525dd4f0fb851417c
2017-07-14 14:12:41 +08:00
Alexander Chadin
0cabd5bd3a Update weekly meetings time in docs
Change-Id: Ic6ebbda653d5b90d6e1e3d866f4180e6d6e07452
2017-07-13 15:52:28 +03:00
Jenkins
728acc091b Merge "Abort operation for live migration" 2017-07-13 09:05:56 +00:00
Hidekazu Nakamura
7340decf73 Add title to administrator guide
As of now, Watcher administrator guide has no title[1]
This patch fix it.

[1] https://docs.openstack.org/watcher/latest/admin/

Change-Id: I995faf02f9217187b824974ee391918dfd6ed920
2017-07-13 16:01:26 +09:00
Jenkins
84e8eb4cb0 Merge "Cinder model integration" 2017-07-12 14:55:10 +00:00
aditi
5283871af5 Abort operation for live migration
This patch adds abort operation for live migration
to support abort in cancel action plan.

Change-Id: I458e93d9bd09dc4cf80cc941104129fc7600a6b1
Partially-Implements: blueprint cancel-action-plan
2017-07-12 06:09:23 +00:00
Hidekazu Nakamura
916fd73186 [Doc] Add gnocchi to system architecture diagram
This patch set adds gnocchi to system architecture diagram.

Change-Id: I8e3a53910ad9ea861f174a6f178199626ed2247f
2017-07-11 00:16:55 +09:00
Yumeng Bao
22ee0aa8f7 Ignore autogenerated sample config file
Change-Id: Ief43668feb06c136c87a2218e9d7671c7809dcbc
2017-07-10 19:16:36 +08:00
xiaoxue
63c1aabdd2 bug fix: Can't get sample through CeilometerHelper
wrong parameter passing of function "query_sample"
the default parameter will be recognized as "user_id"

Change-Id: I293b130c3f709dc93cd4b1b7382ae8895a54765d
Closes-Bug: #1703297
2017-07-10 14:37:33 +08:00
Jenkins
03569db6c3 Merge "move doc/source/webapi content to doc/source/api" 2017-07-07 08:14:07 +00:00
Jenkins
19cf05fd75 Merge "Replace voluptuous with JSONSchema to validate change_node_power_state" 2017-07-07 05:49:51 +00:00
Jenkins
251ca83ddc Merge "Update Documentation link in README" 2017-07-07 05:47:06 +00:00
akihito-inoh
5b349b4e89 Replace voluptuous with JSONSchema to validate change_node_power_state
Now in watcher,both JSONSchema and voluptuous are used to validate
JSON payloads. We want to remove voluptuous and Use
JSONSchema as our only JSON validation tool to keep consistence
and also to make it easier to expose the validation schema
through our API in future work.

In this patch, we replace voluptuous with JSONSchema to validate
the change_node_power_state action in watcher applier.

Partially Implements: blueprint jsonschema-validation

Change-Id: If9ffe5e0b107e0da5673247e4d5ec9917790827f
2017-07-06 15:58:49 +00:00
Alexander Chadin
b0d03ae6b8 move doc/source/webapi content to doc/source/api
Change-Id: I5b1023f2d7ac2760895bba8f7d0cb10260061754
2017-07-06 15:55:12 +03:00
Jenkins
78de029a57 Merge "Adapt watcher documentation for new standards" 2017-07-06 10:23:29 +00:00
Hidekazu Nakamura
489356da3a Cinder model integration
This patch adds Cinder model integration.

Change-Id: I31d5bc5e2bbed885d074d66bf7999d42cec15f10
Implements: blueprint cinder-model-integration
2017-07-05 08:55:10 +09:00
Alexander Chadin
db4339c371 Update Documentation link in README
This patch set updates documentation link in README
because of doc migrations.

Depends-On: Iecb4f60efb015a56b9b37331859848b287112842
Change-Id: I5b8a5ec8a328ae275fe6271965ea0077ae301814
2017-07-04 16:01:07 +03:00
Alexander Chadin
c7ec186576 Adapt watcher documentation for new standards
This patch set makes the following changes:

 * Add index file to each subdirectory of doc/source
 * Update doc/source/index.rst with new links
 * Move content of install-guide to the doc/source/install
 * Minor changes

Depends-On: Ifc5512c0e2373cf3387e0e0498268eab092e52bb
Change-Id: Iecb4f60efb015a56b9b37331859848b287112842
2017-07-04 15:49:24 +03:00
Hidekazu Nakamura
12bdfca0d9 Replace default neutron endpoint type
The default neutron endpoint type is publicURL in neutronclient.
This patch replaces default neutron endpoint type from
internalURL to publicURL.

Change-Id: I8162b6178051df5f086488ecfb5d0bdc569ef9cd
Related-Bug: #1686298
2017-07-01 19:51:06 +09:00
Jenkins
5f179609d0 Merge "Replace default glance endpoint type" 2017-06-30 17:21:28 +00:00
aditi
a842bc1c91 switch to openstackdocs theme.
Change-Id: I95a1f6813225134fafdc22384fb8a822ab9e013d
2017-06-29 08:50:03 +00:00
Hidekazu Nakamura
5eb1d91335 Replace default glance endpoint type
The default glance endpoint type is publicURL in glanceclient.
This patch replaces default glance endpoint type from
internalURL to publicURL.

Change-Id: I39451ba89f191693475a694bd5c9045bf3bf539a
Related-Bug: #1686298
2017-06-29 16:42:39 +09:00
Jenkins
264b0fe9a1 Merge "Noisy Neighbor Strategy" 2017-06-28 12:06:15 +00:00
Jenkins
a487a4efc8 Merge "Fix test_list_with_limit failed" 2017-06-28 11:39:51 +00:00
Jenkins
034f0bf68a Merge "Replace the usage of 'manager' with 'os_primary'" 2017-06-28 08:51:02 +00:00
licanwei
87b95bb639 Fix test_list_with_limit failed
There is no action plan if creating audit was cancelled.
In this case, we just return none.

Change-Id: Ia7a93dab5978d181557d7dd7499e83655aec6f40
Closes-Bug: #1700901
2017-06-28 14:40:46 +08:00
Jenkins
e081ac91b4 Merge "Updated from global requirements" 2017-06-28 06:09:56 +00:00
rajat29
3574dba9da Replace the usage of 'manager' with 'os_primary'
In tempest, alias 'manager' has been moved to 'os_primary'
in version Pike, and it will be removed in version Queens.
This patch is to replace the usage of 'manager' with 'os_primary'.

For other details, please check [1] and [2]
[1] https://review.openstack.org/#/c/468036/
[2] https://review.openstack.org/#/c/463484/

Change-Id: I582758c42f61a85a2fd4aac5f7a97cd6021ecf68
2017-06-28 10:36:43 +05:30
Jenkins
8fc9c6c1d8 Merge "avoid repeated actions in the solution" 2017-06-27 23:48:16 +00:00
OpenStack Proposal Bot
51f17f1d7d Updated from global requirements
Change-Id: I5298796b492396d0ecfccbcf601c11069c20b624
2017-06-27 12:25:18 +00:00
Jenkins
313f156394 Merge "Update .gitignore" 2017-06-27 11:36:03 +00:00
suzhengwei
129de26419 avoid repeated actions in the solution
Change-Id: If163aee969b51764d69d42655c05e0651e4f150c
2017-06-27 09:02:27 +00:00
Jenkins
d38bc4e716 Merge "node.status for vm_workload_consolidation" 2017-06-27 08:34:33 +00:00
Jenkins
6ffa5feaaf Merge "Fix get_action_plan_list filter error" 2017-06-27 08:33:50 +00:00
Jenkins
bdd3a6ab89 Merge "Pass environment variables of proxy to tox" 2017-06-27 07:37:31 +00:00
iswarya_vakati
8c5f363844 Update .gitignore
Because egg* already ignores egg-info.

Change-Id: I0afedfa82bc1c91d40e42f21fdcd90eccc0faacf
2017-06-26 17:30:19 +05:30
Jenkins
e61140edfb Merge "Enable some off-by-default checks" 2017-06-25 12:07:09 +00:00
Kien Nguyen
abc019829f Pass environment variables of proxy to tox
When a development environment is under a proxy, tox is failed even if
environment variables of the proxy are set.

This patch fix this problem. Refer patch set [1]

[1] https://review.openstack.org/#/c/189569

Change-Id: I6c0b896a6de1b7193dd4b77b6bc4433d0c75732d
2017-06-25 18:36:45 +07:00
Jenkins
0dd5826dd3 Merge "fix Keyerror in test_nova_cdmc" 2017-06-24 03:41:26 +00:00
zhengwei6082
227a9e9b63 Enable some off-by-default checks
Some of the available checks are disabled by default, like:
[H106] Don’t put vim configuration in source files
[H203] Use assertIs(Not)None to check for None

Change-Id: I369cff1c0f7f3cd3f5bcf3785b6904c9326c6759
2017-06-23 17:35:08 +08:00
Jenkins
5b6768140f Merge "Replace voluptuous with JSONSchema to validate sleep action" 2017-06-21 14:39:14 +00:00
Jenkins
1ac7fbec34 Merge "Updated from global requirements" 2017-06-21 10:01:02 +00:00
Jenkins
ebb8885ece Merge "Add action for compute node power on/off" 2017-06-21 09:59:13 +00:00
Jenkins
3fb4cadd76 Merge "Replace voluptuous with JSONSchema to validate resize action" 2017-06-21 09:45:39 +00:00
OpenStack Proposal Bot
c1d3f8094b Updated from global requirements
Change-Id: I1a5694edcdeefad2ee93b0c893f79c1ddf792692
2017-06-19 21:15:54 +00:00
licanwei
59649f6a81 Fix get_action_plan_list filter error
When using 'query.filter_by(deleted_at=None)'
Will generate the incorrect SQL 'audits.deleted_at', as below:
SELECT * FROM action_plans INNER JOIN audits ON audits.id =
action_plans.audit_id WHERE audits.uuid = '' AND
audits.deleted_at IS NULL ORDER BY action_plans.id ASC

The correct filter field is 'action_plans.deleted_at'

Change-Id: Ie05f35233f78e82bc7af2c26c9effd62ea5f86ab
Closes-Bug: #1698720
2017-06-19 16:23:05 +08:00
suzhengwei
045404095d node.status for vm_workload_consolidation
The primary usage of "node.state" is wrong, it should be 'node.status'.
So correct it and refactor the method 'get_state_str'.

Change-Id: I9004c85bfb09f9b41fc56ecb5a56122d523a661f
2017-06-16 07:04:08 +00:00
Prudhvi Rao Shedimbi
606a340b5b Noisy Neighbor Strategy
Added strategy to identify and migrate a Noisy Neighbor - a low priority VM
that negatively affects peformance of a high priority VM by over utilizing
Last Level Cache.

Partially Implements: blueprint noisy-neighbor-strategy

Change-Id: Ia13f7e91a695024410b8f3b3d3d1646a0dd687d4
2017-06-15 14:51:10 -07:00
OpenStack Proposal Bot
35fdbbe16e Updated from global requirements
Change-Id: I1fea346ba9a7f592d456101e09d00c45a91ff311
2017-06-15 16:37:35 +00:00
Yumeng_Bao
2db279e019 fix Keyerror in test_nova_cdmc
fix keyerror in watcher.tests.decision_engine.cluster.test_nova_cdmc.
TestNovaClusterDataModelCollector.test_nova_cdmc_execute

Change-Id: I44810ae539d8783173dfbb9dd462101e21025802
Closes-Bug: #1698123
2017-06-15 19:08:59 +08:00
Jenkins
986ba9872f Merge "Replace voluptuous with JSONSchema to validate migration action" 2017-06-15 06:21:05 +00:00
Jenkins
44a5a1573c Merge "Replace voluptuous with JSONSchema to validate nop action" 2017-06-14 14:59:22 +00:00
Jenkins
fe34b420a5 Merge "Remove deprecated oslo_messaging.get_transport" 2017-06-14 13:13:34 +00:00
Jenkins
43da4a6d21 Merge "Replace voluptuous with JSONSchema to validate change_nova_service_state" 2017-06-14 13:12:34 +00:00
Jenkins
7ba1bf2237 Merge "Remove log translations and hacking" 2017-06-14 07:41:50 +00:00
Jenkins
206bb413e2 Merge "fix multinode tempest test failure" 2017-06-14 02:27:25 +00:00
licanwei
1188d4263d Add action for compute node power on/off
Add action for compute node power on/off

Change-Id: I7b0c0a7500f72f49af8201547640b2322c64baff
Implements: blueprint add-power-on-off
2017-06-13 15:07:33 +08:00
Yumeng_Bao
1451d9c134 Replace voluptuous with JSONSchema to validate migration action
Now in watcher,both JSONSchema and voluptuous are used to validate
JSON payloads. We want to remove voluptuous and Use
JSONSchema as our only JSON validation tool to keep consistence
and also to make it easier to expose the validation schema
through our API in future work.

In this patch, we replace voluptuous with JSONSchema to validate
the migration action in watcher applier.

Partially Implements: blueprint jsonschema-validation

Change-Id: I02bff5db9bd06567bcc33b61a316c42c805bb20e
2017-06-12 17:40:07 +08:00
OpenStack Proposal Bot
6d739ae1d0 Updated from global requirements
Change-Id: I8efcebd4dbbaa7fd35085d6378907e5ffa0dd27b
2017-06-10 11:50:38 +00:00
Yumeng_Bao
f2751b4818 Replace voluptuous with JSONSchema to validate change_nova_service_state
Now in watcher,both JSONSchema and voluptuous are used to validate
JSON payloads. We want to remove voluptuous and Use
JSONSchema as our only JSON validation tool to keep consistence
and also to make it easier to expose the validation schema
through our API in future work.

In this patch, we replace voluptuous with JSONSchema to validate
the change_nova_service_state action in watcher applier.

Partially Implements: blueprint jsonschema-validation

Change-Id: I09a03fff96d9555024a74ba255c6951affc39de8
2017-06-10 13:51:25 +08:00
Yumeng_Bao
e2bf82607e Replace voluptuous with JSONSchema to validate resize action
Now in watcher,both JSONSchema and voluptuous are used to validate
JSON payloads. We want to remove voluptuous and Use JSONSchema
as our only JSON validation tool to keep consistence and also
to make it easier to expose the validation schema through
our API in future work.

In this patch, we replace voluptuous with JSONSchema to validate
the resize action in watcher applier.

Partially Implements: blueprint jsonschema-validation

Change-Id: I0ee4ba010a9f437658af81d5c971449aefc7f9c4
2017-06-10 13:40:29 +08:00
Yumeng_Bao
d76b5d2f7e Replace voluptuous with JSONSchema to validate sleep action
Now in watcher,both JSONSchema and voluptuous are used to validate
JSON payloads. We want to remove voluptuous and Use
JSONSchema as our only JSON validation tool to keep consistence
and also to make it easier to expose the validation schema
through our API in future work.

In this patch, we replace voluptuous with JSONSchema to validate
the sleep action in watcher applier.

Partially Implements: blueprint jsonschema-validation

Change-Id: I3032490236536a11e7045a56ad0bd40ef979407e
2017-06-10 13:22:36 +08:00
Yumeng_Bao
69730d80b2 Replace voluptuous with JSONSchema to validate nop action
Now in watcher,both JSONSchema and voluptuous are used to validate
JSON payloads. We want to remove voluptuous and Use
JSONSchema as our only JSON validation tool to keep consistence
and also to make it easier to expose the validation schema
through our API in future work.

In this patch, we replace voluptuous with JSONSchema to validate
the nop action in watcher applier.

Partially Implements: blueprint jsonschema-validation

Change-Id: Idf42b3359c36ac9480bd1f1bdd31e756214628ef
2017-06-09 13:14:29 +08:00
Ngo Quoc Cuong
17aa1122da Remove log translations and hacking
Log translation is no longer used, remove translate functions

Change-Id: Ibe205266debd6d39dab0a652a327ab19081ff27a
2017-06-08 09:48:26 +07:00
Ngo Quoc Cuong
d0f5a9fdf5 Remove deprecated oslo_messaging.get_transport
DeprecationWarning:
Using function/method 'oslo_messaging.transport.get_transport()'
is deprecated: use get_rpc_transport or get_notification_transport.

Replace get_transport with get_rpc_transport.

Change-Id: I13455842235a16463e61e5500c9e250a5cc9f86e
2017-06-08 08:34:39 +07:00
Jenkins
32dacdca8b Merge "Cancel Action Plan" 2017-06-07 14:09:32 +00:00
Jenkins
fbfb7159e3 Merge "fix clod_migrate problem" 2017-06-07 10:26:13 +00:00
aditi
d7a44739a6 Cancel Action Plan
This patch adds feature to cancel action plan in watcher.
A General flow from watcher-api to watcher-applier is implemented.

action plan cancel can cancel any [ongoing, pending, recommended]
action plan, it will update the action states also to "cancelled".
For ongoing actions in action plan, actions needs to be aborted.
Seperate patches will be added to support abort operation
in each action.

Notification part is addressed by a seperate blueprint.
https://blueprints.launchpad.net/watcher/+spec/notifications-actionplan-cancel

Change-Id: I895a5eaca5239d5657702c8d1875b9ece21682dc
Partially-Implements: blueprint cancel-action-plan
2017-06-07 05:36:18 +00:00
licanwei
65c63a9351 fix multinode tempest test failure
fix all five tempest tests:
watcher_tempest_plugin.tests.api.admin.test_service.
TestShowListService.test_show_service

watcher_tempest_plugin.tests.api.admin.test_service.
TestShowListService.test_show_service_with_links

tearDownClass (watcher_tempest_plugin.tests.api.admin.
test_action_plan.TestCreateDeleteExecuteActionPlan)

watcher_tempest_plugin.tests.scenario.test_execute_basic_optim
.TestExecuteBasicStrategy.test_execute_basic_action_plan

watcher_tempest_plugin.tests.scenario.test_execute_workload_balancing
.TestExecuteWorkloadBalancingStrategy
.test_execute_workload_stabilization

Change-Id: I4d8945cf2dedea3fa32029d6c07d24a411c1f2e4
Closes-Bug: #1695225
2017-06-07 11:56:23 +08:00
OpenStack Proposal Bot
58d86de064 Updated from global requirements
Change-Id: I65ae1ac5170cf675d8c396ef3b7166bafc19190e
2017-06-06 06:14:58 +00:00
Yumeng Bao
8d84da307b Add rm to whitelist_externals in tox.ini
Fix the following WARNING:

WARNING:test command found but not installed in testenv
  cmd: /bin/rm
  env: /home/jenkins/workspace/gate-watcher-python27-ubuntu-xenial/.tox/py27
Maybe you forgot to specify a dependency? See also the whitelist_externals envconfig setting.

Change-Id: Ie091bd64b6a87c30535ada34daf9d594aa3fdd41
2017-06-05 19:10:28 +08:00
Jenkins
01e865edbf Merge "Replace default cinder endpoint type" 2017-06-05 08:37:45 +00:00
Jenkins
b4b3856f14 Merge "Add action description" 2017-06-02 08:31:21 +00:00
Jenkins
67d065e02a Merge "Remove usage of parameter enforce_type" 2017-06-02 01:26:10 +00:00
Jenkins
891a351a04 Merge "Watcher official install-guide" 2017-06-01 04:38:16 +00:00
Feng Shengqin
f47fd9ac5e Remove usage of parameter enforce_type
Oslo.config deprecated parameter enforce_type and change
its default value to True. Remove the usage of it to avoid
DeprecationWarning: "Using the 'enforce_type' argument is
deprecated in version '4.0' and will be removed in version
'5.0': The argument enforce_type has changed its default
value to True and then will be removed completely."

Change-Id: I59621664773ee5ad264e6da9b15231f30dbb9c40
Closes-Bug: #1694616
2017-06-01 10:13:20 +08:00
Hidekazu Nakamura
7b766680b0 Replace default cinder endpoint type
The default cinder endpoint type is publicURL in cinderclient.
This patch replaces default cinder endpoint type from
internalURL to publicURL.

Change-Id: Ie6951086e4656bd83195dab151dbaaf948113a7c
Related-Bug: #1686298
2017-06-01 01:20:00 +00:00
licanwei
75a025d2d2 Add action description
Add action get_description in class BaseAction.
This information will be sent to the API side via notification.

Partially Implements: blueprint dynamic-action-description

Change-Id: I9ce1b18ad8c5eb7db62ec926d1859d0f508074b0
2017-05-31 18:03:19 +08:00
Jenkins
590bd43a1d Merge "Trivial fix typos" 2017-05-31 08:54:56 +00:00
Jenkins
d2e42a835b Merge "Deleted audit record still get by 'audit list'cmd" 2017-05-31 08:54:15 +00:00
Jenkins
a34e55e47a Merge "Replace oslo_utils.timeutils.isotime" 2017-05-31 08:49:41 +00:00
aditi
a62acbf2ab Watcher official install-guide
Currently watcher project does not have an official
install guide at [1]

This patch adds watcher install guide for rdo and debian.

install-guide is written following the document [2].

[1] https://docs.openstack.org/project-install-guide/ocata/
[2] https://docs.openstack.org/contributor-guide/project-install-guide.html

Change-Id: Idfae7286003f81222dadf91ddcaf95a42c7eb07f
2017-05-31 08:40:27 +00:00
Vu Cong Tuan
35074edaf7 Trivial fix typos
Change-Id: I4c7d3a0d815a616d1ba2c0d26135db5f2aea0c2f
2017-05-30 15:55:33 +07:00
Luong Anh Tuan
dd4aac4092 Replace oslo_utils.timeutils.isotime
Function 'oslo_utils.timeutils.isotime()' is deprecated in version '1.6'
and will be removed in a future version. We use
datetime.datetime.isoformat() instead. For more informations:
http://docs.openstack.org/developer/oslo.utils/api/timeutils.html#oslo_utils.timeutils.isotime

Change-Id: I17384c369fdc7f86b37fd62370d800ed2463adbe
Closes-Bug: #1514331
2017-05-29 23:34:03 +07:00
Jenkins
bd8151e581 Merge "Reduced the code complexity" 2017-05-29 09:15:26 +00:00
Jenkins
8585e49359 Merge "Updated from global requirements" 2017-05-27 12:23:06 +00:00
Jenkins
5d3af47b7d Merge "Versioned Notifications for service object" 2017-05-27 12:20:45 +00:00
OpenStack Proposal Bot
1001525664 Updated from global requirements
Change-Id: I1baa46eba0e7dbae816dbbeb0914f4e1efc8fa0a
2017-05-26 17:31:36 +00:00
licanwei
a33f40ec21 Deleted audit record still get by 'audit list'cmd
Audit record was deleted but the field 'state' maybe not set DELETED.
get_audit_list's filter used field 'state' will get
wrong result.
filter rule should use field 'deleted_at' instead of field 'state'.
get_action_list and get_action_plan_list have the same filter rule.

Change-Id: I08b2a005ca5fb7c2741ac5ed97c6e6b4279758ed
Closes-Bug: #1693666
2017-05-26 14:53:32 +08:00
Vladimir Ostroverkhov
d2a8454043 Versioned Notifications for service object
Implements: blueprint service-versioned-notifications-api

Change-Id: I9d601edb265ee230104f6c63a5f044869aeb3a02
2017-05-25 12:52:01 +03:00
suzhengwei
27c56a19e4 fix clod_migrate problem
1.TypeError: watcher_non_live_migrate_instance() got an unexpected keyword
  argument 'dest_hostname'
2.Conflict: Cannot 'stop' instance ****** while it is in vm_state stopped
  (HTTP 409)

Closes-Bug: #1693434

Change-Id: I7293dd5d08e33c2e534d072da8592172bc438c9e
2017-05-25 07:27:26 +00:00
Jenkins
9bb1e653d8 Merge "Change cinder api_version to '3' in default" 2017-05-25 06:51:58 +00:00
Akihito INOH
bb536ee40d Change cinder api_version to '3' in default
Block Storage API v2 is deprecated now. Instead of it, we should use v3
in default (api_version).

This patch replace cinder default api_version from '2' to '3' in
conf/cinder_client.py

Change-Id: I53ffa74cdac7ac31c74937bf18da8ed2fec92223
Closes-Bug: #1691104
2017-05-25 09:26:33 +09:00
OpenStack Proposal Bot
a0bf1b7d70 Updated from global requirements
Change-Id: Id71f841aa19c8cc07205a59450ea376d4a7ffce4
2017-05-24 03:47:55 +00:00
Jenkins
40f6eea637 Merge "Remove the deprecated tempest.test.attr" 2017-05-22 09:38:12 +00:00
suzhengwei
6c5a3910a7 doc error for WeightPlanner
Change-Id: I6c51a919baa32e9b46bfadfcf8e6afac27890b17
2017-05-22 16:08:53 +08:00
Ngo Quoc Cuong
a4fac69d85 Remove the deprecated tempest.test.attr
[1] moves the attr decorator from test.py to tempest/lib. So, all the
references to tempest.test has to be moved to tempest.lib.decorator.

[2] https://review.openstack.org/#/c/456236/

Change-Id: If977e559d9f3b982baf2974efef3c5b375f263b9
2017-05-22 10:11:18 +07:00
Luong Anh Tuan
21994297cf Replace assertRaisesRegexp with assertRaisesRegex
This replaces the deprecated (in python 3.2) unittest.TestCase
method assertRaisesRegexp() with assertRaisesRegex().

Change-Id: I38c3055288034aba51c11bb1bccd3655f760cecc
Closes-Bug: #1436957
2017-05-19 18:06:00 +07:00
OpenStack Proposal Bot
8a818c9071 Updated from global requirements
Change-Id: Id3b644be5dccdf4abf60c6a49400f61582f0d244
2017-05-17 04:00:56 +00:00
Jenkins
041fcb4ca0 Merge "Added tempest test for workload_stabilization" 2017-05-17 01:32:13 +00:00
Jenkins
a8d765bb28 Merge "Fix a typo" 2017-05-10 18:22:08 +00:00
zhangjianfeng
2b152bf17c [bugfix]for division use accurate division
for now / just get int value ,this will lead method
filter_destination_hosts return 0 host
because self.threshold / 100 * host.vcpus is 0
so we need use accurate division to change this

close-bug: 1689269

Change-Id: I5663951ce750d6c4580a507ccfc0268baea0685f
2017-05-08 18:27:24 +08:00
chenaidong1
08e585d405 Fix a typo
'specfication' should be 'specification'

Change-Id: I845e6199c4e2152295fb02ac44a1b090a3d7561d
2017-05-08 15:43:57 +08:00
OpenStack Proposal Bot
38e4255ec0 Updated from global requirements
Change-Id: I5ab36d982f5ef09548303f1233116a7ad74e00f2
2017-05-04 13:33:41 +00:00
Jenkins
a167044cde Merge "[bugfix]retry is reached but action still success" 2017-05-04 09:17:36 +00:00
Jenkins
1366f79b63 Merge "Add Watcher JobStore for background jobs" 2017-05-03 14:50:35 +00:00
Jenkins
f55b9b127e Merge "Add 'rm -f .testrepository/times.dbm' command in testenv" 2017-05-03 12:01:49 +00:00
Jenkins
1b7b467151 Merge "replace nova endpoint" 2017-05-03 12:01:32 +00:00
Alexander Chadin
f40fcdc573 Add Watcher JobStore for background jobs
This patch set adds WatcherJobStore class that allows to link
jobs and services.

Partially-Implements: blueprint background-jobs-ha
Change-Id: I575887ca6dae60b3b7709e6d2e2b256e09a3d824
2017-05-03 12:07:01 +03:00
Jenkins
2d98d5e743 Merge "Fix devstack plugin" 2017-05-02 18:36:27 +00:00
OpenStack Proposal Bot
877230569a Updated from global requirements
Change-Id: I685b9a86764c24fb638c6a684a7b82818d8a6aac
2017-04-27 11:50:22 +00:00
Jenkins
f842c5f601 Merge "Add host_aggregates in exclude rule of audit scope" 2017-04-27 11:01:22 +00:00
Pradeep Kumar Singh
0a899a2dc2 Add host_aggregates in exclude rule of audit scope
Currently if user wants to skip some host_aggregates from audit,
it is not possible. This patch adds host_aggregates into the exclude
rule of audit scope. This patch also implements audit-tag-vm-metadata
using scopes.

TODOs:
1. Add tests
2. Remove old implementation of audit-tag-vm-metadata

Change-Id: Ie86378cb02145a660bbf446eedb29dc311fa29d7
Implements: BP audit-tag-vm-metadata
2017-04-27 08:37:16 +00:00
licanwei
426232e288 replace nova endpoint
The default is publicURL in novaclient.
This also caused the failure of
gate-watcher-dsvm-multinode-ubuntu-xenial-nv.

Change-Id: I485dd62fb7199ffeca29a9b573a624bf144484d1
Closes-Bug: #1686298
Closes-Bug: #1686281
2017-04-27 02:08:04 +00:00
Jenkins
778d4c6fe4 Merge "Set access_policy for messaging's dispatcher" 2017-04-25 14:11:17 +00:00
Jenkins
f852467d6a Merge "Add ironicclient" 2017-04-25 13:43:14 +00:00
M V P Nitesh
dcf64ed1f4 Add 'rm -f .testrepository/times.dbm' command in testenv
Running py2* post py3* tests results in error. Add
'rm -f .testrepository/times.dbm' command in testenv to
resolve this.

Change-Id: Ia43f8d10f157d988c4d2c89f16cac0ea729cabe6
2017-04-25 12:52:13 +05:30
Jenkins
03f75202c8 Merge "[Doc] fix local.conf.compute" 2017-04-25 07:01:57 +00:00
Jenkins
0173a713c1 Merge "use instance data replace exception.NoDataFound" 2017-04-25 00:14:07 +00:00
Hidekazu Nakamura
216f3bab29 [Doc] fix local.conf.compute
Compute node needs placement-client service from Ocata.

Change-Id: Ibd02a126bb4808625cede8fe04255ac014268adb
2017-04-24 20:58:37 +09:00
zhangjianfeng
077b806bf6 [bugfix]retry is reached but action still success
now when action like live-migration retry is reached
result is False but action still success
we can add check in do execute method can fix this problem.
close-bug: 1685757

Change-Id: I8390566ec8dcfa3a71b931d5be1b305802ac0b2a
2017-04-24 18:17:22 +08:00
licanwei
d892153b58 use instance data replace exception.NoDataFound
If instance_ram_util and instance_disk_util can not get data
from datasource. we can use instance data,
just like total_cpu_utilization

Change-Id: I4170b96946b07435411ada5ff4a14c978c0435b4
2017-04-24 15:35:04 +08:00
shubhendu
2efe211f36 Set access_policy for messaging's dispatcher
oslo.messaging allow dispatcher to restrict endpoint
methods with DefaultRPCAccessPolicy to fix FutureWarning

Closes-Bug:1663543

Change-Id: I0288320193b0153ee223664696abca21cbdb0349
2017-04-24 06:32:33 +00:00
Hidekazu Nakamura
f55ea7824e Fix devstack plugin
Stack.sh after unstack.sh results in error.
This patch fix it.

Change-Id: I35d74896611e56d916a9846b2f854bd060a606e4
2017-04-21 16:49:04 +09:00
Hidekazu Nakamura
e5eb4f51be [Doc] messaging -> messagingv2
Nova sends notifications using 2.0 messging format.

Change-Id: Ib0202ba5291f1666bdbf9b6830521b1a2aa20a80
2017-04-18 11:54:16 +09:00
licanwei
f637a368d7 Add ironicclient
This patch set adds ironicclient.

Change-Id: I122a26465d339ee6e36c0f234d3fd6c57cee2afa
Partially-Implements: blueprint build-baremetal-data-model-in-watcher
2017-04-17 06:48:05 +00:00
Jenkins
2e8fb5a821 Merge "exception when running 'watcher actionplan start XXX'" 2017-04-13 11:59:45 +00:00
OpenStack Proposal Bot
dbff4326e3 Updated from global requirements
Change-Id: I3df338013a22ba11e83929660e1c63d87fb30d01
2017-04-12 13:29:03 +00:00
Jenkins
13a99b4c09 Merge "Prevent the migration of VM with 'optimize' False in VM metadata" 2017-04-12 12:00:05 +00:00
Jenkins
a8994bc227 Merge "Added suspended audit state" 2017-04-12 05:24:01 +00:00
Hidekazu Nakamura
c6845c0136 Added suspended audit state
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
2017-04-11 20:50:24 +09:00
Jenkins
02c8e7d89c Merge "Add gnocchi support in uniform_airflow strategy" 2017-04-11 10:52:30 +00:00
Jenkins
0db41f1862 Merge "Updated from global requirements" 2017-04-11 01:30:46 +00:00
Santhosh Fernandes
b02cf3bea5 Add gnocchi support in uniform_airflow strategy
This patch adds gnocchi support in uniform_airflow strategy
and adds unit tests corresponding to that change.

Change-Id: I347d0129da94a2fc88229d09297765795c5eeb1a
Partiallly-Implements: bp gnocchi-watcher
2017-04-10 19:14:37 +05:30
XieYingYun
4eeaa0ab6b Add Apache License Content in index.rst
Add Apache License 2.0 Content which is necessary
for ./releasenotes/source/index.rst.

Change-Id: Ieda2bda1eadc26a1e3420aecd3bee1b64ae3e23f
2017-04-10 18:45:36 +08:00
Jenkins
84d6d4aadd Merge "Optimize the link address" 2017-04-10 08:28:17 +00:00
Jenkins
4511b36496 Merge "Optimize the link address" 2017-04-10 08:22:14 +00:00
Jenkins
9a5c017a9a Merge "correct syntax error" 2017-04-10 08:21:24 +00:00
Jenkins
4690e402ce Merge "Add gnocchi support in workload_balance strategy" 2017-04-10 08:20:21 +00:00
M V P Nitesh
442e569686 Optimize the link address
Use https instead of http to ensure the safety

Change-Id: I41035ccb7b46c3f4ffc54cedb2392bfb64e2ac4c
2017-04-10 11:59:19 +05:30
Yumeng_Bao
5d948e8aa1 correct syntax error
Change-Id: Ied06d39da39b955a90e890156f8c11e329cf864e
2017-04-10 10:57:19 +08:00
OpenStack Proposal Bot
f83a92fc70 Updated from global requirements
Change-Id: I3aee3f27ef116b4cb636b090caad1806e3447744
2017-04-07 14:34:49 +00:00
Jenkins
a06c462050 Merge "Add gnocchi support in VM-Workload-Consolidation strategy" 2017-04-07 13:37:59 +00:00
Jenkins
74e9349c1f Merge "Add gnocchi support in outlet_temp_control strategy" 2017-04-07 12:49:33 +00:00
Jenkins
7c048c761e Merge "Add gnocchi support in workload_stabilization strategy" 2017-04-07 10:12:48 +00:00
Jenkins
4006b4af7a Merge "Run Watcher-API behind mod-wsgi" 2017-04-07 08:42:30 +00:00
licanwei
527423a5fa exception when running 'watcher actionplan start XXX'
In DefaultApplier.execute(), Action.list should set eager=True.
Otherwise it will trigger an exception when the notification is sent.

This also causes the FAILURE of
gate-watcher-dsvm-multinode-ubuntu-xenial-nv.

Change-Id: I27db9691727671abb582d4f22283ebda5bd51b07
Closes-Bug: #1676308
2017-04-07 16:19:21 +08:00
XieYingYun
1d05444f67 Optimize the link address
Use https instead of http to ensure the safety without containing our
account/password information

Change-Id: I1f164848f164d9694c0cfc802cc3980459bdf12f
2017-04-07 10:55:59 +08:00
Santhosh Fernandes
6de94cca2d Add gnocchi support in outlet_temp_control strategy
This patch adds gnocchi support in outlet_temp_control strategy
and adds unit tests corresponding to that change.
Partiallly-Implements: bp gnocchi-watcher

Change-Id: I2c2e9a86c470f3402adc3dbb7eb9995c643d5b37
2017-04-05 19:26:54 +05:30
Jenkins
9b5d17b412 Merge "oslo messaging notifications driver update" 2017-04-05 12:37:56 +00:00
Jenkins
719b96f2a8 Merge "fixed syntax error in json" 2017-04-05 12:33:18 +00:00
the.bling
e9f83417eb fixed syntax error in json
Change-Id: I6dc02d53291e42fb1de6811f439f5814c49af769
2017-04-05 16:37:41 +05:30
Yumeng_Bao
a139cca260 Replace py34 with py35
Change-Id: I562e53718ed269545a425cf30c59442ec72566f8
2017-04-05 11:25:01 +08:00
Jenkins
c04d3cc5e0 Merge "Use tox to generate a sample configuration file" 2017-04-05 01:52:41 +00:00
Santhosh Fernandes
e549e43e9e Add gnocchi support in workload_balance strategy
This patch adds gnocchi support in workload_balance strategy
and adds unit tests corresponding to that change.

Change-Id: I9bc56c7b91b5c3fd0cfe97d75c3bace50ab22532
Partiallly-Implements: bp gnocchi-watcher
2017-04-03 15:52:42 +05:30
Jenkins
c1a2c79514 Merge "Updated from global requirements" 2017-04-03 07:26:01 +00:00
Jenkins
f79cad99cb Merge "Add gnocchi plugin support for devstack" 2017-04-03 07:23:33 +00:00
Santhosh Fernandes
8663c3a5c5 Add gnocchi plugin support for devstack
This patch enables gnocchi plugin for devstack.

Partiallly-Implements: bp gnocchi-watcher
Closes-Bug: 1662515
Change-Id: I6614ce6999c9681bd6fafc6c85a3755b5ce8e2dd
2017-04-03 09:52:07 +05:30
OpenStack Proposal Bot
19d9b83665 Updated from global requirements
Change-Id: I4b82c80745c1cb54b66a5cb4a7fcecd7fbf964a3
2017-04-01 15:35:28 +00:00
aditi
af22899ebe Run Watcher-API behind mod-wsgi
This patch adds support to run watcher-api
with mod-wsgi. It provides
1. wsgi app script files, to run watcher-api under apache.
2. updated devstack plugin to run watcher-api default with
   mod-wsgi.
3. Document to deploy watcher-api behind wsgi.

Change-Id: I8f1026f0b09fd774376220c2d117ee66f72421b8
Closes-Bug: #1675376
2017-04-01 19:03:17 +05:30
Yumeng_Bao
fc33e181fc oslo messaging notifications driver update
Replace "messaging" with "messagingv2".

Change-Id: Iab53b5ba8cd58a0655dc35489081fb22d5834363
2017-04-01 18:34:34 +08:00
Yumeng_Bao
a3ee163480 Use tox to generate a sample configuration file
There is no sample configuration file if we don't generate one.

Change-Id: Ibe9005db4fa24b63914fa5f24fe4b144867781cd
2017-04-01 18:26:28 +08:00
Vincent Françoise
334558f17c Added tempest test for workload_stabilization
In this changeset, I added a tempest test that is in charge of
executing the workload_stabilization strategy.

Change-Id: I61bad268fc5895ddb22312baeb21da5ae3c71de9
2017-03-30 07:20:13 +00:00
Santhosh Fernandes
4642a92e78 Add gnocchi support in VM-Workload-Consolidation strategy
This patch adds gnocchi support in VM-Workload-Consolidation strategy
and adds unit tests corresponding to that change.

Change-Id: I4aab158a6b7c92cb9fe8979bb8bd6338c4686b11
Partiallly-Implements: bp gnocchi-watcher
2017-03-29 19:33:55 +05:30
OpenStack Proposal Bot
69c53da298 Updated from global requirements
Change-Id: I07bc3672692faec1dab41e98f7cf6b8fab821a2a
2017-03-29 13:44:56 +00:00
Jenkins
49924e1915 Merge "Use HostAddressOpt for opts that accept IP and hostnames" 2017-03-29 12:05:35 +00:00
Santhosh Fernandes
d53abb7af5 Fix for remove verbose option
This commit[1] has removed verbose option due to which our ut's are failing.
This patch is fixing this issue.

[1] https://review.openstack.org/#/c/444217/

Change-Id: I784a7f855f42de462e8fc8f829f5526e1483dab4
2017-03-29 11:17:43 +05:30
jeremy.zhang
4d3727eafb Use HostAddressOpt for opts that accept IP and hostnames
Some configuration options were accepting both IP addresses
and hostnames. Since there was no specific OSLO opt type to
support this, we were using ``StrOpt``. The change [1] that
added support for ``HostAddressOpt`` type was merged in Ocata
and became available for use with oslo version 3.22.

This patch changes the opt type of configuration options to use
this more relevant opt type - HostAddressOpt.

[1] I77bdb64b7e6e56ce761d76696bc4448a9bd325eb

Change-Id: Idec43189ff8edc539027ba0b0369e54ae883cd2b
2017-03-28 15:22:25 +08:00
Jenkins
4a3c15185c Merge "stale the action plan" 2017-03-27 22:46:30 +00:00
Jenkins
2c6ab9a926 Merge "Add period input parameter to vm workload consolidation and outlet temp control strategy." 2017-03-27 22:46:07 +00:00
Santhosh Fernandes
0750b93827 Add gnocchi support in workload_stabilization strategy
This patch adds gnocchi support in workload_stabilization strategy
and adds unit tests corresponding to that change.

Change-Id: I96bd758962bbf67d60e19a99a19451fb80e447b2
Partiallly-Implements: bp gnocchi-watcher
2017-03-27 23:56:41 +05:30
Pradeep Kumar Singh
a2cb02a861 Prevent the migration of VM with 'optimize' False in VM metadata
This patch adds the functionality to filter out VMs which have
metadata field 'optimize' set to False. This patch implements the
functionality for basic_consolidation strategy.

Change-Id: Iaf7b63e09534e4a67406e7f092242558b78c0bde
Partially-Implements: BP audit-tag-vm-metadata
2017-03-27 10:17:37 +00:00
Santhosh Fernandes
377889859d Add period input parameter to vm workload consolidation and
outlet temp control strategy.

Closes-Bug: #1614021
Change-Id: Iec975e4a4a39168a65ae89ca75a5ca9445c14f9d
2017-03-27 15:06:36 +05:30
Jenkins
54f0758fc3 Merge "Remove log translations" 2017-03-27 08:36:22 +00:00
Jenkins
a644600a18 Merge "Add endpoint_type option for openstack clients." 2017-03-27 07:49:04 +00:00
Jenkins
ca3d367ac7 Merge "Updated from global requirements" 2017-03-27 00:53:08 +00:00
Margarita Shakhova
cde60d2ead Add endpoint_type option for openstack clients.
Interface type internalURL' is used as a default value.

Change-Id: Ia1acbfbfd2a1eecd85e5aa1d2e19665d411c4c58
Closes-Bug: #1671405
2017-03-24 21:12:11 +00:00
Jenkins
f106076d70 Merge "Imported Translations from Zanata" 2017-03-24 20:03:43 +00:00
OpenStack Proposal Bot
e75dbfd776 Updated from global requirements
Change-Id: I74bfd82a835c43d94be6279adbe582f2a0bfa302
2017-03-24 16:38:30 +00:00
Santhosh Fernandes
18aa50c58e Add gnocchi support in basic_consolidation strategy
This patch adds gnocchi support in basic_consolidation strategy
and adds unit tests corresponding to that change.

Change-Id: Ia1ee55fca8eadffbd244c0247577805b6856369d
Partiallly-Implements: bp gnocchi-watcher
2017-03-24 09:09:42 +00:00
Jenkins
2c2120526c Merge "Add Gnocchi datasource" 2017-03-24 09:00:33 +00:00
Jenkins
9e505d3d36 Merge "exception when running 'watcher service list'" 2017-03-24 08:17:51 +00:00
OpenStack Proposal Bot
54ce5f796f Imported Translations from Zanata
For more information about this automatic import see:
http://docs.openstack.org/developer/i18n/reviewing-translation-import.html

Change-Id: I3090e188c8506781fe7260cb99727fab02df1044
2017-03-24 07:41:20 +00:00
yanxubin
f605888e32 Remove log translations
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: I3552767976807a9851af69b1fa4f86ac25943025
2017-03-24 09:46:19 +08:00
Alexander Chadin
0b213a8734 Add Gnocchi datasource
This patch set adds Gnocchi datasource support

Implements: blueprint gnocchi-watcher

Change-Id: I41653149435fd355548071de855586004371c4fc
2017-03-23 13:54:03 +03:00
licanwei
38a3cbc84a exception when running 'watcher service list'
We have two controllers as HA in our OpenStack environment.
There are watcher-applier and watcher-decision-engine in each
controller. So there are two same name in the services table.
In this case, the objects.Service.get_by_name(context, name)
will trigger exception of MultipleResultsFound.
We should use objects.Service.get(context, id) replace of
objects.Service.get_by_name(context, name).

Change-Id: Ic3ce784590d6c2a648cb3b28299744deed281332
Closes-Bug: #1674196
2017-03-22 12:12:31 +08:00
Jenkins
eb038e4af0 Merge "set eager=True for actionplan.list" 2017-03-21 10:19:41 +00:00
Jenkins
b5eccceaed Merge "Remove old oslo.messaging transport aliases" 2017-03-21 09:24:23 +00:00
Jenkins
f7b655b712 Merge "Local copy of scenario test base class" 2017-03-20 13:10:33 +00:00
ChangBo Guo(gcb)
1386ce690f Remove old oslo.messaging transport aliases
Those are remnants from the oslo-incubator times. Also, oslo.messaging
deprecated [1] transport aliases since 5.2.0+ that is the minimal
version supported for stable/newton. The patch that bumped the minimal
version for Watcher landed 3 months+ ago, so we can proceed ripping
those aliases from the code base.

[1] I314cefa5fb1803fa7e21e3e34300e5ced31bba89

Change-Id: Ie3008cc54b0eb3d1d02f55f388bd1c3b109d126d
Closes-Bug: #1424728
2017-03-20 13:23:45 +08:00
licanwei
38e4b48d70 stale the action plan
Check the creation time of the actionplan,
and set the state to SUPERSEDED if it has expired.

Change-Id: I900e8dc5011dec4cffd58913b9c5083a6131d70d
Implements: blueprint stale-action-plan
2017-03-18 13:46:34 +08:00
Andrea Frittoli
56ca542bef Local copy of scenario test base class
The scenario tests base class from Tempest is not a stable interface
and it's going to be refactored on Tempest side, as notified in

http://lists.openstack.org/pipermail/openstack-dev/2017-February/112938.html

Maintain a local copy of the base class, taken from Tempest with head of
master at c5f1064759fe6c75a4bc5dc251ed1661845936cb.

Change-Id: Idfa5ebe18c794c51e406156fb120d128478d4f1e
2017-03-17 17:31:46 +00:00
Jenkins
dafe2ad04b Merge "Use https instead of http" 2017-03-17 09:04:48 +00:00
licanwei
6044b04d33 set eager=True for actionplan.list
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
2017-03-17 16:16:26 +08:00
Yumeng_Bao
6d81ac15b8 Use https instead of http
Currently http is used to access git, however http is not safe enough
since the access information contains our account/password information.
Use https instead of http to ensure the safety.

And for others services such as pypi or python, it's still nice to use
https.

Change-Id: I706a4a1873c6bbc05385057757fc5962344f9371
2017-03-17 07:44:27 +00:00
OpenStack Proposal Bot
db077e872e Updated from global requirements
Change-Id: Id1f3bee0c6cfb5621a7c23d7865247d6ef4217d1
2017-03-16 18:24:19 +00:00
Béla Vancsics
fd55d28d42 Reduced the code complexity
I extracted some of the functionalities into helper functions
to reduce the length and complexity of build_query (in
watcher/datasource/ceilometer.py).
Additionally it became more readable as well, without
changing its functionality.

Change-Id: I9e5c524754cf0f9d718a216465ba1b7536add80e
2017-03-16 07:45:44 +01:00
OpenStack Proposal Bot
51bf7fedb6 Updated from global requirements
Change-Id: Id125d2e27aba257fb026491fc505245f4d7555ba
2017-03-15 12:54:16 +00:00
OpenStack Proposal Bot
bf0fd48659 Updated from global requirements
Change-Id: Id458895286cdaffe66676b68a4f4fd7169c24347
2017-03-15 05:21:56 +00:00
Jenkins
ba98c88303 Merge "Add Action Notification" 2017-03-08 09:58:46 +00:00
OpenStack Proposal Bot
77b406748c Updated from global requirements
Change-Id: I35c23139feb449af69470f8f9e90f82dda516585
2017-03-07 02:08:03 +00:00
Jenkins
d21198da8f Merge "[Fix gate]Update test requirement" 2017-03-06 03:30:47 +00:00
Jenkins
12a7b7171b Merge "Add Apache License content in conf.py file" 2017-03-04 23:16:39 +00:00
Jenkins
d45ab13619 Merge "Adding instance metadata into cluster data model" 2017-03-04 01:54:03 +00:00
Prudhvi Rao Shedimbi
e2d2fc6227 Adding instance metadata into cluster data model
This patch adds instance metadata in the cluster data model. This
is needed for Noisy Neighbor strategy.

Change-Id: Ia92a9f97ba1457ba844cc37a4d443ca4354069e3
2017-03-03 14:52:42 +00:00
yuhui_inspur
3c564ee3d8 Add Apache License content in conf.py file
Change-Id: I84478f02bc7f04ef57334a738fa0b1f3ca0cac45
2017-03-02 23:27:32 -08:00
ricolin
f9ce21a9a9 [Fix gate]Update test requirement
Since pbr already landed and the old version of hacking seems not
work very well with pbr>=2, we should update it to match global
requirement.
Partial-Bug: #1668848

Change-Id: I5de155e6ff255f4ae65deff991cff754f5777a8d
2017-03-03 11:43:53 +08:00
Jenkins
03a2c0142a Merge "Optimize audit process" 2017-03-02 23:25:39 +00:00
Hidekazu Nakamura
5afcf7a7f4 Remove unused PNG files in image_src directory
This patch removes unused PNG files in image_src directory.

Change-Id: Ia65ae07932d238277731a26fddb798b92d06e958
2017-03-01 10:26:14 +09:00
Jenkins
63faf4695e Merge "Fix no endpoints of ceilometer in devstack environment setup." 2017-02-28 01:55:53 +00:00
Jenkins
97800d1553 Merge "Switch to use test_utils.call_until_true" 2017-02-27 23:40:58 +00:00
OpenStack Proposal Bot
8f85169c15 Updated from global requirements
Change-Id: I693764145996f4c941de4b129a73c36e0db839d6
2017-02-27 01:21:44 +00:00
ericxiett
68e4bc4d87 Fix no endpoints of ceilometer in devstack environment setup.
There are not any endpoints for `ceilometer` with devstack/
local.conf.controller. The service `ceilometer-api` should
be enabled explicitly.

Change-Id: I2218a98182001bef65fbc17ae305cfadf341930e
Closes-Bug: #1667678
2017-02-24 21:40:19 +08:00
ericxiett
9e7f7f54f3 Fix some typos in vm_workload_consolidation.py.
Change-Id: I1da1ed89f3e278af05d227d5011c8984218c026f
2017-02-23 16:40:00 +08:00
licanwei
fceab5299b Optimize audit process
In the current audit process, after executing the strategy,
will check whether there are currently running actionplan,
and if so, will set the new actionplan SUPERSEDED.
We can optimize the process to perform this check in pre_execute(),
and if any actionplan is running, no further processing is performed.

Change-Id: I7377b53a2374b1dc177d256a0f800a86b1a2a16b
Closes-Bug: #1663150
2017-02-17 15:01:05 +08:00
Jenkins
dddbb63633 Merge "Adding additional details to notification logs" 2017-02-16 13:25:14 +00:00
Jenkins
b788dfab71 Merge "Fix spelling error in NotificationEndpoint classes." 2017-02-16 13:24:42 +00:00
Jenkins
7824b41e12 Merge "Add SUPERSEDED description" 2017-02-16 13:23:47 +00:00
Jenkins
86ded4d952 Merge "Reactivate watcher dashboard plugin in devstack/local.conf.controller" 2017-02-16 13:04:28 +00:00
Jenkins
5d6e731c42 Merge "Fix that remove 'strategy' attribute does not work." 2017-02-15 14:09:08 +00:00
Jenkins
cba6713bdc Merge "Add checking audit state" 2017-02-15 14:08:59 +00:00
Yumeng_Bao
24ab0469ec Reactivate watcher dashboard plugin in devstack/local.conf.controller
Since watcher dashboard can be sucessfully installed now by devstack,
we should enable this again. Many of us are get the local.conf from
here,so this change is necessary, we can enable watch dashboard plugin
by default.

Change-Id: Iad5081a97515b3f831d2f468dc514a942e6d3420
2017-02-15 17:32:47 +08:00
Jenkins
4d71bb112c Merge "Remove support for py34" 2017-02-14 10:28:34 +00:00
licanwei
fd374d1d30 Add SUPERSEDED description
Add SUPERSEDED description

Change-Id: I05dc12451ecde338d94f99be522a38e7fb042528
2017-02-13 12:23:32 +08:00
Alexander Chadin
25789c9c5a Add Action Notification
This patch set adds the following action notifications:

- action.create
- action.update
- action.delete
- action.execution.start
- action.execution.end
- action.execution.error

Partially Implements: blueprint action-versioned-notifications-api

Change-Id: If0bc25bfb7cb1bff3bfa2c5d5fb9ad48b0794168
2017-02-10 11:43:35 +03:00
Ken'ichi Ohmichi
a9b3534e97 Switch to use test_utils.call_until_true
test.call_until_true has been deprecated since Newton on Tempest side,
and now Tempest provides test_utils.call_until_true as the stable
library method. So this patch switches to use the stable method before
removing old test.call_until_true on Tempest side.

Change-Id: Iba2130aca93c8e6bccb4f8ed169424c791ebc127
Needed-by: Ide11a7434a4714e5d2211af1803333535f557370
2017-02-09 10:50:11 -08:00
Chris Spencer
f80c0c732a Adding additional details to notification logs
Improves tracking independent workflows.  A log adapter
was added to provide an easy means of prepending publisher
ID and event type information.

Change-Id: I5d2d8a369f99497b05c2a683989e656554d01b4f
Closes-Bug: 1642623
2017-02-09 11:26:53 -07:00
Hidekazu Nakamura
0d83354c57 Add checking audit state
This patch adds checking audit state when updating an existing audit
in accordance with audit state machine.

Closes-Bug: #1662406

Change-Id: I20610c83169b77f141974a5cebe33818a4bf0728
2017-02-09 14:23:14 +09:00
licanwei
67d44eb118 Fix the mapping between the instance and the node
The argument to the add_edge function should be instance.uuid
and node.uuid, not instance and node

Change-Id: Ida694f9158d3eb26e7f31062a18844472ea3c6fa
Closes-Bug: #1662810
2017-02-08 17:41:47 +08:00
Cao Xuan Hoang
8c1757f86d Remove support for py34
The gating on python 3.4 is restricted to <= Mitaka. This is due to
the change from Ubuntu Trusty to Xenial, where only python3.5 is
available. There is no need to continue to keep these settings.

Change-Id: I3b3f0b08f6f27322b8a9d99eb25984ccd6bfe7a6
2017-02-08 11:09:30 +07:00
ericxiett
e55c73be0e Fix that remove 'strategy' attribute does not work.
The 'strategy_id' attribute is the one that not exposes
to API. But the 'PATCH' API always update this attribute.
So this change does not work when choose 'remove' op.
This patch sets value for 'strategy_id' attribute.

Change-Id: I1597fb5d4985bb8271ad3cea7ea5f0adb7de65f4
Closes-Bug: #1662395
2017-02-08 10:57:26 +08:00
Chris Spencer
04c9e0362e Fix spelling error in NotificationEndpoint classes.
Change-Id: I47dc2d73b8e7c4adaa9622de932c0d8abcd17d87
2017-02-07 15:36:50 -07:00
Jenkins
8ceb710b59 Merge "Fix incorrect auto trigger flag" 2017-02-07 16:04:33 +00:00
Hidekazu Nakamura
58711aaaec Fix log level error to warning
When action plan is currently running, new action plan is set as
SUPERSEDED and error log reported. This patch changes log level
from error to warning.

Change-Id: I931218843d8f09340bd5363256164807d514446b
Closes-Bug: #1662450
2017-02-07 17:48:56 +09:00
licanwei
3ad5261d2a Fix incorrect auto trigger flag
'watcher audit list' returns a incorrect auto trigger flag
auto_trigger field is incorrectly unset to False

Change-Id: Iba4a0bda1acf18cbfde6f1dcdb0985a4c3f7b5bb
Closes-Bug: #1662051
2017-02-06 14:42:44 +08:00
Jenkins
26c7726c00 Merge "Using items() instead of six.iteritems()" 2017-02-03 09:33:24 +00:00
zhuzeyu
5b2cdb53a8 Using items() instead of six.iteritems()
We'd better not use six.iteritems(), read follow doc
http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Change-Id: I32aff3ad0cc936c6b623db313b6f6a0790cbc7fb
2017-02-03 17:01:40 +08:00
Jenkins
4b5dce51dc Merge "Use RPC cast() to be asynchronous" 2017-02-03 08:48:56 +00:00
OpenStack Release Bot
b6a96e04aa Update reno for stable/ocata
Change-Id: I6c75072180fcbd449d9049ae1f2258a53a236ebd
2017-02-02 18:23:37 +00:00
Vincent Françoise
65f9646eae Use RPC cast() to be asynchronous
Change-Id: I54814dc37a79eb06386923f946d85a67894c7646
2017-02-01 14:40:10 +01:00
410 changed files with 15535 additions and 5191 deletions

13
.gitignore vendored
View File

@@ -4,8 +4,7 @@
*.so
# Packages
*.egg
*.egg-info
*.egg*
dist
build
eggs
@@ -25,6 +24,7 @@ pip-log.txt
.coverage*
.tox
nosetests.xml
.stestr/
.testrepository
.venv
.idea
@@ -43,9 +43,11 @@ output/*/index.html
# Sphinx
doc/build
doc/source/api
doc/source/api/*
doc/source/samples
doc/source/watcher.conf.sample
doc/source/_static/*.sample
!doc/source/api/index.rst
!doc/source/api/v1.rst
# pbr generates these
AUTHORS
@@ -71,3 +73,6 @@ releasenotes/build
# Desktop Service Store
*.DS_Store
# Autogenerated sample config file
etc/watcher/watcher.conf.sample

4
.stestr.conf Normal file
View File

@@ -0,0 +1,4 @@
[DEFAULT]
test_path=${OS_TEST_PATH:-./watcher/tests}
top_dir=./

39
.zuul.yaml Normal file
View File

@@ -0,0 +1,39 @@
- project:
name: openstack/watcher
check:
jobs:
- watcher-tempest-multinode
- legacy-rally-dsvm-watcher-rally
- job:
name: watcher-tempest-base-multinode
parent: legacy-dsvm-base-multinode
run: playbooks/legacy/watcher-tempest-base-multinode/run.yaml
post-run: playbooks/legacy/watcher-tempest-base-multinode/post.yaml
timeout: 4200
required-projects:
- openstack-infra/devstack-gate
- openstack/python-openstackclient
- openstack/python-watcherclient
- openstack/watcher
- openstack/watcher-tempest-plugin
nodeset: legacy-ubuntu-xenial-2-node
- job:
name: watcher-tempest-multinode
parent: watcher-tempest-base-multinode
voting: false
- job:
# This job is used by python-watcherclient repo
name: watcherclient-tempest-functional
parent: legacy-dsvm-base
run: playbooks/legacy/watcherclient-tempest-functional/run.yaml
post-run: playbooks/legacy/watcherclient-tempest-functional/post.yaml
timeout: 4200
required-projects:
- openstack-dev/devstack
- openstack-infra/devstack-gate
- openstack/python-openstackclient
- openstack/python-watcherclient
- openstack/watcher

View File

@@ -1,13 +1,13 @@
If you would like to contribute to the development of OpenStack,
you must follow the steps in this page:
http://docs.openstack.org/infra/manual/developers.html
https://docs.openstack.org/infra/manual/developers.html
Once those steps have been completed, changes to OpenStack
should be submitted for review via the Gerrit tool, following
the workflow documented at:
http://docs.openstack.org/infra/manual/developers.html#development-workflow
https://docs.openstack.org/infra/manual/developers.html#development-workflow
Pull requests submitted through GitHub will be ignored.

View File

@@ -8,4 +8,4 @@
watcher Style Commandments
==========================
Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/
Read the OpenStack Style Commandments https://docs.openstack.org/developer/hacking/

View File

@@ -2,8 +2,8 @@
Team and repository tags
========================
.. image:: http://governance.openstack.org/badges/watcher.svg
:target: http://governance.openstack.org/reference/tags/index.html
.. image:: https://governance.openstack.org/badges/watcher.svg
:target: https://governance.openstack.org/reference/tags/index.html
.. Change things from this point on
@@ -25,7 +25,7 @@ operating costs, increased system performance via intelligent virtual machine
migration, increased energy efficiency-and more!
* Free software: Apache license
* Wiki: http://wiki.openstack.org/wiki/Watcher
* Wiki: https://wiki.openstack.org/wiki/Watcher
* Source: https://github.com/openstack/watcher
* Bugs: http://bugs.launchpad.net/watcher
* Documentation: http://docs.openstack.org/developer/watcher/
* Bugs: https://bugs.launchpad.net/watcher
* Documentation: https://docs.openstack.org/watcher/latest/

View File

@@ -0,0 +1,42 @@
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# This is an example Apache2 configuration file for using the
# Watcher API through mod_wsgi. This version assumes you are
# running devstack to configure the software.
Listen %WATCHER_SERVICE_PORT%
<VirtualHost *:%WATCHER_SERVICE_PORT%>
WSGIDaemonProcess watcher-api user=%USER% processes=%APIWORKERS% threads=1 display-name=%{GROUP}
WSGIScriptAlias / %WATCHER_WSGI_DIR%/app.wsgi
WSGIApplicationGroup %{GLOBAL}
WSGIProcessGroup watcher-api
WSGIPassAuthorization On
ErrorLogFormat "%M"
ErrorLog /var/log/%APACHE_NAME%/watcher-api.log
CustomLog /var/log/%APACHE_NAME%/watcher-api-access.log combined
<Directory %WATCHER_WSGI_DIR%>
WSGIProcessGroup watcher-api
WSGIApplicationGroup %{GLOBAL}
<IfVersion >= 2.4>
Require all granted
</IfVersion>
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
</Directory>
</VirtualHost>

View File

@@ -44,6 +44,9 @@ WATCHER_CONF_DIR=/etc/watcher
WATCHER_CONF=$WATCHER_CONF_DIR/watcher.conf
WATCHER_POLICY_JSON=$WATCHER_CONF_DIR/policy.json
WATCHER_DEVSTACK_DIR=$WATCHER_DIR/devstack
WATCHER_DEVSTACK_FILES_DIR=$WATCHER_DEVSTACK_DIR/files
NOVA_CONF_DIR=/etc/nova
NOVA_CONF=$NOVA_CONF_DIR/nova.conf
@@ -51,6 +54,13 @@ if is_ssl_enabled_service "watcher" || is_service_enabled tls-proxy; then
WATCHER_SERVICE_PROTOCOL="https"
fi
WATCHER_USE_MOD_WSGI=$(trueorfalse True WATCHER_USE_MOD_WSGI)
if is_suse; then
WATCHER_WSGI_DIR=${WATCHER_WSGI_DIR:-/srv/www/htdocs/watcher}
else
WATCHER_WSGI_DIR=${WATCHER_WSGI_DIR:-/var/www/watcher}
fi
# Public facing bits
WATCHER_SERVICE_HOST=${WATCHER_SERVICE_HOST:-$HOST_IP}
WATCHER_SERVICE_PORT=${WATCHER_SERVICE_PORT:-9322}
@@ -74,10 +84,21 @@ function is_watcher_enabled {
return 1
}
#_cleanup_watcher_apache_wsgi - Remove wsgi files,
#disable and remove apache vhost file
function _cleanup_watcher_apache_wsgi {
sudo rm -rf $WATCHER_WSGI_DIR
sudo rm -f $(apache_site_config_for watcher-api)
restart_apache_server
}
# cleanup_watcher() - Remove residual data files, anything left over from previous
# runs that a clean run would need to clean up
function cleanup_watcher {
sudo rm -rf $WATCHER_STATE_PATH $WATCHER_AUTH_CACHE_DIR
if [[ "$WATCHER_USE_MOD_WSGI" == "True" ]]; then
_cleanup_watcher_apache_wsgi
fi
}
# configure_watcher() - Set config files, create data dirs, etc
@@ -108,6 +129,28 @@ function create_watcher_accounts {
"$WATCHER_SERVICE_PROTOCOL://$WATCHER_SERVICE_HOST:$WATCHER_SERVICE_PORT"
}
# _config_watcher_apache_wsgi() - Set WSGI config files of watcher
function _config_watcher_apache_wsgi {
local watcher_apache_conf
if [[ "$WATCHER_USE_MOD_WSGI" == "True" ]]; then
sudo mkdir -p $WATCHER_WSGI_DIR
sudo cp $WATCHER_DIR/watcher/api/app.wsgi $WATCHER_WSGI_DIR/app.wsgi
watcher_apache_conf=$(apache_site_config_for watcher-api)
sudo cp $WATCHER_DEVSTACK_FILES_DIR/apache-watcher-api.template $watcher_apache_conf
sudo sed -e "
s|%WATCHER_SERVICE_PORT%|$WATCHER_SERVICE_PORT|g;
s|%WATCHER_WSGI_DIR%|$WATCHER_WSGI_DIR|g;
s|%USER%|$STACK_USER|g;
s|%APIWORKERS%|$API_WORKERS|g;
s|%APACHE_NAME%|$APACHE_NAME|g;
" -i $watcher_apache_conf
enable_apache_site watcher-api
tail_log watcher-access /var/log/$APACHE_NAME/watcher-api-access.log
tail_log watcher-api /var/log/$APACHE_NAME/watcher-api.log
fi
}
# create_watcher_conf() - Create a new watcher.conf file
function create_watcher_conf {
# (Re)create ``watcher.conf``
@@ -126,7 +169,7 @@ function create_watcher_conf {
iniset $WATCHER_CONF oslo_messaging_rabbit rabbit_password $RABBIT_PASSWORD
iniset $WATCHER_CONF oslo_messaging_rabbit rabbit_host $RABBIT_HOST
iniset $WATCHER_CONF oslo_messaging_notifications driver "messaging"
iniset $WATCHER_CONF oslo_messaging_notifications driver "messagingv2"
iniset $NOVA_CONF oslo_messaging_notifications topics "notifications,watcher_notifications"
iniset $NOVA_CONF notifications notify_on_state_change "vm_and_task_state"
@@ -154,9 +197,13 @@ function create_watcher_conf {
setup_colorized_logging $WATCHER_CONF DEFAULT
else
# Show user_name and project_name instead of user_id and project_id
iniset $WATCHER_CONF DEFAULT logging_context_format_string "%(asctime)s.%(msecs)03d %(levelname)s %(name)s [%(request_id)s %(user_name)s %(project_name)s] %(instance)s%(message)s"
iniset $WATCHER_CONF DEFAULT logging_context_format_string "%(asctime)s.%(msecs)03d %(levelname)s %(name)s [%(request_id)s %(project_domain)s %(user_name)s %(project_name)s] %(instance)s%(message)s"
fi
#config apache files
if [[ "$WATCHER_USE_MOD_WSGI" == "True" ]]; then
_config_watcher_apache_wsgi
fi
# Register SSL certificates if provided
if is_ssl_enabled_service watcher; then
ensure_certificates WATCHER
@@ -188,7 +235,7 @@ function init_watcher {
recreate_database watcher
# Create watcher schema
$WATCHER_BIN_DIR/watcher-db-manage --config-file $WATCHER_CONF upgrade head
$WATCHER_BIN_DIR/watcher-db-manage --config-file $WATCHER_CONF upgrade
fi
create_watcher_cache_dir
}
@@ -205,19 +252,26 @@ function install_watcherclient {
function install_watcher {
git_clone $WATCHER_REPO $WATCHER_DIR $WATCHER_BRANCH
setup_develop $WATCHER_DIR
if [[ "$WATCHER_USE_MOD_WSGI" == "True" ]]; then
install_apache_wsgi
fi
}
# start_watcher_api() - Start the API process ahead of other things
function start_watcher_api {
# Get right service port for testing
local service_port=$WATCHER_SERVICE_PORT
local service_protocol=$WATCHER_SERVICE_PROTOCOL
if is_service_enabled tls-proxy; then
service_port=$WATCHER_SERVICE_PORT_INT
service_protocol="http"
fi
run_process watcher-api "$WATCHER_BIN_DIR/watcher-api --config-file $WATCHER_CONF"
if [[ "$WATCHER_USE_MOD_WSGI" == "True" ]]; then
restart_apache_server
else
run_process watcher-api "$WATCHER_BIN_DIR/watcher-api --config-file $WATCHER_CONF"
fi
echo "Waiting for watcher-api to start..."
if ! wait_for_service $SERVICE_TIMEOUT $service_protocol://$WATCHER_SERVICE_HOST:$service_port; then
die $LINENO "watcher-api did not start"
@@ -240,7 +294,12 @@ function start_watcher {
# stop_watcher() - Stop running processes (non-screen)
function stop_watcher {
for serv in watcher-api watcher-decision-engine watcher-applier; do
if [[ "$WATCHER_USE_MOD_WSGI" == "True" ]]; then
disable_apache_site watcher-api
else
stop_process watcher-api
fi
for serv in watcher-decision-engine watcher-applier; do
stop_process $serv
done
}

View File

@@ -25,7 +25,7 @@ GLANCE_HOSTPORT=${SERVICE_HOST}:9292
DATABASE_TYPE=mysql
# Enable services (including neutron)
ENABLED_SERVICES=n-cpu,n-api-meta,c-vol,q-agt
ENABLED_SERVICES=n-cpu,n-api-meta,c-vol,q-agt,placement-client
NOVA_VNC_ENABLED=True
NOVNCPROXY_URL="http://$SERVICE_HOST:6080/vnc_auto.html"

View File

@@ -17,18 +17,15 @@ NETWORK_GATEWAY=10.254.1.1 # Change this for your network
MULTI_HOST=1
#Set this to FALSE if do not want to run watcher-api behind mod-wsgi
#WATCHER_USE_MOD_WSGI=TRUE
# This is the controller node, so disable nova-compute
disable_service n-cpu
# Disable nova-network and use neutron instead
disable_service n-net
ENABLED_SERVICES+=,q-svc,q-dhcp,q-meta,q-agt,q-l3,neutron
# Enable remote console access
enable_service n-cauth
# Enable the Watcher Dashboard plugin
# enable_plugin watcher-dashboard git://git.openstack.org/openstack/watcher-dashboard
enable_plugin watcher-dashboard git://git.openstack.org/openstack/watcher-dashboard
# Enable the Watcher plugin
enable_plugin watcher git://git.openstack.org/openstack/watcher
@@ -39,6 +36,12 @@ enable_plugin ceilometer git://git.openstack.org/openstack/ceilometer
# This is the controller node, so disable the ceilometer compute agent
disable_service ceilometer-acompute
# Enable the ceilometer api explicitly(bug:1667678)
enable_service ceilometer-api
# Enable the Gnocchi plugin
enable_plugin gnocchi https://github.com/gnocchixyz/gnocchi
LOGFILE=$DEST/logs/stack.sh.log
LOGDAYS=2

View File

@@ -7,7 +7,7 @@ _XTRACE_WATCHER_PLUGIN=$(set +o | grep xtrace)
set -o xtrace
echo_summary "watcher's plugin.sh was called..."
source $DEST/watcher/devstack/lib/watcher
. $DEST/watcher/devstack/lib/watcher
# Show all of defined environment variables
(set -o posix; set)

View File

@@ -22,7 +22,7 @@ from docutils import nodes
from docutils.parsers import rst
from docutils import statemachine
from watcher.version import version_info
from watcher.version import version_string
class BaseWatcherDirective(rst.Directive):
@@ -169,4 +169,4 @@ class WatcherFunc(BaseWatcherDirective):
def setup(app):
app.add_directive('watcher-term', WatcherTerm)
app.add_directive('watcher-func', WatcherFunc)
return {'version': version_info.version_string()}
return {'version': version_string}

View File

@@ -0,0 +1,41 @@
{
"priority": "INFO",
"payload": {
"watcher_object.namespace": "watcher",
"watcher_object.version": "1.0",
"watcher_object.name": "ActionCancelPayload",
"watcher_object.data": {
"uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"input_parameters": {
"param2": 2,
"param1": 1
},
"fault": null,
"created_at": "2016-10-18T09:52:05Z",
"updated_at": null,
"state": "CANCELLED",
"action_plan": {
"watcher_object.namespace": "watcher",
"watcher_object.version": "1.0",
"watcher_object.name": "TerseActionPlanPayload",
"watcher_object.data": {
"uuid": "76be87bd-3422-43f9-93a0-e85a577e3061",
"global_efficacy": [],
"created_at": "2016-10-18T09:52:05Z",
"updated_at": null,
"state": "CANCELLING",
"audit_uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"strategy_uuid": "cb3d0b58-4415-4d90-b75b-1e96878730e3",
"deleted_at": null
}
},
"parents": [],
"action_type": "nop",
"deleted_at": null
}
},
"event_type": "action.cancel.end",
"publisher_id": "infra-optim:node0",
"timestamp": "2017-01-01 00:00:00.000000",
"message_id": "530b409c-9b6b-459b-8f08-f93dbfeb4d41"
}

View File

@@ -0,0 +1,51 @@
{
"priority": "ERROR",
"payload": {
"watcher_object.namespace": "watcher",
"watcher_object.version": "1.0",
"watcher_object.name": "ActionCancelPayload",
"watcher_object.data": {
"uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"input_parameters": {
"param2": 2,
"param1": 1
},
"fault": {
"watcher_object.namespace": "watcher",
"watcher_object.version": "1.0",
"watcher_object.name": "ExceptionPayload",
"watcher_object.data": {
"module_name": "watcher.tests.notifications.test_action_notification",
"exception": "WatcherException",
"exception_message": "TEST",
"function_name": "test_send_action_cancel_with_error"
}
},
"created_at": "2016-10-18T09:52:05Z",
"updated_at": null,
"state": "FAILED",
"action_plan": {
"watcher_object.namespace": "watcher",
"watcher_object.version": "1.0",
"watcher_object.name": "TerseActionPlanPayload",
"watcher_object.data": {
"uuid": "76be87bd-3422-43f9-93a0-e85a577e3061",
"global_efficacy": [],
"created_at": "2016-10-18T09:52:05Z",
"updated_at": null,
"state": "CANCELLING",
"audit_uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"strategy_uuid": "cb3d0b58-4415-4d90-b75b-1e96878730e3",
"deleted_at": null
}
},
"parents": [],
"action_type": "nop",
"deleted_at": null
}
},
"event_type": "action.cancel.error",
"publisher_id": "infra-optim:node0",
"timestamp": "2017-01-01 00:00:00.000000",
"message_id": "530b409c-9b6b-459b-8f08-f93dbfeb4d41"
}

View File

@@ -0,0 +1,41 @@
{
"priority": "INFO",
"payload": {
"watcher_object.namespace": "watcher",
"watcher_object.version": "1.0",
"watcher_object.name": "ActionCancelPayload",
"watcher_object.data": {
"uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"input_parameters": {
"param2": 2,
"param1": 1
},
"fault": null,
"created_at": "2016-10-18T09:52:05Z",
"updated_at": null,
"state": "CANCELLING",
"action_plan": {
"watcher_object.namespace": "watcher",
"watcher_object.version": "1.0",
"watcher_object.name": "TerseActionPlanPayload",
"watcher_object.data": {
"uuid": "76be87bd-3422-43f9-93a0-e85a577e3061",
"global_efficacy": [],
"created_at": "2016-10-18T09:52:05Z",
"updated_at": null,
"state": "CANCELLING",
"audit_uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"strategy_uuid": "cb3d0b58-4415-4d90-b75b-1e96878730e3",
"deleted_at": null
}
},
"parents": [],
"action_type": "nop",
"deleted_at": null
}
},
"event_type": "action.cancel.start",
"publisher_id": "infra-optim:node0",
"timestamp": "2017-01-01 00:00:00.000000",
"message_id": "530b409c-9b6b-459b-8f08-f93dbfeb4d41"
}

View File

@@ -0,0 +1,40 @@
{
"priority": "INFO",
"payload": {
"watcher_object.namespace": "watcher",
"watcher_object.version": "1.0",
"watcher_object.name": "ActionCreatePayload",
"watcher_object.data": {
"uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"input_parameters": {
"param2": 2,
"param1": 1
},
"created_at": "2016-10-18T09:52:05Z",
"updated_at": null,
"state": "PENDING",
"action_plan": {
"watcher_object.namespace": "watcher",
"watcher_object.version": "1.0",
"watcher_object.name": "TerseActionPlanPayload",
"watcher_object.data": {
"uuid": "76be87bd-3422-43f9-93a0-e85a577e3061",
"global_efficacy": {},
"created_at": "2016-10-18T09:52:05Z",
"updated_at": null,
"state": "ONGOING",
"audit_uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"strategy_uuid": "cb3d0b58-4415-4d90-b75b-1e96878730e3",
"deleted_at": null
}
},
"parents": [],
"action_type": "nop",
"deleted_at": null
}
},
"publisher_id": "infra-optim:node0",
"timestamp": "2017-01-01 00:00:00.000000",
"event_type": "action.create",
"message_id": "530b409c-9b6b-459b-8f08-f93dbfeb4d41"
}

View File

@@ -0,0 +1,40 @@
{
"priority": "INFO",
"payload": {
"watcher_object.namespace": "watcher",
"watcher_object.version": "1.0",
"watcher_object.name": "ActionDeletePayload",
"watcher_object.data": {
"uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"input_parameters": {
"param2": 2,
"param1": 1
},
"created_at": "2016-10-18T09:52:05Z",
"updated_at": null,
"state": "DELETED",
"action_plan": {
"watcher_object.namespace": "watcher",
"watcher_object.version": "1.0",
"watcher_object.name": "TerseActionPlanPayload",
"watcher_object.data": {
"uuid": "76be87bd-3422-43f9-93a0-e85a577e3061",
"global_efficacy": {},
"created_at": "2016-10-18T09:52:05Z",
"updated_at": null,
"state": "ONGOING",
"audit_uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"strategy_uuid": "cb3d0b58-4415-4d90-b75b-1e96878730e3",
"deleted_at": null
}
},
"parents": [],
"action_type": "nop",
"deleted_at": null
}
},
"publisher_id": "infra-optim:node0",
"timestamp": "2017-01-01 00:00:00.000000",
"event_type": "action.delete",
"message_id": "530b409c-9b6b-459b-8f08-f93dbfeb4d41"
}

View File

@@ -0,0 +1,41 @@
{
"priority": "INFO",
"payload": {
"watcher_object.namespace": "watcher",
"watcher_object.version": "1.0",
"watcher_object.name": "ActionExecutionPayload",
"watcher_object.data": {
"uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"input_parameters": {
"param2": 2,
"param1": 1
},
"fault": null,
"created_at": "2016-10-18T09:52:05Z",
"updated_at": null,
"state": "SUCCEEDED",
"action_plan": {
"watcher_object.namespace": "watcher",
"watcher_object.version": "1.0",
"watcher_object.name": "TerseActionPlanPayload",
"watcher_object.data": {
"uuid": "76be87bd-3422-43f9-93a0-e85a577e3061",
"global_efficacy": [],
"created_at": "2016-10-18T09:52:05Z",
"updated_at": null,
"state": "ONGOING",
"audit_uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"strategy_uuid": "cb3d0b58-4415-4d90-b75b-1e96878730e3",
"deleted_at": null
}
},
"parents": [],
"action_type": "nop",
"deleted_at": null
}
},
"event_type": "action.execution.end",
"publisher_id": "infra-optim:node0",
"timestamp": "2017-01-01 00:00:00.000000",
"message_id": "530b409c-9b6b-459b-8f08-f93dbfeb4d41"
}

View File

@@ -0,0 +1,51 @@
{
"priority": "ERROR",
"payload": {
"watcher_object.namespace": "watcher",
"watcher_object.version": "1.0",
"watcher_object.name": "ActionExecutionPayload",
"watcher_object.data": {
"uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"input_parameters": {
"param2": 2,
"param1": 1
},
"fault": {
"watcher_object.namespace": "watcher",
"watcher_object.version": "1.0",
"watcher_object.name": "ExceptionPayload",
"watcher_object.data": {
"module_name": "watcher.tests.notifications.test_action_notification",
"exception": "WatcherException",
"exception_message": "TEST",
"function_name": "test_send_action_execution_with_error"
}
},
"created_at": "2016-10-18T09:52:05Z",
"updated_at": null,
"state": "FAILED",
"action_plan": {
"watcher_object.namespace": "watcher",
"watcher_object.version": "1.0",
"watcher_object.name": "TerseActionPlanPayload",
"watcher_object.data": {
"uuid": "76be87bd-3422-43f9-93a0-e85a577e3061",
"global_efficacy":[],
"created_at": "2016-10-18T09:52:05Z",
"updated_at": null,
"state": "ONGOING",
"audit_uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"strategy_uuid": "cb3d0b58-4415-4d90-b75b-1e96878730e3",
"deleted_at": null
}
},
"parents": [],
"action_type": "nop",
"deleted_at": null
}
},
"event_type": "action.execution.error",
"publisher_id": "infra-optim:node0",
"timestamp": "2017-01-01 00:00:00.000000",
"message_id": "530b409c-9b6b-459b-8f08-f93dbfeb4d41"
}

View File

@@ -0,0 +1,41 @@
{
"priority": "INFO",
"payload": {
"watcher_object.namespace": "watcher",
"watcher_object.version": "1.0",
"watcher_object.name": "ActionExecutionPayload",
"watcher_object.data": {
"uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"input_parameters": {
"param2": 2,
"param1": 1
},
"fault": null,
"created_at": "2016-10-18T09:52:05Z",
"updated_at": null,
"state": "ONGOING",
"action_plan": {
"watcher_object.namespace": "watcher",
"watcher_object.version": "1.0",
"watcher_object.name": "TerseActionPlanPayload",
"watcher_object.data": {
"uuid": "76be87bd-3422-43f9-93a0-e85a577e3061",
"global_efficacy": [],
"created_at": "2016-10-18T09:52:05Z",
"updated_at": null,
"state": "ONGOING",
"audit_uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"strategy_uuid": "cb3d0b58-4415-4d90-b75b-1e96878730e3",
"deleted_at": null
}
},
"parents": [],
"action_type": "nop",
"deleted_at": null
}
},
"event_type": "action.execution.start",
"publisher_id": "infra-optim:node0",
"timestamp": "2017-01-01 00:00:00.000000",
"message_id": "530b409c-9b6b-459b-8f08-f93dbfeb4d41"
}

View File

@@ -0,0 +1,49 @@
{
"priority": "INFO",
"payload": {
"watcher_object.namespace": "watcher",
"watcher_object.version": "1.0",
"watcher_object.name": "ActionUpdatePayload",
"watcher_object.data": {
"uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"input_parameters": {
"param2": 2,
"param1": 1
},
"created_at": "2016-10-18T09:52:05Z",
"updated_at": null,
"state_update": {
"watcher_object.namespace": "watcher",
"watcher_object.version": "1.0",
"watcher_object.name": "ActionStateUpdatePayload",
"watcher_object.data": {
"old_state": "PENDING",
"state": "ONGOING"
}
},
"state": "ONGOING",
"action_plan": {
"watcher_object.namespace": "watcher",
"watcher_object.version": "1.0",
"watcher_object.name": "TerseActionPlanPayload",
"watcher_object.data": {
"uuid": "76be87bd-3422-43f9-93a0-e85a577e3061",
"global_efficacy": {},
"created_at": "2016-10-18T09:52:05Z",
"updated_at": null,
"state": "ONGOING",
"audit_uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"strategy_uuid": "cb3d0b58-4415-4d90-b75b-1e96878730e3",
"deleted_at": null
}
},
"parents": [],
"action_type": "nop",
"deleted_at": null
}
},
"event_type": "action.update",
"publisher_id": "infra-optim:node0",
"timestamp": "2017-01-01 00:00:00.000000",
"message_id": "530b409c-9b6b-459b-8f08-f93dbfeb4d41"
}

View File

@@ -0,0 +1,55 @@
{
"event_type": "action_plan.cancel.end",
"payload": {
"watcher_object.namespace": "watcher",
"watcher_object.name": "ActionPlanCancelPayload",
"watcher_object.version": "1.0",
"watcher_object.data": {
"created_at": "2016-10-18T09:52:05Z",
"deleted_at": null,
"audit_uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"audit": {
"watcher_object.namespace": "watcher",
"watcher_object.name": "TerseAuditPayload",
"watcher_object.version": "1.0",
"watcher_object.data": {
"created_at": "2016-10-18T09:52:05Z",
"deleted_at": null,
"uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"goal_uuid": "bc830f84-8ae3-4fc6-8bc6-e3dd15e8b49a",
"strategy_uuid": "75234dfe-87e3-4f11-a0e0-3c3305d86a39",
"scope": [],
"audit_type": "ONESHOT",
"state": "SUCCEEDED",
"parameters": {},
"interval": null,
"updated_at": null
}
},
"uuid": "76be87bd-3422-43f9-93a0-e85a577e3061",
"fault": null,
"state": "CANCELLED",
"global_efficacy": [],
"strategy_uuid": "cb3d0b58-4415-4d90-b75b-1e96878730e3",
"strategy": {
"watcher_object.namespace": "watcher",
"watcher_object.name": "StrategyPayload",
"watcher_object.version": "1.0",
"watcher_object.data": {
"created_at": "2016-10-18T09:52:05Z",
"deleted_at": null,
"name": "TEST",
"uuid": "cb3d0b58-4415-4d90-b75b-1e96878730e3",
"parameters_spec": {},
"display_name": "test strategy",
"updated_at": null
}
},
"updated_at": null
}
},
"priority": "INFO",
"message_id": "3984dc2b-8aef-462b-a220-8ae04237a56e",
"timestamp": "2016-10-18 09:52:05.219414",
"publisher_id": "infra-optim:node0"
}

View File

@@ -0,0 +1,65 @@
{
"event_type": "action_plan.cancel.error",
"publisher_id": "infra-optim:node0",
"priority": "ERROR",
"message_id": "9a45c5ae-0e21-4300-8fa0-5555d52a66d9",
"payload": {
"watcher_object.version": "1.0",
"watcher_object.namespace": "watcher",
"watcher_object.name": "ActionPlanCancelPayload",
"watcher_object.data": {
"fault": {
"watcher_object.version": "1.0",
"watcher_object.namespace": "watcher",
"watcher_object.name": "ExceptionPayload",
"watcher_object.data": {
"exception_message": "TEST",
"module_name": "watcher.tests.notifications.test_action_plan_notification",
"function_name": "test_send_action_plan_cancel_with_error",
"exception": "WatcherException"
}
},
"uuid": "76be87bd-3422-43f9-93a0-e85a577e3061",
"created_at": "2016-10-18T09:52:05Z",
"strategy_uuid": "cb3d0b58-4415-4d90-b75b-1e96878730e3",
"strategy": {
"watcher_object.version": "1.0",
"watcher_object.namespace": "watcher",
"watcher_object.name": "StrategyPayload",
"watcher_object.data": {
"uuid": "cb3d0b58-4415-4d90-b75b-1e96878730e3",
"created_at": "2016-10-18T09:52:05Z",
"name": "TEST",
"updated_at": null,
"display_name": "test strategy",
"parameters_spec": {},
"deleted_at": null
}
},
"updated_at": null,
"deleted_at": null,
"audit_uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"audit": {
"watcher_object.version": "1.0",
"watcher_object.namespace": "watcher",
"watcher_object.name": "TerseAuditPayload",
"watcher_object.data": {
"parameters": {},
"uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"goal_uuid": "bc830f84-8ae3-4fc6-8bc6-e3dd15e8b49a",
"strategy_uuid": "75234dfe-87e3-4f11-a0e0-3c3305d86a39",
"created_at": "2016-10-18T09:52:05Z",
"scope": [],
"updated_at": null,
"audit_type": "ONESHOT",
"interval": null,
"deleted_at": null,
"state": "SUCCEEDED"
}
},
"global_efficacy": [],
"state": "CANCELLING"
}
},
"timestamp": "2016-10-18 09:52:05.219414"
}

View File

@@ -0,0 +1,55 @@
{
"event_type": "action_plan.cancel.start",
"payload": {
"watcher_object.namespace": "watcher",
"watcher_object.name": "ActionPlanCancelPayload",
"watcher_object.version": "1.0",
"watcher_object.data": {
"created_at": "2016-10-18T09:52:05Z",
"deleted_at": null,
"audit_uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"audit": {
"watcher_object.namespace": "watcher",
"watcher_object.name": "TerseAuditPayload",
"watcher_object.version": "1.0",
"watcher_object.data": {
"created_at": "2016-10-18T09:52:05Z",
"deleted_at": null,
"uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"goal_uuid": "bc830f84-8ae3-4fc6-8bc6-e3dd15e8b49a",
"strategy_uuid": "75234dfe-87e3-4f11-a0e0-3c3305d86a39",
"scope": [],
"audit_type": "ONESHOT",
"state": "SUCCEEDED",
"parameters": {},
"interval": null,
"updated_at": null
}
},
"uuid": "76be87bd-3422-43f9-93a0-e85a577e3061",
"fault": null,
"state": "CANCELLING",
"global_efficacy": [],
"strategy_uuid": "cb3d0b58-4415-4d90-b75b-1e96878730e3",
"strategy": {
"watcher_object.namespace": "watcher",
"watcher_object.name": "StrategyPayload",
"watcher_object.version": "1.0",
"watcher_object.data": {
"created_at": "2016-10-18T09:52:05Z",
"deleted_at": null,
"name": "TEST",
"uuid": "cb3d0b58-4415-4d90-b75b-1e96878730e3",
"parameters_spec": {},
"display_name": "test strategy",
"updated_at": null
}
},
"updated_at": null
}
},
"priority": "INFO",
"message_id": "3984dc2b-8aef-462b-a220-8ae04237a56e",
"timestamp": "2016-10-18 09:52:05.219414",
"publisher_id": "infra-optim:node0"
}

View File

@@ -23,6 +23,7 @@
"audit": {
"watcher_object.version": "1.0",
"watcher_object.data": {
"name": "my_audit",
"audit_type": "ONESHOT",
"scope": [],
"uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",

View File

@@ -8,6 +8,7 @@
"audit_uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"audit": {
"watcher_object.data": {
"name": "my_audit",
"uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"goal_uuid": "bc830f84-8ae3-4fc6-8bc6-e3dd15e8b49a",
"strategy_uuid": "75234dfe-87e3-4f11-a0e0-3c3305d86a39",

View File

@@ -15,6 +15,7 @@
"watcher_object.data": {
"created_at": "2016-10-18T09:52:05Z",
"deleted_at": null,
"name": "my_audit",
"uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"goal_uuid": "bc830f84-8ae3-4fc6-8bc6-e3dd15e8b49a",
"strategy_uuid": "75234dfe-87e3-4f11-a0e0-3c3305d86a39",
@@ -29,7 +30,7 @@
"uuid": "76be87bd-3422-43f9-93a0-e85a577e3061",
"fault": null,
"state": "ONGOING",
"global_efficacy": {},
"global_efficacy": [],
"strategy_uuid": "cb3d0b58-4415-4d90-b75b-1e96878730e3",
"strategy": {
"watcher_object.namespace": "watcher",

View File

@@ -45,6 +45,7 @@
"watcher_object.name": "TerseAuditPayload",
"watcher_object.data": {
"parameters": {},
"name": "my_audit",
"uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"goal_uuid": "bc830f84-8ae3-4fc6-8bc6-e3dd15e8b49a",
"strategy_uuid": "75234dfe-87e3-4f11-a0e0-3c3305d86a39",
@@ -57,7 +58,7 @@
"state": "PENDING"
}
},
"global_efficacy": {},
"global_efficacy": [],
"state": "ONGOING"
}
},

View File

@@ -15,6 +15,7 @@
"watcher_object.data": {
"created_at": "2016-10-18T09:52:05Z",
"deleted_at": null,
"name": "my_audit",
"uuid": "10a47dd1-4874-4298-91cf-eff046dbdb8d",
"goal_uuid": "bc830f84-8ae3-4fc6-8bc6-e3dd15e8b49a",
"strategy_uuid": "75234dfe-87e3-4f11-a0e0-3c3305d86a39",
@@ -29,7 +30,7 @@
"uuid": "76be87bd-3422-43f9-93a0-e85a577e3061",
"fault": null,
"state": "ONGOING",
"global_efficacy": {},
"global_efficacy": [],
"strategy_uuid": "cb3d0b58-4415-4d90-b75b-1e96878730e3",
"strategy": {
"watcher_object.namespace": "watcher",

View File

@@ -6,6 +6,7 @@
"audit": {
"watcher_object.version": "1.0",
"watcher_object.data": {
"name": "my_audit",
"audit_type": "ONESHOT",
"scope": [],
"created_at": "2016-10-18T09:52:05Z",

View File

@@ -2,6 +2,7 @@
"priority": "INFO",
"payload": {
"watcher_object.data": {
"name": "my_audit",
"audit_type": "ONESHOT",
"parameters": {
"para2": "hello",

View File

@@ -2,6 +2,7 @@
"priority": "INFO",
"payload": {
"watcher_object.data": {
"name": "my_audit",
"audit_type": "ONESHOT",
"parameters": {
"para2": "hello",

View File

@@ -2,6 +2,7 @@
"priority": "INFO",
"payload": {
"watcher_object.data": {
"name": "my_audit",
"audit_type": "ONESHOT",
"parameters": {
"para2": "hello",

View File

@@ -2,6 +2,7 @@
"priority": "ERROR",
"payload": {
"watcher_object.data": {
"name": "my_audit",
"audit_type": "ONESHOT",
"parameters": {
"para2": "hello",

View File

@@ -2,6 +2,7 @@
"priority": "INFO",
"payload": {
"watcher_object.data": {
"name": "my_audit",
"audit_type": "ONESHOT",
"parameters": {
"para2": "hello",

View File

@@ -2,6 +2,7 @@
"priority": "INFO",
"payload": {
"watcher_object.data": {
"name": "my_audit",
"audit_type": "ONESHOT",
"parameters": {
"para2": "hello",

View File

@@ -2,6 +2,7 @@
"priority": "ERROR",
"payload": {
"watcher_object.data": {
"name": "my_audit",
"audit_type": "ONESHOT",
"parameters": {
"para2": "hello",

View File

@@ -2,6 +2,7 @@
"priority": "INFO",
"payload": {
"watcher_object.data": {
"name": "my_audit",
"audit_type": "ONESHOT",
"parameters": {
"para2": "hello",

View File

@@ -4,6 +4,7 @@
"payload": {
"watcher_object.name": "AuditUpdatePayload",
"watcher_object.data": {
"name": "my_audit",
"strategy_uuid": "75234dfe-87e3-4f11-a0e0-3c3305d86a39",
"strategy": {
"watcher_object.name": "StrategyPayload",

View File

@@ -0,0 +1,26 @@
{
"payload": {
"watcher_object.name": "ServiceUpdatePayload",
"watcher_object.namespace": "watcher",
"watcher_object.data": {
"status_update": {
"watcher_object.name": "ServiceStatusUpdatePayload",
"watcher_object.namespace": "watcher",
"watcher_object.data": {
"old_state": "ACTIVE",
"state": "FAILED"
},
"watcher_object.version": "1.0"
},
"last_seen_up": "2016-09-22T08:32:06Z",
"name": "watcher-service",
"sevice_host": "controller"
},
"watcher_object.version": "1.0"
},
"event_type": "service.update",
"priority": "INFO",
"message_id": "3984dc2b-8aef-462b-a220-8ae04237a56e",
"timestamp": "2016-10-18 09:52:05.219414",
"publisher_id": "infra-optim:node0"
}

View File

@@ -0,0 +1,49 @@
..
Except where otherwise noted, this document is licensed under Creative
Commons Attribution 3.0 License. You can view the license at:
https://creativecommons.org/licenses/by/3.0/
Installing API behind mod_wsgi
==============================
#. Install the Apache Service::
Fedora 21/RHEL7/CentOS7:
sudo yum install httpd
Fedora 22 (or higher):
sudo dnf install httpd
Debian/Ubuntu:
apt-get install apache2
#. Copy ``etc/apache2/watcher.conf`` under the apache sites::
Fedora/RHEL7/CentOS7:
sudo cp etc/apache2/watcher /etc/httpd/conf.d/watcher.conf
Debian/Ubuntu:
sudo cp etc/apache2/watcher /etc/apache2/sites-available/watcher.conf
#. Edit ``<apache-configuration-dir>/watcher.conf`` according to installation
and environment.
* Modify the ``WSGIDaemonProcess`` directive to set the ``user`` and
``group`` values to appropriate user on your server.
* Modify the ``WSGIScriptAlias`` directive to point to the
watcher/api/app.wsgi script.
* Modify the ``Directory`` directive to set the path to the Watcher API
code.
* Modify the ``ErrorLog and CustomLog`` to redirect the logs to the right
directory.
#. Enable the apache watcher site and reload::
Fedora/RHEL7/CentOS7:
sudo systemctl reload httpd
Debian/Ubuntu:
sudo a2ensite watcher
sudo service apache2 reload

View File

@@ -0,0 +1,12 @@
===================
Administrator Guide
===================
.. toctree::
:maxdepth: 2
apache-mod-wsgi
gmr
policy
ways-to-install
../strategies/index

View File

@@ -4,12 +4,13 @@
https://creativecommons.org/licenses/by/3.0/
==================
Installing Watcher
==================
=======================
Ways to install Watcher
=======================
This document describes how to install Watcher in order to use it. If you are
intending to develop on or with Watcher, please read :doc:`../dev/environment`.
This document describes some ways to install Watcher in order to use it.
If you are intending to develop on or with Watcher,
please read :doc:`../contributor/environment`.
Prerequisites
-------------
@@ -18,14 +19,14 @@ The source install instructions specifically avoid using platform specific
packages, instead using the source for the code and the Python Package Index
(PyPi_).
.. _PyPi: http://pypi.python.org/pypi
.. _PyPi: https://pypi.python.org/pypi
It's expected that your system already has python2.7_, latest version of pip_,
and git_ available.
.. _python2.7: http://www.python.org
.. _pip: http://www.pip-installer.org/en/latest/installing.html
.. _git: http://git-scm.com/
.. _python2.7: https://www.python.org
.. _pip: https://pip.pypa.io/en/latest/installing/
.. _git: https://git-scm.com/
Your system shall also have some additional system libraries:
@@ -77,9 +78,10 @@ Install the Watcher modules dependencies:
# pip install -r requirements.txt
From here, refer to :doc:`configuration` to declare Watcher as a new service
into Keystone and to configure its different modules. Once configured, you
should be able to run the Watcher services by issuing these commands:
From here, refer to :doc:`../configuration/configuring` to declare Watcher
as a new service into Keystone and to configure its different modules.
Once configured, you should be able to run the Watcher services by issuing
these commands:
.. code-block:: bash
@@ -107,7 +109,7 @@ installed on your system.
Once installed, you still need to declare Watcher as a new service into
Keystone and to configure its different modules, which you can find described
in :doc:`configuration`.
in :doc:`../configuration/configuring`.
Installing from packages: Debian (experimental)
@@ -124,9 +126,9 @@ Here is single Dockerfile snippet you can use to run your Docker container:
MAINTAINER David TARDIVEL <david.tardivel@b-com.com>
RUN apt-get update
RUN apt-get dist-upgrade -y
RUN apt-get install -y vim net-tools
RUN apt-get install -yt experimental watcher-api
RUN apt-get dist-upgrade
RUN apt-get install vim net-tools
RUN apt-get install experimental watcher-api
CMD ["/usr/bin/watcher-api"]

4
doc/source/api/index.rst Normal file
View File

@@ -0,0 +1,4 @@
.. toctree::
:maxdepth: 1
v1

View File

@@ -20,6 +20,17 @@ Goals
.. autotype:: watcher.api.controllers.v1.goal.Goal
:members:
Strategies
==========
.. rest-controller:: watcher.api.controllers.v1.strategy:StrategiesController
:webprefix: /v1/strategies
.. autotype:: watcher.api.controllers.v1.strategy.StrategyCollection
:members:
.. autotype:: watcher.api.controllers.v1.strategy.Strategy
:members:
Audit Templates
===============
@@ -75,3 +86,15 @@ Actions
.. autotype:: watcher.api.controllers.v1.action.Action
:members:
Scoring Engine
==============
.. rest-controller:: watcher.api.controllers.v1.scoring_engine:ScoringEngineController
:webprefix: /v1/scoring_engine
.. autotype:: watcher.api.controllers.v1.scoring_engine.ScoringEngineCollection
:members:
.. autotype:: watcher.api.controllers.v1.scoring_engine.ScoringEngine
:members:

View File

@@ -119,7 +119,7 @@ The watcher command-line interface (CLI) can be used to interact with the
Watcher system in order to control it or to know its current status.
Please, read `the detailed documentation about Watcher CLI
<https://factory.b-com.com/www/watcher/doc/python-watcherclient/>`_.
<https://docs.openstack.org/python-watcherclient/latest/cli/>`_.
.. _archi_watcher_dashboard_definition:
@@ -130,7 +130,7 @@ The Watcher Dashboard can be used to interact with the Watcher system through
Horizon in order to control it or to know its current status.
Please, read `the detailed documentation about Watcher Dashboard
<http://docs.openstack.org/developer/watcher-dashboard/>`_.
<https://docs.openstack.org/watcher-dashboard/latest>`_.
.. _archi_watcher_database_definition:
@@ -170,7 +170,7 @@ Unless specified, it then selects the most appropriate :ref:`strategy
goal.
The :ref:`Strategy <strategy_definition>` is then dynamically loaded (via
`stevedore <http://docs.openstack.org/developer/stevedore/>`_). The
`stevedore <https://docs.openstack.org/stevedore/latest>`_). The
:ref:`Watcher Decision Engine <watcher_decision_engine_definition>` executes
the strategy.
@@ -407,6 +407,9 @@ be one of the following:
- **CANCELLED** : the :ref:`Audit <audit_definition>` was in **PENDING** or
**ONGOING** state and was cancelled by the
:ref:`Administrator <administrator_definition>`
- **SUSPENDED** : the :ref:`Audit <audit_definition>` was in **ONGOING**
state and was suspended by the
:ref:`Administrator <administrator_definition>`
The following diagram shows the different possible states of an
:ref:`Audit <audit_definition>` and what event makes the state change to a new

View File

@@ -31,8 +31,7 @@ sys.path.insert(0, os.path.abspath('./'))
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'oslo_config.sphinxconfiggen',
'oslosphinx',
'oslo_config.sphinxext',
'sphinx.ext.autodoc',
'sphinx.ext.viewcode',
'sphinxcontrib.httpdomain',
@@ -41,10 +40,14 @@ extensions = [
'wsmeext.sphinxext',
'ext.term',
'ext.versioned_notifications',
'oslo_config.sphinxconfiggen',
'openstackdocstheme',
]
wsme_protocols = ['restjson']
config_generator_config_file = '../../etc/watcher/watcher-config-generator.conf'
config_generator_config_file = [(
'../../etc/watcher/oslo-config-generator/watcher.conf',
'_static/watcher')]
sample_config_basename = 'watcher'
# autodoc generation is a bit aggressive and a nuisance when doing heavy
@@ -69,7 +72,7 @@ copyright = u'OpenStack Foundation'
# The full version, including alpha/beta/rc tags.
release = watcher_version.version_info.release_string()
# The short X.Y version.
version = watcher_version.version_info.version_string()
version = watcher_version.version_string
# A list of ignored prefixes for module index sorting.
modindex_common_prefix = ['watcher.']
@@ -92,6 +95,8 @@ add_function_parentheses = True
# unit titles (such as .. function::).
add_module_names = True
suppress_warnings = ['app.add_directive']
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
@@ -117,12 +122,20 @@ man_pages = [
# Sphinx are currently 'default' and 'sphinxdoc'.
# html_theme_path = ["."]
# html_theme = '_theme'
html_theme = 'openstackdocs'
# html_static_path = ['static']
html_theme_options = {'incubating': True}
# html_theme_options = {}
# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project
html_last_updated_fmt = '%Y-%m-%d %H:%M'
#openstackdocstheme options
repository_name = 'openstack/watcher'
bug_project = 'watcher'
bug_tag = ''
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
# [howto/manual]).

View File

@@ -1 +0,0 @@
../../etc/watcher/watcher-config-generator.conf

View File

@@ -15,7 +15,7 @@ Service overview
================
The Watcher system is a collection of services that provides support to
optimize your IAAS platform. The Watcher service may, depending upon
optimize your IaaS platform. The Watcher service may, depending upon
configuration, interact with several other OpenStack services. This includes:
- the OpenStack Identity service (`keystone`_) for request authentication and
@@ -27,7 +27,7 @@ configuration, interact with several other OpenStack services. This includes:
The Watcher service includes the following components:
- ``watcher-decision-engine``: runs audit on part of your IAAS and return an
- ``watcher-decision-engine``: runs audit on part of your IaaS and return an
action plan in order to optimize resource placement.
- ``watcher-api``: A RESTful API that processes application requests by sending
them to the watcher-decision-engine over RPC.
@@ -349,7 +349,7 @@ so that the watcher service is configured for your needs.
[nova_client]
# Version of Nova API to use in novaclient. (string value)
#api_version = 2
#api_version = 2.53
api_version = 2.1
#. Create the Watcher Service database tables::
@@ -366,15 +366,14 @@ Configure Nova compute
Please check your hypervisor configuration to correctly handle
`instance migration`_.
.. _`instance migration`: http://docs.openstack.org/admin-guide/compute-live-migration-usage.html
.. _`instance migration`: https://docs.openstack.org/nova/latest/admin/migration.html
Configure Measurements
======================
You can configure and install Ceilometer by following the documentation below :
#. http://docs.openstack.org/developer/ceilometer
#. http://docs.openstack.org/kilo/install-guide/install/apt/content/ceilometer-nova.html
#. https://docs.openstack.org/ceilometer/latest
The built-in strategy 'basic_consolidation' provided by watcher requires
"**compute.node.cpu.percent**" and "**cpu_util**" measurements to be collected
@@ -386,13 +385,13 @@ the OpenStack site.
You can use 'ceilometer meter-list' to list the available meters.
For more information:
http://docs.openstack.org/developer/ceilometer/measurements.html
https://docs.openstack.org/ceilometer/latest/admin/telemetry-measurements.html
Ceilometer is designed to collect measurements from OpenStack services and from
other external components. If you would like to add new meters to the currently
existing ones, you need to follow the documentation below:
#. http://docs.openstack.org/developer/ceilometer/new_meters.html
#. https://docs.openstack.org/ceilometer/latest/contributor/new_meters.html#meters
The Ceilometer collector uses a pluggable storage system, meaning that you can
pick any database system you prefer.
@@ -424,12 +423,32 @@ to Watcher receives Nova notifications in ``watcher_notifications`` as well.
into which Nova services will publish events ::
[oslo_messaging_notifications]
driver = messaging
driver = messagingv2
topics = notifications,watcher_notifications
* Restart the Nova services.
Configure Cinder Notifications
==============================
Watcher can also consume notifications generated by the Cinder services, in
order to build or update, in real time, its cluster data model related to
storage resources. To do so, you have to update the Cinder configuration
file on controller and volume nodes, in order to let Watcher receive Cinder
notifications in a dedicated ``watcher_notifications`` channel.
* In the file ``/etc/cinder/cinder.conf``, update the section
``[oslo_messaging_notifications]``, by redefining the list of topics
into which Cinder services will publish events ::
[oslo_messaging_notifications]
driver = messagingv2
topics = notifications,watcher_notifications
* Restart the Cinder services.
Workers
=======

View File

@@ -0,0 +1,5 @@
.. toctree::
:maxdepth: 1
configuring
watcher

View File

@@ -0,0 +1,11 @@
.. _watcher_sample_configuration_files:
------------
watcher.conf
------------
The ``watcher.conf`` file contains most of the options to configure the
Watcher services.
.. show-options::
:config-file: etc/watcher/oslo-config-generator/watcher.conf

View File

@@ -24,8 +24,8 @@ signed OpenStack's contributor's agreement.
.. seealso::
* http://docs.openstack.org/infra/manual/developers.html
* http://wiki.openstack.org/CLA
* https://docs.openstack.org/infra/manual/developers.html
* https://wiki.openstack.org/CLA
LaunchPad Project
-----------------
@@ -37,22 +37,22 @@ notifications of important events.
.. seealso::
* http://launchpad.net
* http://launchpad.net/watcher
* http://launchpad.net/~openstack
* https://launchpad.net
* https://launchpad.net/watcher
* https://launchpad.net/~openstack
Project Hosting Details
-----------------------
Bug tracker
http://launchpad.net/watcher
https://launchpad.net/watcher
Mailing list (prefix subjects with ``[watcher]`` for faster responses)
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
https://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Wiki
http://wiki.openstack.org/Watcher
https://wiki.openstack.org/Watcher
Code Hosting
https://git.openstack.org/cgit/openstack/watcher
@@ -64,8 +64,9 @@ IRC Channel
``#openstack-watcher`` (changelog_)
Weekly Meetings
on Wednesdays at 14:00 UTC on even weeks, 9:00 UTC on odd weeks, in the
``#openstack-meeting-4`` IRC channel (`meetings logs`_)
On Wednesdays at 14:00 UTC on even weeks in the ``#openstack-meeting-4``
IRC channel, 13:00 UTC on odd weeks in the ``#openstack-meeting-alt``
IRC channel (`meetings logs`_)
.. _changelog: http://eavesdrop.openstack.org/irclogs/%23openstack-watcher/
.. _meetings logs: http://eavesdrop.openstack.org/meetings/watcher/

View File

@@ -24,8 +24,8 @@ Watcher plugin::
For more detailed instructions, see `Detailed DevStack Instructions`_. Check
out the `DevStack documentation`_ for more information regarding DevStack.
.. _PluginModelDocs: http://docs.openstack.org/developer/devstack/plugins.html
.. _DevStack documentation: http://docs.openstack.org/developer/devstack/
.. _PluginModelDocs: https://docs.openstack.org/devstack/latest/plugins.html
.. _DevStack documentation: https://docs.openstack.org/devstack/latest
Detailed DevStack Instructions
==============================
@@ -37,7 +37,7 @@ Detailed DevStack Instructions
needed (i.e., no computes are needed if you want to just experiment with
the Watcher services). These servers can be VMs running on your local
machine via VirtualBox if you prefer. DevStack currently recommends that
you use Ubuntu 14.04 LTS. The servers should also have connections to the
you use Ubuntu 16.04 LTS. The servers should also have connections to the
same network such that they are all able to communicate with one another.
#. For each server, clone the DevStack repository and create the stack user::
@@ -92,6 +92,12 @@ Detailed DevStack Instructions
Note: if you want to use a specific branch, specify WATCHER_BRANCH in the
local.conf file. By default it will use the master branch.
Note: watcher-api will default run under apache/httpd, set the variable
WATCHER_USE_MOD_WSGI=FALSE if you do not wish to run under apache/httpd.
For development environment it is suggested to set WATHCER_USE_MOD_WSGI
to FALSE. For Production environment it is suggested to keep it at the
default TRUE value.
#. Start stacking from the controller node::
./devstack/stack.sh

View File

@@ -4,7 +4,7 @@
https://creativecommons.org/licenses/by/3.0/
.. _watcher_developement_environment:
.. _watcher_development_environment:
=========================================
Set up a development environment manually
@@ -16,8 +16,8 @@ for development purposes.
To install Watcher from packaging, refer instead to Watcher `User
Documentation`_.
.. _`Git Repository`: http://git.openstack.org/cgit/openstack/watcher
.. _`User Documentation`: http://docs.openstack.org/developer/watcher/
.. _`Git Repository`: https://git.openstack.org/cgit/openstack/watcher
.. _`User Documentation`: https://docs.openstack.org/watcher/latest/
Prerequisites
=============
@@ -25,7 +25,7 @@ Prerequisites
This document assumes you are using Ubuntu or Fedora, and that you have the
following tools available on your system:
- Python_ 2.7 and 3.4
- Python_ 2.7 and 3.5
- git_
- setuptools_
- pip_
@@ -35,10 +35,10 @@ following tools available on your system:
**Reminder**: If you're successfully using a different platform, or a
different version of the above, please document your configuration here!
.. _Python: http://www.python.org/
.. _git: http://git-scm.com/
.. _setuptools: http://pypi.python.org/pypi/setuptools
.. _virtualenvwrapper: https://virtualenvwrapper.readthedocs.org/en/latest/install.html
.. _Python: https://www.python.org/
.. _git: https://git-scm.com/
.. _setuptools: https://pypi.python.org/pypi/setuptools
.. _virtualenvwrapper: https://virtualenvwrapper.readthedocs.io/en/latest/install.html
Getting the latest code
=======================
@@ -69,21 +69,21 @@ itself.
These dependencies can be installed from PyPi_ using the Python tool pip_.
.. _PyPi: http://pypi.python.org/
.. _pip: http://pypi.python.org/pypi/pip
.. _PyPi: https://pypi.python.org/
.. _pip: https://pypi.python.org/pypi/pip
However, your system *may* need additional dependencies that `pip` (and by
extension, PyPi) cannot satisfy. These dependencies should be installed
prior to using `pip`, and the installation method may vary depending on
your platform.
* Ubuntu 14.04::
* Ubuntu 16.04::
$ sudo apt-get install python-dev libssl-dev libmysqlclient-dev libffi-dev
* Fedora 19+::
* Fedora 24+::
$ sudo yum install openssl-devel libffi-devel mysql-devel
$ sudo dnf install redhat-rpm-config gcc python-devel libxml2-devel
* CentOS 7::
@@ -125,7 +125,7 @@ You can re-activate this virtualenv for your current shell using:
For more information on virtual environments, see virtualenv_.
.. _virtualenv: http://www.virtualenv.org/
.. _virtualenv: https://www.virtualenv.org/
@@ -175,11 +175,12 @@ The HTML files are available into ``doc/build`` directory.
Configure the Watcher services
==============================
Watcher services require a configuration file. There is a sample configuration
file that can be used to get started:
Watcher services require a configuration file. Use tox to generate
a sample configuration file that can be used to get started:
.. code-block:: bash
$ tox -e genconfig
$ cp etc/watcher.conf.sample etc/watcher.conf
Most of the default configuration should be enough to get you going, but you
@@ -193,7 +194,7 @@ still need to configure the following sections:
message bus
So if you need some more details on how to configure one or more of these
sections, please do have a look at :doc:`../deploy/configuration` before
sections, please do have a look at :doc:`../configuration/configuring` before
continuing.
@@ -239,7 +240,7 @@ To run the Watcher Applier service, use:
(watcher) $ watcher-applier
Default configuration of these services are available into ``/etc/watcher``
directory. See :doc:`../deploy/configuration` for details on how Watcher is
directory. See :doc:`../configuration/configuring` for details on how Watcher is
configured. By default, Watcher is configured with SQL backends.

View File

@@ -0,0 +1,8 @@
.. toctree::
:maxdepth: 1
environment
devstack
notifications
testing
rally_link

View File

@@ -178,7 +178,7 @@ Here below is how you would proceed to register ``DummyAction`` using pbr_:
watcher_actions =
dummy = thirdparty.dummy:DummyAction
.. _pbr: http://docs.openstack.org/developer/pbr/
.. _pbr: https://docs.openstack.org/pbr/latest
Using action plugins
@@ -217,3 +217,11 @@ which is only able to process the Watcher built-in actions. Therefore, you will
either have to use an existing third-party planner or :ref:`implement another
planner <implement_planner_plugin>` that will be able to take into account your
new action plugin.
Test your new action
====================
In order to test your new action via a manual test or a Tempest test, you can
use the :py:class:`~.Actuator` strategy and pass it one or more actions to
execute. This way, you can isolate your action to see if it works as expected.

View File

@@ -22,7 +22,7 @@ Pre-requisites
We assume that you have set up a working Watcher development environment. So if
this not already the case, you can check out our documentation which explains
how to set up a :ref:`development environment
<watcher_developement_environment>`.
<watcher_development_environment>`.
.. _development environment:
@@ -34,7 +34,7 @@ First off, we need to create the project structure. To do so, we can use
generate the skeleton of our project::
$ virtualenv thirdparty
$ source thirdparty/bin/activate
$ . thirdparty/bin/activate
$ pip install cookiecutter
$ cookiecutter https://github.com/openstack-dev/cookiecutter

View File

@@ -28,6 +28,8 @@ In order to create a new cluster data model collector, you have to:
- Implement its :py:meth:`~.BaseClusterDataModelCollector.execute` abstract
method to return your entire cluster data model that this method should
build.
- Implement its :py:meth:`~.BaseClusterDataModelCollector.audit_scope_handler`
abstract property to return your audit scope handler.
- Implement its :py:meth:`~.Goal.notification_endpoints` abstract property to
return the list of all the :py:class:`~.base.NotificationEndpoint` instances
that will be responsible for handling incoming notifications in order to
@@ -57,6 +59,10 @@ Here is an example showing how you can write a plugin called
# Do something here...
return model
@property
def audit_scope_handler(self):
return None
@property
def notification_endpoints(self):
return []
@@ -135,6 +141,10 @@ class method as followed:
# Do something here...
return model
@property
def audit_scope_handler(self):
return None
@property
def notification_endpoints(self):
return []
@@ -198,7 +208,7 @@ Here below is how to register ``DummyClusterDataModelCollector`` using pbr_:
watcher_cluster_data_model_collectors =
dummy = thirdparty.dummy:DummyClusterDataModelCollector
.. _pbr: http://docs.openstack.org/developer/pbr/
.. _pbr: http://docs.openstack.org/pbr/latest
Add new notification endpoints

View File

@@ -123,10 +123,11 @@ Here below is how you would proceed to register ``NewGoal`` using pbr_:
new_goal = thirdparty.new:NewGoal
To get a better understanding on how to implement a more advanced goal,
have a look at the :py:class:`~.ServerConsolidation` class.
To get a better understanding on how to implement a more advanced goal, have
a look at the
:py:class:`watcher.decision_engine.goal.goals.ServerConsolidation` class.
.. _pbr: http://docs.openstack.org/developer/pbr/
.. _pbr: https://docs.openstack.org/pbr/latest
.. _implement_efficacy_specification:

View File

@@ -0,0 +1,11 @@
.. toctree::
:maxdepth: 1
base-setup
action-plugin
cdmc-plugin
goal-plugin
planner-plugin
scoring-engine-plugin
strategy-plugin
plugins

View File

@@ -145,7 +145,7 @@ Here below is how you would proceed to register ``DummyPlanner`` using pbr_:
watcher_planners =
dummy = third_party.dummy:DummyPlanner
.. _pbr: http://docs.openstack.org/developer/pbr/
.. _pbr: https://docs.openstack.org/pbr/latest
Using planner plugins

View File

@@ -37,7 +37,8 @@ Create a new scoring engine plugin
In order to create a new scoring engine you have to:
- Extend the :py:class:`~.ScoringEngine` class
- Extend the :py:class:`watcher.decision_engine.scoring.base.ScoringEngine`
class
- Implement its :py:meth:`~.ScoringEngine.get_name` method to return the
**unique** ID of the new scoring engine you want to create. This unique ID
should be the same as the name of :ref:`the entry point we will declare later
@@ -124,7 +125,8 @@ scoring engine deployed as a web service on external servers:
Abstract Plugin Class
=====================
Here below is the abstract :py:class:`~.ScoringEngine` class:
Here below is the abstract
:py:class:`watcher.decision_engine.scoring.base.ScoringEngine` class:
.. autoclass:: watcher.decision_engine.scoring.base.ScoringEngine
:members:
@@ -188,7 +190,7 @@ the :py:class:`~.DummyScoringContainer` and the way it is configured in
watcher_scoring_engine_containers =
new_scoring_container = thirdparty.new:NewContainer
.. _pbr: http://docs.openstack.org/developer/pbr/
.. _pbr: https://docs.openstack.org/pbr/latest/
Using scoring engine plugins

View File

@@ -219,7 +219,7 @@ Here below is how you would proceed to register ``NewStrategy`` using pbr_:
To get a better understanding on how to implement a more advanced strategy,
have a look at the :py:class:`~.BasicConsolidation` class.
.. _pbr: http://docs.openstack.org/developer/pbr/
.. _pbr: https://docs.openstack.org/pbr/latest
Using strategy plugins
======================
@@ -264,11 +264,11 @@ requires new metrics not covered by Ceilometer, you can add them through a
.. _`Helper`: https://github.com/openstack/watcher/blob/master/watcher/decision_engine/cluster/history/ceilometer.py
.. _`Ceilometer developer guide`: http://docs.openstack.org/developer/ceilometer/architecture.html#storing-the-data
.. _`Ceilometer`: http://docs.openstack.org/developer/ceilometer/
.. _`Ceilometer developer guide`: https://docs.openstack.org/ceilometer/latest/contributor/architecture.html#storing-accessing-the-data
.. _`Ceilometer`: https://docs.openstack.org/ceilometer/latest
.. _`Monasca`: https://github.com/openstack/monasca-api/blob/master/docs/monasca-api-spec.md
.. _`here`: http://docs.openstack.org/developer/ceilometer/install/dbreco.html#choosing-a-database-backend
.. _`Ceilometer plugin`: http://docs.openstack.org/developer/ceilometer/plugins.html
.. _`here`: https://docs.openstack.org/ceilometer/latest/contributor/install/dbreco.html#choosing-a-database-backend
.. _`Ceilometer plugin`: https://docs.openstack.org/ceilometer/latest/contributor/plugins.html
.. _`Ceilosca`: https://github.com/openstack/monasca-ceilometer/blob/master/ceilosca/ceilometer/storage/impl_monasca.py
Read usage metrics using the Watcher Datasource Helper

View File

@@ -14,7 +14,7 @@ Unit tests
==========
All unit tests should be run using `tox`_. To run the same unit tests that are
executing onto `Gerrit`_ which includes ``py34``, ``py27`` and ``pep8``, you
executing onto `Gerrit`_ which includes ``py35``, ``py27`` and ``pep8``, you
can issue the following command::
$ workon watcher
@@ -26,7 +26,7 @@ If you want to only run one of the aforementioned, you can then issue one of
the following::
$ workon watcher
(watcher) $ tox -e py34
(watcher) $ tox -e py35
(watcher) $ tox -e py27
(watcher) $ tox -e pep8
@@ -41,10 +41,18 @@ you can run the desired test::
$ workon watcher
(watcher) $ tox -e py27 -- -r watcher.tests.api
.. _os-testr: http://docs.openstack.org/developer/os-testr/
.. _os-testr: https://docs.openstack.org/os-testr/latest
When you're done, deactivate the virtualenv::
$ deactivate
.. include:: ../../../watcher_tempest_plugin/README.rst
.. _tempest_tests:
Tempest tests
=============
Tempest tests for Watcher has been migrated to the external repo
`watcher-tempest-plugin`_.
.. _watcher-tempest-plugin: https://github.com/openstack/watcher-tempest-plugin

View File

@@ -1,14 +0,0 @@
.. _watcher_sample_configuration_files:
==================================
Watcher sample configuration files
==================================
watcher.conf
~~~~~~~~~~~~
The ``watcher.conf`` file contains most of the options to configure the
Watcher services.
.. literalinclude:: ../watcher.conf.sample
:language: ini

View File

@@ -65,6 +65,14 @@ Audit
.. _audit_template_definition:
Audit Scope
===========
An Audit Scope is a set of audited resources. Audit Scope should be defined
in each Audit Template (which contains the Audit settings).
.. _audit_scope_definition:
Audit Template
==============
@@ -75,7 +83,7 @@ Audit Template
Availability Zone
=================
Please, read `the official OpenStack definition of an Availability Zone <http://docs.openstack.org/developer/nova/aggregates.html#availability-zones-azs>`_.
Please, read `the official OpenStack definition of an Availability Zone <https://docs.openstack.org/nova/latest/user/aggregates.html#availability-zones-azs>`_.
.. _cluster_definition:
@@ -107,15 +115,8 @@ Cluster Data Model (CDM)
Controller Node
===============
A controller node is a machine that typically runs the following core OpenStack
services:
- Keystone: for identity and service management
- Cinder scheduler: for volumes management
- Glance controller: for image management
- Neutron controller: for network management
- Nova controller: for global compute resources management with services
such as nova-scheduler, nova-conductor and nova-network.
Please, read `the official OpenStack definition of a Controller Node
<https://docs.openstack.org/nova/latest/install/overview.html#controller>`_.
In many configurations, Watcher will reside on a controller node even if it
can potentially be hosted on a dedicated machine.
@@ -126,7 +127,7 @@ Compute node
============
Please, read `the official OpenStack definition of a Compute Node
<http://docs.openstack.org/ops-guide/arch-compute-nodes.html>`_.
<https://docs.openstack.org/nova/latest/install/overview.html#compute>`_.
.. _customer_definition:
@@ -159,7 +160,7 @@ Host Aggregate
==============
Please, read `the official OpenStack definition of a Host Aggregate
<http://docs.openstack.org/developer/nova/aggregates.html>`_.
<https://docs.openstack.org/nova/latest/user/aggregates.html>`_.
.. _instance_definition:
@@ -198,18 +199,18 @@ the Watcher system can act on.
Here are some examples of
:ref:`Managed resource types <managed_resource_definition>`:
- `Nova Host Aggregates <http://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Nova::HostAggregate>`_
- `Nova Servers <http://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Nova::Server>`_
- `Cinder Volumes <http://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Cinder::Volume>`_
- `Neutron Routers <http://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Neutron::Router>`_
- `Neutron Networks <http://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Neutron::Net>`_
- `Neutron load-balancers <http://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Neutron::LoadBalancer>`_
- `Sahara Hadoop Cluster <http://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Sahara::Cluster>`_
- `Nova Host Aggregates <https://docs.openstack.org/heat/latest/template_guide/openstack.html#OS::Nova::HostAggregate>`_
- `Nova Servers <https://docs.openstack.org/heat/latest/template_guide/openstack.html#OS::Nova::Server>`_
- `Cinder Volumes <https://docs.openstack.org/heat/latest/template_guide/openstack.html#OS::Cinder::Volume>`_
- `Neutron Routers <https://docs.openstack.org/heat/latest/template_guide/openstack.html#OS::Neutron::Router>`_
- `Neutron Networks <https://docs.openstack.org/heat/latest/template_guide/openstack.html#OS::Neutron::Net>`_
- `Neutron load-balancers <https://docs.openstack.org/heat/latest/template_guide/openstack.html#OS::Neutron::LoadBalancer>`_
- `Sahara Hadoop Cluster <https://docs.openstack.org/heat/latest/template_guide/openstack.html#OS::Sahara::Cluster>`_
- ...
It can be any of the `the official list of available resource types defined in
It can be any of `the official list of available resource types defined in
OpenStack for HEAT
<http://docs.openstack.org/developer/heat/template_guide/openstack.html>`_.
<https://docs.openstack.org/heat/latest/template_guide/openstack.html>`_.
.. _efficacy_indicator_definition:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

View File

@@ -7,7 +7,9 @@ ONGOING --> FAILED: Something failed while executing\nthe Action Plan in the Wat
ONGOING --> SUCCEEDED: The Watcher Applier executed\nthe Action Plan successfully
FAILED --> DELETED : Administrator removes\nAction Plan
SUCCEEDED --> DELETED : Administrator removes\nAction Plan
ONGOING --> CANCELLED : Administrator cancels\nAction Plan
ONGOING --> CANCELLING : Administrator cancels\nAction Plan
CANCELLING --> CANCELLED : The Watcher Applier cancelled\nthe Action Plan successfully
CANCELLING --> FAILED : Something failed while cancelling\nthe Action Plan in the Watcher Applier
RECOMMENDED --> CANCELLED : Administrator cancels\nAction Plan
RECOMMENDED --> SUPERSEDED : The Watcher Decision Engine supersedes\nAction Plan
PENDING --> CANCELLED : Administrator cancels\nAction Plan

View File

@@ -4,11 +4,14 @@
PENDING --> ONGOING: Audit request is received\nby the Watcher Decision Engine
ONGOING --> FAILED: Audit fails\n(no solution found, technical error, ...)
ONGOING --> SUCCEEDED: The Watcher Decision Engine\ncould find at least one Solution
ONGOING --> SUSPENDED: Administrator wants to\nsuspend the Audit
SUSPENDED --> ONGOING: Administrator wants to\nresume the Audit
FAILED --> DELETED : Administrator wants to\narchive/delete the Audit
SUCCEEDED --> DELETED : Administrator wants to\narchive/delete the Audit
PENDING --> CANCELLED : Administrator cancels\nthe Audit
ONGOING --> CANCELLED : Administrator cancels\nthe Audit
CANCELLED --> DELETED : Administrator wants to\narchive/delete the Audit
SUSPENDED --> DELETED: Administrator wants to\narchive/delete the Audit
DELETED --> [*]
@enduml

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

View File

@@ -75,7 +75,7 @@ table(action_plans) {
foreign_key("strategy_id : Integer")
uuid : String[36]
state : String[20], nullable
global_efficacy : JSONEncodedDict, nullable
global_efficacy : JSONEncodedList, nullable
created_at : DateTime
updated_at : DateTime

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 76 KiB

View File

@@ -13,7 +13,7 @@
height="210mm"
id="svg4946"
version="1.1"
inkscape:version="0.48.4 r9939"
inkscape:version="0.91 r13725"
sodipodi:docname="architecture.svg">
<defs
id="defs4948">
@@ -325,6 +325,48 @@
style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
transform="matrix(-0.8,0,0,-0.8,4.8,0)" />
</marker>
<marker
inkscape:stockid="EmptyTriangleInL"
orient="auto"
refY="0"
refX="0"
id="EmptyTriangleInL-5"
style="overflow:visible">
<path
inkscape:connector-curvature="0"
id="path7091-3"
d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
transform="matrix(-0.8,0,0,-0.8,4.8,0)" />
</marker>
<marker
inkscape:stockid="EmptyTriangleInL"
orient="auto"
refY="0"
refX="0"
id="EmptyTriangleInL-6"
style="overflow:visible">
<path
inkscape:connector-curvature="0"
id="path7091-2"
d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
transform="matrix(-0.8,0,0,-0.8,4.8,0)" />
</marker>
<marker
inkscape:stockid="EmptyTriangleInL"
orient="auto"
refY="0"
refX="0"
id="EmptyTriangleInL-12"
style="overflow:visible">
<path
inkscape:connector-curvature="0"
id="path7091-70"
d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
transform="matrix(-0.8,0,0,-0.8,4.8,0)" />
</marker>
</defs>
<sodipodi:namedview
inkscape:document-units="mm"
@@ -333,17 +375,21 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="4"
inkscape:cx="261.24633"
inkscape:zoom="1.4142136"
inkscape:cx="665.19215"
inkscape:cy="108.90512"
inkscape:current-layer="g5356"
inkscape:current-layer="g4866-2-3"
id="namedview4950"
showgrid="false"
inkscape:window-width="1846"
inkscape:window-height="1053"
inkscape:window-x="1911"
inkscape:window-y="37"
inkscape:window-maximized="1" />
showgrid="true"
inkscape:window-width="1211"
inkscape:window-height="698"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid4203" />
</sodipodi:namedview>
<metadata
id="metadata4952">
<rdf:RDF>
@@ -363,6 +409,12 @@
<g
id="g5356"
transform="translate(-15.096057,-107.16694)">
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path3284-4-2-3-77-5-9"
d="m 813.66791,753.1462 0,-92.21768"
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#EmptyTriangleInL-6)" />
<rect
y="377.8927"
x="96.920677"
@@ -410,7 +462,7 @@
sodipodi:cy="358.94418"
sodipodi:rx="70.677063"
sodipodi:ry="70.677063"
d="m 394.67978,358.94418 c 0,39.03387 -31.6432,70.67707 -70.67706,70.67707 -39.03387,0 -70.67707,-31.6432 -70.67707,-70.67707 0,-39.03386 31.6432,-70.67706 70.67707,-70.67706 39.03386,0 70.67706,31.6432 70.67706,70.67706 z"
d="m 394.67978,358.94418 a 70.677063,70.677063 0 0 1 -70.67706,70.67707 70.677063,70.677063 0 0 1 -70.67707,-70.67707 70.677063,70.677063 0 0 1 70.67707,-70.67706 70.677063,70.677063 0 0 1 70.67706,70.67706 z"
transform="matrix(0.36664048,0,0,0.36664048,0.86684619,-80.697844)" />
<g
id="g5262">
@@ -536,29 +588,29 @@
</g>
<rect
y="754.5235"
x="225.29219"
x="231.29219"
height="42.939091"
width="118.56741"
id="rect4267-4-7-7-3-3"
style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-opacity:1;display:inline" />
style="display:inline;fill:#ffffff;stroke:#000000;stroke-width:1;stroke-opacity:1" />
<text
sodipodi:linespacing="125%"
id="text5037-4-6-9-1-4"
y="783.03412"
x="284.34656"
style="font-size:20.86613655px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:Sans"
x="290.34656"
style="font-style:normal;font-weight:normal;font-size:20.86613655px;line-height:125%;font-family:Sans;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;display:inline;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
id="tspan5184-3-5-2-1"
style="font-size:20px;text-align:center;text-anchor:middle"
y="783.03412"
x="284.34656"
x="290.34656"
sodipodi:role="line">ceilometer</tspan></text>
<g
transform="matrix(1.7775787,0,0,1.7775787,593.58186,304.14299)"
transform="matrix(1.7775787,0,0,1.7775787,599.58186,304.14299)"
id="g4982"
style="display:inline">
<rect
style="fill:#ffffff;stroke:#000000;stroke-width:0.562563;stroke-opacity:1;display:inline"
style="display:inline;fill:#ffffff;stroke:#000000;stroke-width:0.562563;stroke-opacity:1"
id="rect4267-4-7-7-3-3-1"
width="66.701637"
height="24.155943"
@@ -566,7 +618,7 @@
y="253.36743" />
<text
xml:space="preserve"
style="font-size:11.73851585px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:Sans"
style="font-style:normal;font-weight:normal;font-size:11.73851585px;line-height:125%;font-family:Sans;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;display:inline;fill:#000000;fill-opacity:1;stroke:none"
x="-100.86156"
y="268.36258"
id="text5037-4-6-9-1-4-3"
@@ -620,12 +672,6 @@
style="font-size:11.2512598px;text-align:center;text-anchor:middle"
id="tspan5022">drivers</tspan></text>
</g>
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path5110"
d="m 376.75141,726.9703 -57.95106,0"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline" />
<g
transform="matrix(1.7775787,0,0,1.7775787,704.59677,780.35846)"
id="g5267"
@@ -863,8 +909,8 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path5110-9"
d="m 472.18905,726.66568 221.85496,0"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline" />
d="m 472.18905,726.66568 331.45651,0"
style="display:inline;fill:none;stroke:#000000;stroke-width:1.22230256px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
@@ -907,8 +953,8 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path3284-4-2-3-4-6"
d="m 540.57926,651.7922 179.16488,0"
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1.99999999, 1.99999999;stroke-dashoffset:0;marker-start:url(#TriangleInL);display:inline" />
d="m 543.75943,651.7922 280.63651,0"
style="display:inline;fill:none;stroke:#000000;stroke-width:1.25154257;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:2.50308524, 2.50308524;stroke-dashoffset:0;stroke-opacity:1;marker-start:url(#TriangleInL)" />
<rect
y="262.01205"
x="451.89563"
@@ -1052,8 +1098,8 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path5112-89"
d="m 328.87061,655.34778 0,71.7093"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline" />
d="m 324.87061,655.34778 0,71.7093"
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
@@ -1178,7 +1224,7 @@
sodipodi:role="line">extensions</tspan></text>
<path
transform="translate(68.397849,130.15566)"
d="m 519.41589,367.58817 c 0,4.01434 -2.01125,7.2686 -4.49224,7.2686 -2.481,0 -4.49225,-3.25426 -4.49225,-7.2686 0,-4.01434 2.01125,-7.26861 4.49225,-7.26861 2.48099,0 4.49224,3.25427 4.49224,7.26861 z"
d="m 519.41589,367.58817 a 4.4922457,7.2686057 0 0 1 -4.49224,7.2686 4.4922457,7.2686057 0 0 1 -4.49225,-7.2686 4.4922457,7.2686057 0 0 1 4.49225,-7.26861 4.4922457,7.2686057 0 0 1 4.49224,7.26861 z"
sodipodi:ry="7.2686057"
sodipodi:rx="4.4922457"
sodipodi:cy="367.58817"
@@ -1188,7 +1234,7 @@
sodipodi:type="arc" />
<path
transform="matrix(0.36538461,0,0,0.36538461,397.30905,368.17877)"
d="m 521.38126,368.43045 c 0,4.03162 -3.26828,7.2999 -7.2999,7.2999 -4.03162,0 -7.2999,-3.26828 -7.2999,-7.2999 0,-4.03162 3.26828,-7.2999 7.2999,-7.2999 4.03162,0 7.2999,3.26828 7.2999,7.2999 z"
d="m 521.38126,368.43045 a 7.2998991,7.2998991 0 0 1 -7.2999,7.2999 7.2998991,7.2998991 0 0 1 -7.2999,-7.2999 7.2998991,7.2998991 0 0 1 7.2999,-7.2999 7.2998991,7.2998991 0 0 1 7.2999,7.2999 z"
sodipodi:ry="7.2998991"
sodipodi:rx="7.2998991"
sodipodi:cy="368.43045"
@@ -1198,7 +1244,7 @@
sodipodi:type="arc" />
<path
transform="matrix(0.36538461,0,0,0.36538461,-27.122619,99.964199)"
d="m 521.38126,368.43045 c 0,4.03162 -3.26828,7.2999 -7.2999,7.2999 -4.03162,0 -7.2999,-3.26828 -7.2999,-7.2999 0,-4.03162 3.26828,-7.2999 7.2999,-7.2999 4.03162,0 7.2999,3.26828 7.2999,7.2999 z"
d="m 521.38126,368.43045 a 7.2998991,7.2998991 0 0 1 -7.2999,7.2999 7.2998991,7.2998991 0 0 1 -7.2999,-7.2999 7.2998991,7.2998991 0 0 1 7.2999,-7.2999 7.2998991,7.2998991 0 0 1 7.2999,7.2999 z"
sodipodi:ry="7.2998991"
sodipodi:rx="7.2998991"
sodipodi:cy="368.43045"
@@ -1214,7 +1260,7 @@
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:3.99999997, 1.99999998, 0.99999999, 1.99999998;stroke-dashoffset:0;marker-start:none;display:inline" />
<path
transform="matrix(0.36538461,0,0,0.36538461,396.74123,268.71562)"
d="m 521.38126,368.43045 c 0,4.03162 -3.26828,7.2999 -7.2999,7.2999 -4.03162,0 -7.2999,-3.26828 -7.2999,-7.2999 0,-4.03162 3.26828,-7.2999 7.2999,-7.2999 4.03162,0 7.2999,3.26828 7.2999,7.2999 z"
d="m 521.38126,368.43045 a 7.2998991,7.2998991 0 0 1 -7.2999,7.2999 7.2998991,7.2998991 0 0 1 -7.2999,-7.2999 7.2998991,7.2998991 0 0 1 7.2999,-7.2999 7.2998991,7.2998991 0 0 1 7.2999,7.2999 z"
sodipodi:ry="7.2998991"
sodipodi:rx="7.2998991"
sodipodi:cy="368.43045"
@@ -1224,7 +1270,7 @@
sodipodi:type="arc" />
<path
transform="matrix(0.36538461,0,0,0.36538461,428.69747,559.36511)"
d="m 521.38126,368.43045 c 0,4.03162 -3.26828,7.2999 -7.2999,7.2999 -4.03162,0 -7.2999,-3.26828 -7.2999,-7.2999 0,-4.03162 3.26828,-7.2999 7.2999,-7.2999 4.03162,0 7.2999,3.26828 7.2999,7.2999 z"
d="m 521.38126,368.43045 a 7.2998991,7.2998991 0 0 1 -7.2999,7.2999 7.2998991,7.2998991 0 0 1 -7.2999,-7.2999 7.2998991,7.2998991 0 0 1 7.2999,-7.2999 7.2998991,7.2998991 0 0 1 7.2999,7.2999 z"
sodipodi:ry="7.2998991"
sodipodi:rx="7.2998991"
sodipodi:cy="368.43045"
@@ -1234,7 +1280,7 @@
sodipodi:type="arc" />
<path
transform="matrix(0.36538461,0,0,0.36538461,531.88959,559.36511)"
d="m 521.38126,368.43045 c 0,4.03162 -3.26828,7.2999 -7.2999,7.2999 -4.03162,0 -7.2999,-3.26828 -7.2999,-7.2999 0,-4.03162 3.26828,-7.2999 7.2999,-7.2999 4.03162,0 7.2999,3.26828 7.2999,7.2999 z"
d="m 521.38126,368.43045 a 7.2998991,7.2998991 0 0 1 -7.2999,7.2999 7.2998991,7.2998991 0 0 1 -7.2999,-7.2999 7.2998991,7.2998991 0 0 1 7.2999,-7.2999 7.2998991,7.2998991 0 0 1 7.2999,7.2999 z"
sodipodi:ry="7.2998991"
sodipodi:rx="7.2998991"
sodipodi:cy="368.43045"
@@ -1250,7 +1296,7 @@
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1.99999998, 1.99999998;stroke-dashoffset:0;marker-start:none;display:inline" />
<path
transform="matrix(0.36538461,0,0,0.36538461,748.91653,525.25993)"
d="m 521.38126,368.43045 c 0,4.03162 -3.26828,7.2999 -7.2999,7.2999 -4.03162,0 -7.2999,-3.26828 -7.2999,-7.2999 0,-4.03162 3.26828,-7.2999 7.2999,-7.2999 4.03162,0 7.2999,3.26828 7.2999,7.2999 z"
d="m 521.38126,368.43045 a 7.2998991,7.2998991 0 0 1 -7.2999,7.2999 7.2998991,7.2998991 0 0 1 -7.2999,-7.2999 7.2998991,7.2998991 0 0 1 7.2999,-7.2999 7.2998991,7.2998991 0 0 1 7.2999,7.2999 z"
sodipodi:ry="7.2998991"
sodipodi:rx="7.2998991"
sodipodi:cy="368.43045"
@@ -1260,7 +1306,7 @@
sodipodi:type="arc" />
<path
transform="matrix(0.36538461,0,0,0.36538461,748.91653,495.84628)"
d="m 521.38126,368.43045 c 0,4.03162 -3.26828,7.2999 -7.2999,7.2999 -4.03162,0 -7.2999,-3.26828 -7.2999,-7.2999 0,-4.03162 3.26828,-7.2999 7.2999,-7.2999 4.03162,0 7.2999,3.26828 7.2999,7.2999 z"
d="m 521.38126,368.43045 a 7.2998991,7.2998991 0 0 1 -7.2999,7.2999 7.2998991,7.2998991 0 0 1 -7.2999,-7.2999 7.2998991,7.2998991 0 0 1 7.2999,-7.2999 7.2998991,7.2998991 0 0 1 7.2999,7.2999 z"
sodipodi:ry="7.2998991"
sodipodi:rx="7.2998991"
sodipodi:cy="368.43045"
@@ -1313,7 +1359,7 @@
</g>
<path
transform="matrix(0.36538461,0,0,0.36538461,396.74122,268.71562)"
d="m 521.38126,368.43045 c 0,4.03162 -3.26828,7.2999 -7.2999,7.2999 -4.03162,0 -7.2999,-3.26828 -7.2999,-7.2999 0,-4.03162 3.26828,-7.2999 7.2999,-7.2999 4.03162,0 7.2999,3.26828 7.2999,7.2999 z"
d="m 521.38126,368.43045 a 7.2998991,7.2998991 0 0 1 -7.2999,7.2999 7.2998991,7.2998991 0 0 1 -7.2999,-7.2999 7.2998991,7.2998991 0 0 1 7.2999,-7.2999 7.2998991,7.2998991 0 0 1 7.2999,7.2999 z"
sodipodi:ry="7.2998991"
sodipodi:rx="7.2998991"
sodipodi:cy="368.43045"
@@ -1323,7 +1369,7 @@
sodipodi:type="arc" />
<path
transform="matrix(0.36538461,0,0,0.36538461,-27.122619,74.87915)"
d="m 521.38126,368.43045 c 0,4.03162 -3.26828,7.2999 -7.2999,7.2999 -4.03162,0 -7.2999,-3.26828 -7.2999,-7.2999 0,-4.03162 3.26828,-7.2999 7.2999,-7.2999 4.03162,0 7.2999,3.26828 7.2999,7.2999 z"
d="m 521.38126,368.43045 a 7.2998991,7.2998991 0 0 1 -7.2999,7.2999 7.2998991,7.2998991 0 0 1 -7.2999,-7.2999 7.2998991,7.2998991 0 0 1 7.2999,-7.2999 7.2998991,7.2998991 0 0 1 7.2999,7.2999 z"
sodipodi:ry="7.2998991"
sodipodi:rx="7.2998991"
sodipodi:cy="368.43045"
@@ -1339,7 +1385,7 @@
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:3.99999997, 1.99999998, 0.99999999, 1.99999998;stroke-dashoffset:0;marker-start:url(#TriangleInL);display:inline" />
<path
transform="matrix(0.36538461,0,0,0.36538461,422.9095,223.59883)"
d="m 521.38126,368.43045 c 0,4.03162 -3.26828,7.2999 -7.2999,7.2999 -4.03162,0 -7.2999,-3.26828 -7.2999,-7.2999 0,-4.03162 3.26828,-7.2999 7.2999,-7.2999 4.03162,0 7.2999,3.26828 7.2999,7.2999 z"
d="m 521.38126,368.43045 a 7.2998991,7.2998991 0 0 1 -7.2999,7.2999 7.2998991,7.2998991 0 0 1 -7.2999,-7.2999 7.2998991,7.2998991 0 0 1 7.2999,-7.2999 7.2998991,7.2998991 0 0 1 7.2999,7.2999 z"
sodipodi:ry="7.2998991"
sodipodi:rx="7.2998991"
sodipodi:cy="368.43045"
@@ -1351,15 +1397,87 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path3284-4-2-3-40"
d="m 319.30136,753.47677 0,-27.00021"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#EmptyTriangleInL);display:inline" />
d="m 325.23661,753.47677 0,-27.00021"
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#EmptyTriangleInL)" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path3284-4-2-3-8"
d="m 376.2546,753.65849 0,-27.00021"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#EmptyTriangleInL);display:inline" />
d="m 414.2546,753.65849 0,-27.00021"
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#EmptyTriangleInL)" />
<rect
y="754.5235"
x="102.92204"
height="42.939091"
width="118.56741"
id="rect4267-4-7-7-3-3-3"
style="display:inline;fill:#ffffff;stroke:#000000;stroke-width:1;stroke-opacity:1" />
<text
sodipodi:linespacing="125%"
id="text5037-4-6-9-1-4-6"
y="783.03412"
x="160.34656"
style="font-style:normal;font-weight:normal;font-size:20.86613655px;line-height:125%;font-family:Sans;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;display:inline;fill:#000000;fill-opacity:1;stroke:none"
xml:space="preserve"><tspan
id="tspan5184-3-5-2-1-7"
style="font-size:20px;text-align:center;text-anchor:middle"
y="783.03412"
x="160.34656"
sodipodi:role="line">gnocchi</tspan></text>
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path3284-4-2-3-40-5"
d="m 191.30136,753.47677 0,-27.00021"
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#EmptyTriangleInL-5)" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path5110-9-6"
d="m 192.18905,726.66568 221.85496,0"
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<g
id="g4866-2-3"
style="display:inline"
transform="matrix(1.7775787,0,0,1.7775787,991.15946,596.08131)">
<rect
style="display:inline;fill:#ffffff;stroke:#000000;stroke-width:0.562563;stroke-opacity:1"
id="rect4267-4-7-7-6"
width="49.81258"
height="24.243191"
x="-116.67716"
y="88.977051" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:11.73851585px;line-height:125%;font-family:Sans;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;display:inline;fill:#000000;fill-opacity:1;stroke:none"
x="-91.899979"
y="104.01585"
id="text5037-4-6-9-7"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
x="-91.899979"
y="104.01585"
style="font-size:11.2512598px;text-align:center;text-anchor:middle"
id="tspan5184-3-5-5">cinder</tspan></text>
</g>
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path3284-4-2-3-4-9-3"
d="m 824.37881,651.58554 0,102.98987"
style="display:inline;fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.99999999, 1.99999999;stroke-dashoffset:0;stroke-opacity:1;marker-start:none" />
<circle
r="2.6672709"
cy="693.98395"
cx="823.72699"
id="path13407-89-5"
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#ececec;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path3284-4-2-3-7-9"
d="m 804.16781,752.35205 0,-26.2061"
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#EmptyTriangleInL-12)" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 47 KiB

View File

@@ -43,7 +43,7 @@ Introduction
glossary
architecture
dev/contributing
contributor/contributing
Getting Started
@@ -52,13 +52,7 @@ Getting Started
.. toctree::
:maxdepth: 1
dev/environment
dev/devstack
deploy/configuration
deploy/conf-files
dev/notifications
dev/testing
dev/rally_link
contributor/index
API References
--------------
@@ -66,7 +60,7 @@ API References
.. toctree::
:maxdepth: 1
webapi/v1
api/index
Plugins
-------
@@ -74,30 +68,38 @@ Plugins
.. toctree::
:maxdepth: 1
dev/plugin/base-setup
dev/plugin/goal-plugin
dev/plugin/scoring-engine-plugin
dev/plugin/strategy-plugin
dev/plugin/cdmc-plugin
dev/plugin/action-plugin
dev/plugin/planner-plugin
dev/plugins
contributor/plugin/index
Installation
============
.. toctree::
:maxdepth: 2
install/index
Watcher Configuration Options
=============================
.. toctree::
:maxdepth: 2
configuration/index
Admin Guide
===========
Introduction
------------
.. toctree::
:maxdepth: 2
admin/index
User Guide
==========
.. toctree::
:maxdepth: 1
:maxdepth: 2
deploy/installation
deploy/user-guide
deploy/policy
deploy/gmr
strategies/strategies
user/index
Watcher Manual Pages
====================
@@ -106,7 +108,7 @@ Watcher Manual Pages
:glob:
:maxdepth: 1
man/*
man/index
.. # NOTE(mriedem): This is the section where we hide things that we don't
# actually want in the table of contents but sphinx build would fail if

View File

@@ -0,0 +1,81 @@
2. Edit the ``/etc/watcher/watcher.conf`` file and complete the following
actions:
* In the ``[database]`` section, configure database access:
.. code-block:: ini
[database]
...
connection = mysql+pymysql://watcher:WATCHER_DBPASS@controller/watcher?charset=utf8
* In the `[DEFAULT]` section, configure the transport url for RabbitMQ message broker.
.. code-block:: ini
[DEFAULT]
...
control_exchange = watcher
transport_url = rabbit://openstack:RABBIT_PASS@controller
Replace the RABBIT_PASS with the password you chose for OpenStack user in RabbitMQ.
* In the `[keystone_authtoken]` section, configure Identity service access.
.. code-block:: ini
[keystone_authtoken]
...
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = watcher
password = WATCHER_PASS
Replace WATCHER_PASS with the password you chose for the watcher user in the Identity service.
* Watcher interacts with other OpenStack projects via project clients, in order to instantiate these
clients, Watcher requests new session from Identity service. In the `[watcher_clients_auth]` section,
configure the identity service access to interact with other OpenStack project clients.
.. code-block:: ini
[watcher_clients_auth]
...
auth_type = password
auth_url = http://controller:35357
username = watcher
password = WATCHER_PASS
project_domain_name = default
user_domain_name = default
project_name = service
Replace WATCHER_PASS with the password you chose for the watcher user in the Identity service.
* In the `[api]` section, configure host option.
.. code-block:: ini
[api]
...
host = controller
Replace controller with the IP address of the management network interface on your controller node, typically 10.0.0.11 for the first node in the example architecture.
* In the `[oslo_messaging_notifications]` section, configure the messaging driver.
.. code-block:: ini
[oslo_messaging_notifications]
...
driver = messagingv2
3. Populate watcher database:
.. code-block:: ini
su -s /bin/sh -c "watcher-db-manage --config-file /etc/watcher/watcher.conf upgrade"

View File

@@ -0,0 +1,139 @@
Prerequisites
-------------
Before you install and configure the Infrastructure Optimization service,
you must create a database, service credentials, and API endpoints.
1. Create the database, complete these steps:
* Use the database access client to connect to the database
server as the ``root`` user:
.. code-block:: console
$ mysql -u root -p
* Create the ``watcher`` database:
.. code-block:: console
CREATE DATABASE watcher CHARACTER SET utf8;
* Grant proper access to the ``watcher`` database:
.. code-block:: console
GRANT ALL PRIVILEGES ON watcher.* TO 'watcher'@'localhost' \
IDENTIFIED BY 'WATCHER_DBPASS';
GRANT ALL PRIVILEGES ON watcher.* TO 'watcher'@'%' \
IDENTIFIED BY 'WATCHER_DBPASS';
Replace ``WATCHER_DBPASS`` with a suitable password.
* Exit the database access client.
.. code-block:: console
exit;
2. Source the ``admin`` credentials to gain access to
admin-only CLI commands:
.. code-block:: console
$ . admin-openrc
3. To create the service credentials, complete these steps:
* Create the ``watcher`` user:
.. code-block:: console
$ openstack user create --domain default --password-prompt watcher
User Password:
Repeat User Password:
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | default |
| enabled | True |
| id | b18ee38e06034b748141beda8fc8bfad |
| name | watcher |
| options | {} |
| password_expires_at | None |
+---------------------+----------------------------------+
* Add the ``admin`` role to the ``watcher`` user:
.. code-block:: console
$ openstack role add --project service --user watcher admin
.. note::
This command produces no output.
* Create the watcher service entities:
.. code-block:: console
$ openstack service create --name watcher --description "Infrastructure Optimization" infra-optim
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Infrastructure Optimization |
| enabled | True |
| id | d854f6fff0a64f77bda8003c8dedfada |
| name | watcher |
| type | infra-optim |
+-------------+----------------------------------+
4. Create the Infrastructure Optimization service API endpoints:
.. code-block:: console
$ openstack endpoint create --region RegionOne \
infra-optim public http://controller:9322
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Infrastructure Optimization |
| enabled | True |
| id | d854f6fff0a64f77bda8003c8dedfada |
| name | watcher |
| type | infra-optim |
+-------------+----------------------------------+
$ openstack endpoint create --region RegionOne \
infra-optim internal http://controller:9322
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 225aef8465ef4df48a341aaaf2b0a390 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | d854f6fff0a64f77bda8003c8dedfada |
| service_name | watcher |
| service_type | infra-optim |
| url | http://controller:9322 |
+--------------+----------------------------------+
$ openstack endpoint create --region RegionOne \
infra-optim admin http://controller:9322
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 375eb5057fb546edbdf3ee4866179672 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | d854f6fff0a64f77bda8003c8dedfada |
| service_name | watcher |
| service_type | infra-optim |
| url | http://controller:9322 |
+--------------+----------------------------------+

View File

@@ -0,0 +1,27 @@
============================================
Infrastructure Optimization service overview
============================================
The Infrastructure Optimization service provides flexible and scalable
optimization service for multi-tenant OpenStack based clouds.
The Infrastructure Optimization service consists of the following components:
``watcher`` command-line client
A CLI to communicate with ``watcher-api`` to optimize the cloud.
``watcher-api`` service
An OpenStack-native REST API that accepts and responds to end-user calls
by processing them and forwarding to appropriate underlying watcher
services via AMQP.
``watcher-decision-engine`` service
It runs audit and return an action plan to achieve optimization goal
specified by the end-user in audit.
``watcher-applier`` service
It executes action plan built by watcher-decision-engine. It interacts with
other OpenStack components like nova to execute the given action
plan.
``watcher-dashboard``
Watcher UI implemented as a plugin for the OpenStack Dashboard.

View File

@@ -0,0 +1,39 @@
===================================
Infrastructure Optimization service
===================================
.. toctree::
:maxdepth: 2
get_started.rst
install.rst
verify.rst
next-steps.rst
The Infrastructure Optimization service (watcher) provides
flexible and scalable resource optimization service for
multi-tenant OpenStack-based clouds.
Watcher provides a complete optimization loop including
everything from a metrics receiver, complex event processor
and profiler, optimization processor and an action plan
applier. This provides a robust framework to realize a wide
range of cloud optimization goals, including the reduction
of data center operating costs, increased system performance
via intelligent virtual machine migration, increased energy
efficiency—and more!
Watcher also supports a pluggable architecture by which custom
optimization algorithms, data metrics and data profilers can be
developed and inserted into the Watcher framework.
Check the documentation for watcher optimization strategies at
https://docs.openstack.org/watcher/latest/strategies/index.html
Check watcher glossary at
https://docs.openstack.org/watcher/latest/glossary.html
This chapter assumes a working setup of OpenStack following the
`OpenStack Installation Tutorial
<https://docs.openstack.org/pike/install/>`_.

View File

@@ -0,0 +1,38 @@
.. _install-rdo:
Install and configure for Red Hat Enterprise Linux and CentOS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This section describes how to install and configure the Infrastructure
Optimization service for Red Hat Enterprise Linux 7 and CentOS 7.
.. include:: common_prerequisites.rst
Install and configure components
--------------------------------
1. Install the packages:
.. code-block:: console
# sudo yum install openstack-watcher-api openstack-watcher-applier \
openstack-watcher-decision-engine
.. include:: common_configure.rst
Finalize installation
---------------------
Start the Infrastructure Optimization services and configure them to start when
the system boots:
.. code-block:: console
# systemctl enable openstack-watcher-api.service \
openstack-watcher-decision-engine.service \
openstack-watcher-applier.service
# systemctl start openstack-watcher-api.service \
openstack-watcher-decision-engine.service \
openstack-watcher-applier.service

View File

@@ -0,0 +1,34 @@
.. _install-ubuntu:
Install and configure for Ubuntu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This section describes how to install and configure the Infrastructure
Optimization service for Ubuntu 14.04 (LTS).
.. include:: common_prerequisites.rst
Install and configure components
--------------------------------
1. Install the packages:
.. code-block:: console
# apt install watcher-api watcher-decision-engine \
watcher-applier
# apt install python-watcherclient
.. include:: common_configure.rst
Finalize installation
---------------------
Restart the Infrastructure Optimization services:
.. code-block:: console
# service watcher-api restart
# service watcher-decision-engine restart
# service watcher-applier restart

View File

@@ -0,0 +1,19 @@
.. _install:
Install and configure
~~~~~~~~~~~~~~~~~~~~~
This section describes how to install and configure the Infrastructure
Optimization service, code-named watcher, on the controller node.
This section assumes that you already have a working OpenStack
environment with at least the following components installed:
Identity Service, Compute Service, Telemetry data collection service.
Note that installation and configuration vary by distribution.
.. toctree::
:maxdepth: 2
install-rdo.rst
install-ubuntu.rst

View File

@@ -0,0 +1,9 @@
.. _next-steps:
Next steps
~~~~~~~~~~
Your OpenStack environment now includes the watcher service.
To add additional services, see
https://docs.openstack.org/pike/install/.

View File

@@ -0,0 +1,119 @@
.. _verify:
Verify operation
~~~~~~~~~~~~~~~~
Verify operation of the Infrastructure Optimization service.
.. note::
Perform these commands on the controller node.
1. Source the ``admin`` project credentials to gain access to
admin-only CLI commands:
.. code-block:: console
$ . admin-openrc
2. List service components to verify successful launch and registration
of each process:
.. code-block:: console
$ openstack optimize service list
+----+-------------------------+------------+--------+
| ID | Name | Host | Status |
+----+-------------------------+------------+--------+
| 1 | watcher-decision-engine | controller | ACTIVE |
| 2 | watcher-applier | controller | ACTIVE |
+----+-------------------------+------------+--------+
3. List goals and strategies:
.. code-block:: console
$ openstack optimize goal list
+--------------------------------------+----------------------+----------------------+
| UUID | Name | Display name |
+--------------------------------------+----------------------+----------------------+
| a8cd6d1a-008b-4ff0-8dbc-b30493fcc5b9 | dummy | Dummy goal |
| 03953f2f-02d0-42b5-9a12-7ba500a54395 | workload_balancing | Workload Balancing |
| de0f8714-984b-4d6b-add1-9cad8120fbce | server_consolidation | Server Consolidation |
| f056bc80-c6d1-40dc-b002-938ccade9385 | thermal_optimization | Thermal Optimization |
| e7062856-892e-4f0f-b84d-b828464b3fd0 | airflow_optimization | Airflow Optimization |
| 1f038da9-b36c-449f-9f04-c225bf3eb478 | unclassified | Unclassified |
+--------------------------------------+----------------------+----------------------+
$ openstack optimize strategy list
+--------------------------------------+---------------------------+---------------------------------------------+----------------------+
| UUID | Name | Display name | Goal |
+--------------------------------------+---------------------------+---------------------------------------------+----------------------+
| 98ae84c8-7c9b-4cbd-8d9c-4bd7c6b106eb | dummy | Dummy strategy | dummy |
| 02a170b6-c72e-479d-95c0-8a4fdd4cc1ef | dummy_with_scorer | Dummy Strategy using sample Scoring Engines | dummy |
| 8bf591b8-57e5-4a9e-8c7d-c37bda735a45 | outlet_temperature | Outlet temperature based strategy | thermal_optimization |
| 8a0810fb-9d9a-47b9-ab25-e442878abc54 | vm_workload_consolidation | VM Workload Consolidation Strategy | server_consolidation |
| 1718859c-3eb5-45cb-9220-9cb79fe42fa5 | basic | Basic offline consolidation | server_consolidation |
| b5e7f5f1-4824-42c7-bb52-cf50724f67bf | workload_stabilization | Workload stabilization | workload_balancing |
| f853d71e-9286-4df3-9d3e-8eaf0f598e07 | workload_balance | Workload Balance Migration Strategy | workload_balancing |
| 58bdfa89-95b5-4630-adf6-fd3af5ff1f75 | uniform_airflow | Uniform airflow migration strategy | airflow_optimization |
| 66fde55d-a612-4be9-8cb0-ea63472b420b | dummy_with_resize | Dummy strategy with resize | dummy |
+--------------------------------------+---------------------------+---------------------------------------------+----------------------+
4. Run an action plan by creating an audit with dummy goal:
.. code-block:: console
$ openstack optimize audit create --goal dummy
+--------------+--------------------------------------+
| Field | Value |
+--------------+--------------------------------------+
| UUID | e94d4826-ad4e-44df-ad93-dff489fde457 |
| Created At | 2017-05-23T11:46:58.763394+00:00 |
| Updated At | None |
| Deleted At | None |
| State | PENDING |
| Audit Type | ONESHOT |
| Parameters | {} |
| Interval | None |
| Goal | dummy |
| Strategy | auto |
| Audit Scope | [] |
| Auto Trigger | False |
+--------------+--------------------------------------+
$ openstack optimize audit list
+--------------------------------------+------------+-----------+-------+----------+--------------+
| UUID | Audit Type | State | Goal | Strategy | Auto Trigger |
+--------------------------------------+------------+-----------+-------+----------+--------------+
| e94d4826-ad4e-44df-ad93-dff489fde457 | ONESHOT | SUCCEEDED | dummy | auto | False |
+--------------------------------------+------------+-----------+-------+----------+--------------+
$ openstack optimize actionplan list
+--------------------------------------+--------------------------------------+-------------+------------+-----------------+
| UUID | Audit | State | Updated At | Global efficacy |
+--------------------------------------+--------------------------------------+-------------+------------+-----------------+
| ba9ce6b3-969c-4b8e-bb61-ae24e8630f81 | e94d4826-ad4e-44df-ad93-dff489fde457 | RECOMMENDED | None | None |
+--------------------------------------+--------------------------------------+-------------+------------+-----------------+
$ openstack optimize actionplan start ba9ce6b3-969c-4b8e-bb61-ae24e8630f81
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| UUID | ba9ce6b3-969c-4b8e-bb61-ae24e8630f81 |
| Created At | 2017-05-23T11:46:58+00:00 |
| Updated At | 2017-05-23T11:53:12+00:00 |
| Deleted At | None |
| Audit | e94d4826-ad4e-44df-ad93-dff489fde457 |
| Strategy | dummy |
| State | ONGOING |
| Efficacy indicators | [] |
| Global efficacy | {} |
+---------------------+--------------------------------------+
$ openstack optimize actionplan list
+--------------------------------------+--------------------------------------+-----------+---------------------------+-----------------+
| UUID | Audit | State | Updated At | Global efficacy |
+--------------------------------------+--------------------------------------+-----------+---------------------------+-----------------+
| ba9ce6b3-969c-4b8e-bb61-ae24e8630f81 | e94d4826-ad4e-44df-ad93-dff489fde457 | SUCCEEDED | 2017-05-23T11:53:16+00:00 | None |
+--------------------------------------+--------------------------------------+-----------+---------------------------+-----------------+

8
doc/source/man/index.rst Normal file
View File

@@ -0,0 +1,8 @@
.. toctree::
:glob:
:maxdepth: 1
watcher-api
watcher-applier
watcher-db-manage
watcher-decision-engine

View File

@@ -5,7 +5,7 @@ Basic Offline Server Consolidation
Synopsis
--------
**display name**: ``basic``
**display name**: ``Basic offline consolidation``
**goal**: ``server_consolidation``
@@ -26,7 +26,7 @@ metric service name plugins comment
``cpu_util`` ceilometer_ none
============================ ============ ======= =======
.. _ceilometer: http://docs.openstack.org/admin-guide/telemetry-measurements.html#openstack-compute
.. _ceilometer: https://docs.openstack.org/ceilometer/latest/admin/telemetry-measurements.html#openstack-compute
Cluster data model
******************
@@ -57,7 +57,7 @@ Planner
Default Watcher's planner:
.. watcher-term:: watcher.decision_engine.planner.default.DefaultPlanner
.. watcher-term:: watcher.decision_engine.planner.weight.WeightPlanner
Configuration
-------------

View File

@@ -5,7 +5,7 @@ Outlet Temperature Based Strategy
Synopsis
--------
**display name**: ``outlet_temperature``
**display name**: ``Outlet temperature based strategy``
**goal**: ``thermal_optimization``
@@ -33,7 +33,7 @@ metric service name plugins comment
``hardware.ipmi.node.outlet_temperature`` ceilometer_ IPMI
========================================= ============ ======= =======
.. _ceilometer: http://docs.openstack.org/admin-guide/telemetry-measurements.html#ipmi-based-meters
.. _ceilometer: https://docs.openstack.org/ceilometer/latest/admin/telemetry-measurements.html#ipmi-based-meters
Cluster data model
******************
@@ -61,7 +61,7 @@ Planner
Default Watcher's planner:
.. watcher-term:: watcher.decision_engine.planner.default.DefaultPlanner
.. watcher-term:: watcher.decision_engine.planner.weight.WeightPlanner
Configuration
-------------
@@ -72,6 +72,9 @@ Strategy parameter is:
parameter type default Value description
============== ====== ============= ====================================
``threshold`` Number 35.0 Temperature threshold for migration
``period`` Number 30 The time interval in seconds for
getting statistic aggregation from
metric data source
============== ====== ============= ====================================
Efficacy Indicator

View File

@@ -0,0 +1,100 @@
======================
Saving Energy Strategy
======================
Synopsis
--------
**display name**: ``Saving Energy Strategy``
**goal**: ``saving_energy``
.. watcher-term:: watcher.decision_engine.strategy.strategies.saving_energy
Requirements
------------
This feature will use Ironic to do the power on/off actions, therefore
this feature requires that the ironic component is configured.
And the compute node should be managed by Ironic.
Ironic installation: https://docs.openstack.org/ironic/latest/install/index.html
Cluster data model
******************
Default Watcher's Compute cluster data model:
.. watcher-term:: watcher.decision_engine.model.collector.nova.NovaClusterDataModelCollector
Actions
*******
.. list-table::
:widths: 30 30
:header-rows: 1
* - action
- description
* - ``change_node_power_state``
- .. watcher-term:: watcher.applier.actions.change_node_power_state.ChangeNodePowerState
Planner
*******
Default Watcher's planner:
.. watcher-term:: watcher.decision_engine.planner.weight.WeightPlanner
Configuration
-------------
Strategy parameter is:
====================== ====== ======= ======================================
parameter type default description
Value
====================== ====== ======= ======================================
``free_used_percent`` Number 10.0 a rational number, which describes the
the quotient of
min_free_hosts_num/nodes_with_VMs_num
``min_free_hosts_num`` Int 1 an int number describes minimum free
compute nodes
====================== ====== ======= ======================================
Efficacy Indicator
------------------
Energy saving strategy efficacy indicator is unclassified.
https://github.com/openstack/watcher/blob/master/watcher/decision_engine/goal/goals.py#L215-L218
Algorithm
---------
For more information on the Energy Saving Strategy please refer to:http://specs.openstack.org/openstack/watcher-specs/specs/pike/implemented/energy-saving-strategy.html
How to use it ?
---------------
step1: Add compute nodes info into ironic node management
.. code-block:: shell
$ ironic node-create -d pxe_ipmitool -i ipmi_address=10.43.200.184 \
ipmi_username=root -i ipmi_password=nomoresecret -e compute_node_id=3
step 2: Create audit to do optimization
.. code-block:: shell
$ openstack optimize audittemplate create \
at1 saving_energy --strategy saving_energy
$ openstack optimize audit create -a at1
External Links
--------------
*Spec URL*
http://specs.openstack.org/openstack/watcher-specs/specs/pike/implemented/energy-saving-strategy.html

View File

@@ -33,7 +33,7 @@ power ceilometer_ kwapi_ one point every 60s
======================= ============ ======= =======
.. _ceilometer: http://docs.openstack.org/admin-guide/telemetry-measurements.html#openstack-compute
.. _ceilometer: https://docs.openstack.org/ceilometer/latest/admin/telemetry-measurements.html#openstack-compute
.. _monasca: https://github.com/openstack/monasca-agent/blob/master/docs/Libvirt.md
.. _kwapi: https://kwapi.readthedocs.io/en/latest/index.html

View File

@@ -5,7 +5,7 @@ Uniform Airflow Migration Strategy
Synopsis
--------
**display name**: ``uniform_airflow``
**display name**: ``Uniform airflow migration strategy``
**goal**: ``airflow_optimization``
@@ -59,7 +59,7 @@ Planner
Default Watcher's planner:
.. watcher-term:: watcher.decision_engine.planner.default.DefaultPlanner
.. watcher-term:: watcher.decision_engine.planner.weight.WeightPlanner
Configuration
-------------

View File

@@ -5,7 +5,7 @@ VM Workload Consolidation Strategy
Synopsis
--------
**display name**: ``vm_workload_consolidation``
**display name**: ``VM Workload Consolidation Strategy``
**goal**: ``vm_consolidation``
@@ -22,7 +22,7 @@ The *vm_workload_consolidation* strategy requires the following metrics:
============================ ============ ======= =======
metric service name plugins comment
============================ ============ ======= =======
``memory`` ceilometer_ none
``memory`` ceilometer_ none
``disk.root.size`` ceilometer_ none
============================ ============ ======= =======
@@ -32,11 +32,11 @@ the strategy if available:
============================ ============ ======= =======
metric service name plugins comment
============================ ============ ======= =======
``memory.usage`` ceilometer_ none
``memory.resident`` ceilometer_ none
``cpu_util`` ceilometer_ none
============================ ============ ======= =======
.. _ceilometer: http://docs.openstack.org/admin-guide/telemetry-measurements.html#openstack-compute
.. _ceilometer: https://docs.openstack.org/ceilometer/latest/admin/telemetry-measurements.html#openstack-compute
Cluster data model
******************
@@ -67,7 +67,21 @@ Planner
Default Watcher's planner:
.. watcher-term:: watcher.decision_engine.planner.default.DefaultPlanner
.. watcher-term:: watcher.decision_engine.planner.weight.WeightPlanner
Configuration
-------------
Strategy parameter is:
====================== ====== ============= ===================================
parameter type default Value description
====================== ====== ============= ===================================
``period`` Number 3600 The time interval in seconds
for getting statistic aggregation
from metric data source
====================== ====== ============= ===================================
Efficacy Indicator

View File

@@ -5,7 +5,7 @@ Watcher Overload standard deviation algorithm
Synopsis
--------
**display name**: ``workload_stabilization``
**display name**: ``Workload stabilization``
**goal**: ``workload_balancing``
@@ -28,7 +28,7 @@ metric service name plugins comment
``memory.resident`` ceilometer_ none
============================ ============ ======= =======
.. _ceilometer: http://docs.openstack.org/admin-guide/telemetry-measurements.html#openstack-compute
.. _ceilometer: https://docs.openstack.org/ceilometer/latest/admin/telemetry-measurements.html#openstack-compute
.. _SNMP: http://docs.openstack.org/admin-guide/telemetry-measurements.html
Cluster data model
@@ -58,7 +58,7 @@ Planner
Default Watcher's planner:
.. watcher-term:: watcher.decision_engine.planner.default.DefaultPlanner
.. watcher-term:: watcher.decision_engine.planner.weight.WeightPlanner
Configuration
-------------
@@ -100,7 +100,7 @@ parameter type default Value description
into which the samples are
grouped for aggregation.
Watcher uses only the last
period of all recieved ones.
period of all received ones.
==================== ====== ===================== =============================
.. |metrics| replace:: ["cpu_util", "memory.resident"]

View File

@@ -5,7 +5,7 @@ Workload Balance Migration Strategy
Synopsis
--------
**display name**: ``workload_balance``
**display name**: ``Workload Balance Migration Strategy``
**goal**: ``workload_balancing``
@@ -25,9 +25,10 @@ The *workload_balance* strategy requires the following metrics:
metric service name plugins comment
======================= ============ ======= =======
``cpu_util`` ceilometer_ none
``memory.resident`` ceilometer_ none
======================= ============ ======= =======
.. _ceilometer: http://docs.openstack.org/admin-guide/telemetry-measurements.html#openstack-compute
.. _ceilometer: https://docs.openstack.org/ceilometer/latest/admin/telemetry-measurements.html#openstack-compute
Cluster data model
@@ -56,7 +57,7 @@ Planner
Default Watcher's planner:
.. watcher-term:: watcher.decision_engine.planner.default.DefaultPlanner
.. watcher-term:: watcher.decision_engine.planner.weight.WeightPlanner
Configuration
-------------
@@ -66,6 +67,9 @@ Strategy parameters are:
============== ====== ============= ====================================
parameter type default Value description
============== ====== ============= ====================================
``metrics`` String 'cpu_util' Workload balance base on cpu or ram
utilization. choice: ['cpu_util',
'memory.resident']
``threshold`` Number 25.0 Workload threshold for migration
``period`` Number 300 Aggregate time period of ceilometer
============== ====== ============= ====================================
@@ -90,7 +94,7 @@ How to use it ?
at1 workload_balancing --strategy workload_balance
$ openstack optimize audit create -a at1 -p threshold=26.0 \
-p period=310
-p period=310 -p metrics=cpu_util
External Links
--------------

Some files were not shown because too many files have changed in this diff Show More