Commit Graph

143 Commits

Author SHA1 Message Date
Tobias Urdin e36b77ad6d Use new get_rpc_client API from oslo.messaging
Use the new API that is consistent with
the existing API instead of instantiating the client
class directly.

This was introduced in release 14.1.0 here [1] and
added into oslo.messaging here [2]

[1] https://review.opendev.org/c/openstack/requirements/+/869340
[2] https://review.opendev.org/c/openstack/oslo.messaging/+/862419

Change-Id: I43c399a0c68473e40b8b71e9617c8334a439e675
2023-01-19 20:50:26 +00:00
zhurong 01d74d0a87 Remove ceilometerclient dependecy
Change-Id: Ifa0f2493aa8414a29dc2722b6636a33bc5808be6
2022-01-07 05:48:22 +00:00
Ghanshyam Mann 863815153e [goal] Deprecate the JSON formatted policy file
As per the community goal of migrating the policy file
the format from JSON to YAML[1], we need to do two things:

1. Change the default value of '[oslo_policy] policy_file''
config option from 'policy.json' to 'policy.yaml' with
upgrade checks.

2. Deprecate the JSON formatted policy file on the project side
via warning in doc and releasenotes.

Also replace policy.json to policy.yaml ref from doc and tests.

[1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html

Change-Id: I207c02ba71fe60635fd3406c9c9364c11f259bae
2021-02-12 19:59:27 +00:00
Ghanshyam Mann 76270c8383 Fix gate requirement checks job
Current requirements-check job is failing with
below error:

ERROR: Requirement for package PrettyTable excludes a version not excluded in the global list.
  Local settings : {'<0.8'}
  Global settings: set()
  Unexpected     : set()
Validating test-requirements.txt

Keeping PrettyTable same as what we have in openstack/requirements repo

Change-Id: I63633d2932757ca23bcea69fd655a2499a5b6d31
2021-02-12 18:58:23 +00:00
Ghanshyam Mann e21e5f609e [goal] Migrate testing to ubuntu focal
As per victoria cycle testing runtime and community goal[1]
we need to migrate upstream CI/CD to Ubuntu Focal(20.04).

Fixing:
- bug#1886298
Bump the lower constraints for required deps which added python3.8 support
in their later version.

- Move multinode jobs to focal nodeset

Story: #2007865
Task: #40227

Closes-Bug: #1886298

[1] https://governance.openstack.org/tc/goals/selected/victoria/migrate-ci-cd-jobs-to-ubuntu-focal>

Depends-On: https://review.opendev.org/#/c/752294/

Change-Id: Iec953f3294087cd0b628b701ad3d684cea61c057
2020-09-17 10:59:59 +00:00
Hervé Beraud b0c411b22a Cap jsonschema 3.2.0 as the minimal version
Previous versions of jsonschema (<3.2.0) doesn't support python 3.8 [1].
Python 3.8 is part of the victoria supported runtimes [2] so we now force
to use jsonschema version 3.2.0 to avoid issues, remove ambiguity and ensure
that everything works with python 3 in general.

[1] https://github.com/Julian/jsonschema/pull/627
[2] https://governance.openstack.org/tc/reference/runtimes/victoria.html#python-runtimes-for-victoria

Change-Id: Id476227552c3fa91eecadbc6c4370c354f56a40d
2020-06-05 03:39:13 +00:00
Andreas Jaeger 9d495618d2 Fix requirements check
Remove python_version so that requirements-check passes again.

Change-Id: I46c6118d9b29a17a3186b3fd5f47115236913a16
2020-05-21 12:35:46 +02:00
chenker 5071c8f8fa Remove six[8] remove requirement&low-requirement
Change-Id: I84de517a08a87936f6a9015de350dcda2e24bcef
2020-04-22 16:04:00 +08:00
licanwei 4a269ba039 Change self.node to self.nodes in model_root
networkx removed G.node in version 2.4[1]
G.node was replaced by G.nodes since version 2.0[2],
and supports Python 2.7, 3.5, 3.6 and 3.7 from 2.2
so the lower constraint version is 2.2.
lib task_flow also invokes lib networkx,
task_flow version is also needed to be updated.
[1]: https://networkx.github.io/documentation/stable/release/release_2.4.html
[2]: https://networkx.github.io/documentation/stable/release/release_2.0.html
Change-Id: I268bcf57ec977bd8132a9f1573b28b681cb4ce1e
Closes-Bug: #1854132
2019-11-27 17:19:29 +08:00
Ghanshyam Mann 17f5a65a62 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

Watcher is ready with python 3 and ok to drop the
python 2.7 support.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Depends-On: https://review.opendev.org/#/c/693631/

Change-Id: I603c6d2c22779e8ef2e70eb6369fc521a77c9c3a
2019-11-16 14:55:01 +00:00
licanwei 519ca2c9fb Fix unit test failed
ironic removed 'os_endpoint_type' and instead with 'interface'

Change-Id: Ifa21645e19b8311de35cb9b0b8f39371b8713a2f
2019-09-21 14:39:45 +08:00
licanwei 3d741d05aa Improve Compute Data Model
The fields(vcpus, memory and disk_capacity) in the Watcher ComputeNode
do not take allocation ratios used for overcommit into account so there
may be disparity between this and the used count.
This patch added some new fields to solve this problem.

Partially Implements: blueprint improve-compute-data-model

Change-Id: Id33496f368fb23cb8e744c7e8451e1cd1397866b
2019-07-22 10:22:35 +08:00
Matt Riedemann 3f76f9cfdb Optimize hypervisor API calls
The nova CDM builder code and notification handling
code had some inefficiencies when it came to looking
up a hypevisor to get details. The general pattern
used before was:

1. get the minimal hypervisor information by hypervisor_hostname
2. make another query to get the hypervisor details by id

In the notifications case, it was actually three calls because
the first is listing hyprvisors to filter client-side by service
host.

This change collapses 1 and 2 above into a single API call
to get the hypervisor by hypervisor_hostname with details
which will include the service (compute) host information
which is what get_compute_node_by_id() was being used for.
Now that nothing is using get_compute_node_by_id it is removed.

There is more work we could do in get_compute_node_by_hostname
if the compute API allowed filtering hypervisors by service
host so a TODO is left for that.

One final thing: the TODO in get_compute_node_by_hostname about
there being more than one hypervisor per compute service host
for vmware vcenter is not accurate - nova's vcenter driver
hasn't supported a host:node 1:M topology like that since the
Liberty release [1]. The only in-tree driver in nova that supports
1:M is the ironic baremetal driver, so the comment is updated.

[1] Ifc17c5049e3ed29c8dd130339207907b00433960

Depends-On: https://review.opendev.org/661785/
Change-Id: I5e0e88d7b2dd1a69117ab03e0e66851c687606da
2019-06-03 12:18:54 -04:00
Matt Riedemann 838768c76e Fix bandit runs with 1.6.0
The -x option for bandit changed in 1.6.0 and now
supports glob patterns so use that to correctly
exclude test code from bandit scans.

Since this change requires bandit>=1.6.0, we have
to also fix the networkx requirement to pass the
requirements-check job so that the networkx requirement
matches what is in global-requirements from change
I0a9700926c9a0db93e782c853c33f1aaee3d4876.

Change-Id: I4fc1166daee5d8739296419216d11d684be27c0a
Closes-Bug: #1828419
2019-05-09 11:14:40 -04: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 0ed016182e Merge "Fix lower-constraint deps handling" 2019-04-04 13:11:21 +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
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
Zuul 3c9a4f86b1 Merge "API Microversioning" 2018-10-31 13:05:51 +00:00
Alexander Chadin c4a30153f1 API Microversioning
This patch set adds API microversion support along
with the first API microversion: start/end time for
CONTINUOUS audits.

APIImpact

Implements: blueprint api-microversioning
Depends-On: I6bb838d777b2c7aa799a70485980e5dc87838456
Change-Id: I17309d80b637f02bc5e6d33294472e02add88f86
2018-10-29 08:45:32 +00:00
akhiljain23 d621f72730 Add framework for watcher-status upgrade check
This commit adds the functionality of watcher-status CLI for performing
upgrade checks as part of the Stein cycle upgrade-checkers goal.
It only includes a sample check which must be replaced by real checks in
future.

Change-Id: Ic3d066af439797d6f705e805334f729b52ce3aac
Story: 2003657
Task: 26164
2018-10-22 13:51:56 +05:30
licanwei b92a26345f remove voluptuous
We have replaced voluptuous with jsonschema in [1].
Now voluptuous can be removed.
[1]: https://review.openstack.org/#/c/561182/

Change-Id: I99c65ed79ef166839838559a808ee7607389e07a
2018-07-30 19:03:26 -07:00
licanwei 6fcdb5e74b update monascaclient version
TimingSession is removed and replaced by keystone session (see [1]).
monasca client fixed it in [2].
Watcher need to update monascaclient version
[1] https://review.openstack.org/#/c/579139/
[2] https://review.openstack.org/#/c/582882

Closes-Bug: #1782276
Change-Id: I567b7727cbfe645c4d16e06a8cbb8eb8e33eb872
Co-Authored-By: zhurong <aaronzhu1121@gmail.com>
2018-07-20 14:34:10 +03:00
Alexander Chadin 44fc7d5799 Restore requirements versions
Change-Id: I7704778324d7597d5df2de6b77f6b914d948d6fa
2018-06-13 15:08:11 +03:00
Alexander Chadin 8c8e58e7d9 Update requirements
Change-Id: Iee6ca0a49f8b1d67dd0d88f9a2cf9863b2c6c7bf
2018-04-19 11:10:39 +03:00
OpenStack Proposal Bot f49d0555e7 Updated from global requirements
Change-Id: Ia731e87abd108b07193f869322ba32b0c130c26e
2018-03-26 08:31:14 +00:00
OpenStack Proposal Bot bd57077bfe Updated from global requirements
Change-Id: I3aa816dadb10cb52b431edb928b789df4dca337d
2018-03-15 09:40:18 +00:00
OpenStack Proposal Bot 5ac65b7bfc Updated from global requirements
Change-Id: I998ce5743e58a8c6bf754a15e491d7bce44e7264
2018-02-17 10:30:58 +00:00
OpenStack Proposal Bot e399d96661 Updated from global requirements
Change-Id: Ibed48beff0bf4537644641fd149e39d54a21d475
2018-02-14 12:37:35 +00:00
OpenStack Proposal Bot 3a70225164 Updated from global requirements
Change-Id: Ifb8d8d6cb1248eaf8715c84539d74fa04dd753dd
2018-02-01 07:36:19 +00:00
OpenStack Proposal Bot a36a309e2e Updated from global requirements
Change-Id: I29ebfe2e3398dab6f2e22f3d97c16b72843f1e34
2018-01-29 00:42:54 +00:00
OpenStack Proposal Bot 42130c42a1 Updated from global requirements
Change-Id: I4ef734eeaeee414c3e6340490f1146d537370127
2018-01-16 12:57:22 +00:00
OpenStack Proposal Bot 6f27275f44 Updated from global requirements
Change-Id: I26c1f4be398496b88b69094ec1804b07f7c1d7f1
2017-12-23 10:18:41 +00:00
OpenStack Proposal Bot ec0c359037 Updated from global requirements
Change-Id: I96d4a5a7e2b05df3f06d7c08f64cd9bcf83ff99b
2017-12-19 01:52:42 +00:00
OpenStack Proposal Bot 9ccd17e40b Updated from global requirements
Change-Id: I0af2c9fd266f925af5e3e8731b37a00dab91d6a8
2017-12-15 22:24:15 +00:00
OpenStack Proposal Bot 4ce1a9096b Updated from global requirements
Change-Id: I04a2a04de3b32570bb0afaf9eb736976e888a031
2017-12-07 13:53:09 +00:00
OpenStack Proposal Bot a8f08065fd Updated from global requirements
Change-Id: I2171946082a8a9daf7e5edc20bfe0c8cb084768f
2017-12-05 16:58:02 +00:00
OpenStack Proposal Bot 5969e5b52a Updated from global requirements
Change-Id: Idc1a12df6d888880ff7858cff18cc1972920204d
2017-11-29 09:26:19 +00: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
OpenStack Proposal Bot 6c29df11ca Updated from global requirements
Change-Id: I691bd81b1b9933211faa336b1ac49aa5a1a7bf17
2017-11-06 02:07:12 +00:00
OpenStack Proposal Bot e5031ef04a Updated from global requirements
Change-Id: I973ef2867d95fe4f70a43c9015f7571188dc13cd
2017-10-12 22:07:21 +00:00
OpenStack Proposal Bot 25854aabd8 Updated from global requirements
Change-Id: I86b2ed25f98f022597d58335461efc9e0ff61b26
2017-09-24 12:31:19 +00:00
OpenStack Proposal Bot 998e86f6c7 Updated from global requirements
Change-Id: I464b3573c2dbab3d97efbec0280298b0331a3cef
2017-09-16 23:26:49 +00:00
OpenStack Proposal Bot 1df395d31d Updated from global requirements
Change-Id: I52665af336d0a0c765d034368a554005505cf30a
2017-09-14 00:11:17 +00:00
OpenStack Proposal Bot 8f585c3def Updated from global requirements
Change-Id: If2d709b80f1783a5b14c9eda4d15da13c9ba5234
2017-09-02 12:15:38 +00:00
OpenStack Proposal Bot 62822fa933 Updated from global requirements
Change-Id: I31aaf37bf1ea73c26d9578abe167b43a24bb6c96
2017-08-24 11:51:24 +00:00
OpenStack Proposal Bot 1c5e254124 Updated from global requirements
Change-Id: I48a42877f8157873f4ea376c72d170d978d5e090
2017-08-24 06:03:14 +00:00