1965 Commits

Author SHA1 Message Date
Dantali0n
567e079848 Remove unused exceptions
Change-Id: Ibb7e3fa4052f04a4e3fc1de60afa6fbafd4a7f9b
2019-05-09 18:54:47 +02:00
chenke
e2285777e2 Using node replace resource_id in method add_action_disable_node()
We have a bp to add resource_name in action input parameter field.

Before doing this, one of this method's parameter should be node
instead of resource_id.

Change-Id: I4ce5ae97efce98d80a460fd6003df3cc5cacab82
2019-05-07 15:07:07 +08:00
Zuul
30104ae4ae Merge "Put the method add_migration() in base.py" 2019-05-07 06:00:56 +00:00
chenke
4d480d5ccf Put the method add_migration() in base.py
Change-Id: I00bc03be6a59edf117b66388305486d8f74f77ce
2019-05-06 14:29:21 +08:00
Zuul
8ac5e620f4 Merge "Resolve problems with audit scope and add tests" 2019-04-30 09:20:27 +00:00
Dantali0n
d84f8c50f5 Resolve problems with audit scope and add tests
This resolves problems with the audit scope such as the scope being
ignored, the scope not merging due to a type in .append, change update
into .add method when adding single elements to a set and making the
access of dict keys and values as lists work in python 3.7.

All these methods from the model builder now have tests to prevent
regressions.

Co-Authored-By: Canwei Li <li.canwei2@zte.com.cn>

Change-Id: I287763d5e426ff860aefabc4a1f3fe3f51accd76
2019-04-30 07:12:56 +00:00
chenke
d2e1d69d37 Replace git.openstack.org with opendev.org
Change-Id: Ibccf32b71d307d9c80c91035907dc8292722ab31
2019-04-29 09:49:24 +02:00
Zuul
92c94f61ca Merge "Add hardware.cpu_util in workload_stabilization" 2019-04-26 02:36:20 +00:00
Tatiana Kholkina
4db39c527d Add hardware.cpu_util in workload_stabilization
Since commit I8df8921337ea3f4e751c0c822d823e64e3ca7e1c
the check for hardware.cpu.util was removed.
But it can be still used in workload stabilization.

Change-Id: I301487837aac2e1e63bce16a79d0f8136452c313
2019-04-25 07:31:34 +00:00
Zuul
2a1c353014 Merge "separate launching audit scheduler" 2019-04-25 07:03:56 +00:00
zhulingjie
647b5e9483 Drop use of git.openstack.org
Our cgit instance will be going away and opendev.org is the new
preferred URL for browsing our git repos. Redirects will exist for the
foreseeable future, but it's more efficient to just go directly to the
new locations.

Change-Id: I7dd9d454da63167832bab02c89be98a2ce03b72a
2019-04-23 13:20:10 +02:00
Zuul
b880a57a8b Merge "Replace HOST_IP to SERVICE_HOST" 2019-04-20 04:56:17 +00:00
OpenDev Sysadmins
62da2984b8 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:40:45 +00:00
licanwei
0def7b4d38 separate launching audit scheduler
Now there are only one scheduler for launching audit task and
executing audit jobs. We have found an exception where the scheduler
stops for some reason when executing audit.
In order to keep launching audit task normal, we need to split into
two schedulers.

Change-Id: I45dccaf062290cfc7d7fcfc27fe11d6f87f38afa
2019-04-19 14:30:09 +08:00
licanwei
f36c25b52f Replace HOST_IP to SERVICE_HOST
HOST_IP only used by ipv4, SERVICE_HOST is used by ipv4 or ipv6.

Change-Id: I50d66f4fbe9cd80e32fe4cf67f8a6ae19b500c0d
2019-04-19 11:42:59 +08:00
licanwei
f52716fcf9 remove py35
We hava python3.6 and python3.7 now, it's enough.

https://governance.openstack.org/tc/reference/runtimes/train.html

Change-Id: I54b18fb0bd7674760603de841c28c8b1fda77c56
2019-04-16 16:24:53 +08:00
Zuul
57fd68128e Merge "Adapt Watcher to Python3.7" 2019-04-12 04:36:42 +00:00
chenke
8cb4c8e406 Uncap jsonschema
Reference commit:
https://review.openstack.org/#/c/649799/
https://review.openstack.org/#/c/649669/2/global-requirements.txt

Change-Id: I01a056ee6ce89ec0416290de84b0043126aa668f
2019-04-11 20:03:42 +08:00
Zuul
721b710e2f Merge "Make datasource methods match names of metrics" 2019-04-11 03:13:51 +00:00
Zuul
0ed016182e Merge "Fix lower-constraint deps handling" 2019-04-04 13:11:21 +00:00
Zuul
33009db64a Merge "Move eventlet monkey patch code" 2019-04-04 11:28:54 +00:00
Zuul
9d96c12441 Merge "Fix openstack-tox-lower-constraint TIMED_OUT Error" 2019-04-04 11:27:58 +00:00
licanwei
2df5ab926e Fix docs gate failed
Change-Id: I334b76ce9284a41583e06bdd05900ba2baf4dc64
2019-04-04 14:56:41 +08:00
Zuul
187b0e6a4b Merge "Update meeting schedule to new bi-weekly format" 2019-04-01 01:28:16 +00:00
Zuul
eafeb94a01 Merge "Replace openstack.org git:// URLs with https://" 2019-04-01 01:28:14 +00:00
Alexander Chadin
6dfeeb7359 Adapt Watcher to Python3.7
There are some issues with bundle of eventlet, taskflow and
apscheduler on Python 3.7.
According to [0], replace ThreadPoolExecutor with
GreenThreadPoolExecutor

[0]: http://lists.openstack.org/pipermail/openstack-dev/2018-July/132481.html

Co-Authored-By: Canwei Li <li.canwei2@zte.com.cn>

Change-Id: I989d7155eb8764088f91b3ca0d1f47ac6332bf11
2019-03-30 14:43:31 +08:00
licanwei
ac3aa94599 Move eventlet monkey patch code
Eventlet monkey patching is not recommended on top level __init__ [1],
because Apache WSGI module uses own concurrency model [2] and API
service under Apache should be runned without eventlet. This patch
moves eventlet monkey patching code to watcher.cmd module __init__
(like in nova).

[1] https://specs.openstack.org/openstack/openstack-specs/specs/eventlet-best-practices.html
[2] http://modwsgi.readthedocs.io/en/develop/user-guides/processes-and-threading.html

Change-Id: Ie5cf67429ea9ef8d00dd7348ce288437ea105c08
2019-03-30 14:28:52 +08:00
Sean McGinnis
68a90b2cfa Fix lower-constraint deps handling
When the lower-constraints tox target was added, it was assumed the
install_command was just running the install and that the dependencies
and constraints were being set using "deps = ".

This fixed the install_command and deps to follow the expected pattern
so the lower-constraints job actual does install the lower constraints.

This also raises the oslo.context minimum as
Ic96c1f1e1a80099d9dafa95a014fc47f05b88e42 added a dependency on a newer
versions kwarg.

Depends-On: https://review.openstack.org/#/c/647726/

Change-Id: I4cc2c3ac158a607b22295c50f83896969a4007ee
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2019-03-28 04:43:05 +00:00
chenke
7f495e8e6f Fix openstack-tox-lower-constraint TIMED_OUT Error
When use tox-elower-constraint, we will meet these errors:

1. line 417, in test_clients_ironic:
b"AssertionError: Expected call: Client('1', endpoint_override...
b"Actual call: Client('1', 'http://localhost:6385/'...

2. line 39, in test_wrong_major_version:
b"KeyError: 'HTTP_ACCEPT'"

3. RUN END RESULT_TIMED_OUT:
[untrusted : git.openstack.org/openstack-infra/
zuul-jobs/playbooks/tox/run.yaml@master]

For the first error, The reason is that the unittest for the
ironicclient is too strict and must be adapted to the latest code.
In fact, the watcher can use the previous ironicclient version.
Therefore, we modified the unittest so that the watcher does not
have to rely on the latest ironicclient version.

For the second error, The reason is that we need to update the minimum
version of pecan and webOb.

For the third error, the reason is that the version of the oslo_messaging
is too low.

Change-Id: Icb3eda3d27fa4452e13e2dcd3c016cc76fc2c7c7
2019-03-28 12:34:31 +08:00
Dantali0n
3b80b35270 Update meeting schedule to new bi-weekly format
Change-Id: I24bca9cd07262387282acc9ba458e9ef50587146
2019-03-26 16:36:34 +01:00
Dantali0n
c8e4efcd0b Make datasource methods match names of metrics
Metrics for datasources now match the name of their corresponding
abstract methods. This ensures that developers know how the method
is named if they know the name of the metric and vice versa.

Change-Id: I0f9d400432d8182b3f10a0da97155e6cb786690e
2019-03-26 08:53:25 +01:00
Ian Wienand
b023c9076f Replace openstack.org git:// URLs with https://
This is a mechanically generated change to replace openstack.org
git:// URLs with https:// equivalents.

This is in aid of a planned future move of the git hosting
infrastructure to a self-hosted instance of gitea (https://gitea.io),
which does not support the git wire protocol at this stage.

This update should result in no functional change.

For more information see the thread at

 http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003825.html

Change-Id: I3452a7802dde00d8be32c833d714b2974be58e16
2019-03-24 20:36:25 +00:00
OpenStack Proposal Bot
ab03bf9bb0 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ifa76c8ec76263a9c3af0c7d463ec686e4bf4fa22
2019-03-22 09:11:07 +00:00
871a01f554 Update master for stable/stein
Add file to the reno documentation build to show release notes for
stable/stein.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/stein.

Change-Id: I25931207ed6066f905fe66ca504fa230e40d12dc
Sem-Ver: feature
2019-03-21 10:36:18 +00:00
Zuul
807857c85b Merge "Migrate legacy jobs to Ubuntu Bionic" 2019-03-19 04:04:17 +00:00
Zuul
922783a5f8 Merge "Move client function test to watcher-tempest-plugin" 2.0.0.0rc1 2.0.0 2019-03-16 10:15:57 +00:00
zhurong
c8bfb3b188 Move client function test to watcher-tempest-plugin
Depends-On: https://review.openstack.org/643244
Change-Id: I463203fee608be6684a09326d189d0254696d8e0
2019-03-15 03:49:54 +00:00
Tatiana Kholkina
e830d3793e Access to action's uuid by key
Change-Id: I9fe992be8f54de51f0c8e0a9fcf7880c68360929
Closes-Bug: #1818962
2019-03-14 11:51:48 +03:00
ghanshyam
a4865b64f6 Migrate legacy jobs to Ubuntu Bionic
We have migrated the zuulv3 job to Bionic during Dec/Jan month.
 - http://lists.openstack.org/pipermail/openstack-discuss/2018-December/000837.html
 - https://etherpad.openstack.org/p/devstack-bionic
But that effort does not move all gate job to Bionic as there are
large amount of jobs are still legacy jobs. All the legacy jobs still
use Xenial as nodeset.

As per the decided runtime for Stein, we need to test everything on openstack
CI/CD on Bionic - https://governance.openstack.org/tc/reference/runtimes/stein.html

Below patch move the legacy base jobs to bionic which will move the derived jobs
automatically to bionic. These jobs are modified with branch variant so that they will use
Bionic node from stein onwards and xenial for all other stable branches
until stable/rocky.
- https://review.openstack.org/#/c/639096

This commit remove the overridden nodeset from legacy jobs
so that it will start using the nodeset defined in parent job.

More Details: 
- https://etherpad.openstack.org/p/legacy-job-bionic
- http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003614.html

Depends-On: https://review.openstack.org/#/c/639096
Change-Id: I99646904d3d0fb26f4e45df1be841a67c4c2477b
2019-03-13 04:15:50 +00:00
licanwei
a3e5b26ca4 releasenote for data model scope
Change-Id: Ie83b472152d6bd0d4e7435d224ad32c240587ada
2019-03-13 10:16:52 +08:00
Zuul
c1bb0ae443 Merge "Remove unused type check 'int' in audit.py" 2019-03-12 01:52:25 +00:00
Zuul
23cac6813b Merge "scope for datamodel" 2019-03-11 12:40:24 +00:00
Zuul
8d2c249f4b Merge "Generalize exceptions & structure of strategies" 2019-03-11 12:40:24 +00:00
Zuul
baf90dcc1b Merge "Fix unittest failed" 2019-03-11 09:32:30 +00:00
licanwei
6da31b42cb Fix unittest failed
ironicclient added 'interface' argument
https://review.openstack.org/#/c/640491/

Change-Id: I3cf826846281b44a346694a49059578b9fd4c0f1
2019-03-11 14:05:12 +08:00
chenke
9435418bc0 Remove unused type check 'int' in audit.py
Although this method does not report an error, this type check 'int'
is redundant and may be misleading.

Refercnce code url: https://github.com/openstack/wsme/blob/master/wsme/api.py

Change-Id: I631b5f9901790666e7f20275e8c8b99f06f06f0a
2019-03-11 12:03:40 +08:00
Dantali0n
b24bd7a3bb Generalize exceptions & structure of strategies
Many strategies execute very similar statements especially in
pre_execute and some might raise errors that others might not. This
same pattern of many similar statements can also be observed in
strategies their tests.

This patch addresses these issues, firstly; the BaseStrategy class gets
1 additional method _pre_execute which allows for general logic that
most strategies perform at that stage. This method can be executed
before the similarly named method of the superclass. A notable change
is that _pre_execute now handles common exception handling for
ClusterStateStale & ClusterStateNotDefined exceptions.

A similar pattern is applied to the test classes of the strategies
each of these classes now inherits from the TestBaseStrategy class.
This class provides the common attributes almost every test class for
the strategies requires such as: The mocked compute_model, mocked
audit_scope and an instance of FakerModelCollector.

Finally, some minor changes were required in test_strategy_context
& test_audit_handlers and exceptions around 0 nodes in cluster or
storage are removed.

Change-Id: Ia7154376b2448aac65cf17999cc8c3e1c8309b5b
2019-03-08 08:14:48 +01:00
licanwei
f337c67bfe scope for datamodel
This patch adds a scope to the datamodel, which only gets the VMs
 of the specified nodes, and no longer gets all VMs from nova.

Implements: blueprint scope-for-watcher-datamodel
Change-Id: Ic4659d1f18af181203439a8bf1b38805ff34c309
2019-03-08 14:30:18 +08:00
chenke
eb48cee9ab Fix inappropriate description about the audit_state_machine.png
Audit will only failed if an exception occured.
The situation that no solution found will not cause audit failed.

Change-Id: Ib9c3c3505f31c14500926ec13aa865dc8f7aa310
2019-03-07 17:08:53 +08:00
Zuul
29d29ef07a Merge " improve _collect_aggregates" 2019-03-06 03:29:37 +00:00