Commit Graph

39 Commits

Author SHA1 Message Date
Stephen Finucane 50a46964a2 db: Add initial alembic configuration
No migrations yet: this is simply the output of 'alembic init' with some
minor tweaks.

Change-Id: Ib9423c2f751d7ec0a0dec89bdc39f9b6ab043655
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-12-21 15:57:33 +00:00
Stephen Finucane 94257be795 pre-commit: Update dependencies
We also bump the hacking version and remove some unnecessary notes from
the top of the requirements files: these don't apply with the dependency
resolver introduced in pip 20.3.

Change-Id: Ifebaec916264bfd10eec13040295719fd47ae107
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-12-21 09:13:09 +00:00
Tobias Urdin 73e35991ff 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: Ica14ddd31fa6be22b0d1f4bed26f266c6d9f660f
2023-01-23 19:22:07 +00:00
Mitya_Eremeev 9fef8807cf DLM to fix host notification race.
Two concurrent events that host is down
might be accepted by different instances of API
which triggers two evacuation workflows for instances.
Patch introduces distributed lock for creation of
host type notifications. It solves the issue.

Closes-Bug: 1961110
Change-Id: Ie8f10b14f29a8548181560cd8a26b4dc79afc3dc
2022-07-19 09:31:47 +00:00
Ghanshyam Mann 513c29078f [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: Iad942530b5d540af3d3c074e9944687b93bcd7f2
2020-12-23 00:47:36 +00:00
Radosław Piliszek d4b0b4f5e2 Drop Babel from reqs
Not needed per [1].

[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-April/014227.html

Change-Id: I28dce9bacd6ed730e20121fa46a92998f79ad7d3
2020-09-12 09:20:04 +00:00
jacky06 0aca188c1b [Part7]Remove all usage of six library
Convert all code to not require six library and instead
use python 3.x logic.

We don't need this in a Python 3-only world.

Depends-On: Ibfee28132e102c40d0eb5b8dc73228ec8fb9ce98
Depends-On: Ibe08ffa9072f1f0c1090f2b9e2ab9af59474d6b1
Depends-On: Ic4d00d081699015ccc2d529b872a17565c881c4e
Depends-On: I2995305abf7cb704f0fe4db9634c87ea2ed378b4
Depends-On: Id9192849a78d57ecfefe1dc20f931406884e055e
Depends-On: I0147dc00943e13531ffb5e2701a91c2d2838958b

Change-Id: I764e61b86cdcaa9e74b1281344599f2d3a13d68f
Co-Authored-By: zhoulinhui <df.some@foxmail.com>
2020-09-11 17:28:57 +00:00
Ghanshyam Mann 233a61d1e0 [CI] Fix gate - multiple fixes (Focal/Py38 and policy)
Suppress of policy deprecation warnings. oslo.policy logs the
deprecated policy warnings while loading the
policy rules. Flag to suppress the warning was set after load_rule()
was called. We do not need to log warnings for unit test where
every test initializes the policy and logs a warning.

Also use yaml format of policy file in unit test to avoid
more warnings for json file.

Bump a few l-c for Py38 testing, squashing parts of
https://review.opendev.org/744343

Fix unit tests compatibility with Py38, squashing parts of
https://review.opendev.org/748874

Change-Id: Ia54d29975347392cbb93c07969d7e3b48eca5d23
Co-Authored-By: Radosław Piliszek <radoslaw.piliszek@gmail.com>
2020-09-11 19:16:32 +02:00
Hervé Beraud 606f136130 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: I512ca56b8d65d66a554f704ae7d22a93941347a9
2020-05-27 10:31:59 +02:00
tpatil d2635fd77b Fix the functional test devstack job
From last couple of months, the functional devstack job is broken.
Fixed the devstack job so that functional tests can run on multi-node
setup.

Note: Need to install SQLAlchemy-Utils explicitly as taskflow library
installs it using extra_requires which somehow is not working on the
devstack CI job setup.

Change-Id: I224b4a5615525862f73ced8ab9f5f396cb00ef0f
2020-04-17 04:46:54 +00:00
James Page cd52fb1bcf Drop use of SQLAlchemy-Utils
SQLAlchemy Utils is not used by Masakari, drop in preference to
straight vanilla SQLAlchemy.

Change-Id: Ib6216099bee97c0c54e847df8608829e9c2f4776
2020-03-16 12:03:24 +00:00
Sean McGinnis 0e100304a7
Switch from oslosphinx to openstackdocstheme
The oslosphinx package is not compatible with the current Sphinx 2.0
release. Migration has been happening to openstackdocstheme for some
time. To fix build failures for docs and releasenotes jobs, this
switches masakari jobs to use openstackdocstheme.

Uncapping jsonschema to pass requirements check so it matches global
requirements.

Change-Id: Ic74e8b075aa67d410617dac3346bf1c903995da7
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2019-04-10 09:07:04 -05:00
shilpa.devharakar 7321ee32fd Add progress details for recovery workflows
This patch uses taskflow's persistence feature to store recovery
workflows details into database.

Added a new microversion to return progress_details of the
notification in `GET /notifications/<notification_uuid>` API.

APIImpact:
GET /notifications/<notification_uuid> API includes details
of recovery workflow

Change-Id: I93c1b7d88823e02d9a02855cabb8b22c9e40a7d5
Implements: bp progress-details-recovery-workflows
2019-03-08 10:52:51 +05:30
akhiljain23 7700cdd3bf Add framework for masakari-status upgrade check
This commit adds the functionality of masakari-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: I17c79af15eca5f6da7e32dbedbdc392c97114d42
Story: 2003657
Task: 26140
2018-11-08 13:19:06 +00:00
dineshbhor b81b16c189 Make accept-language tests work with webob 1.8.x
Masakari below test cases are failing due to webob 1.8.x:
..unit.api.openstack.test_wsgi.RequestTest.test_secondary
..unit.api.openstack.test_wsgi.RequestTest.test_asterisk
..unit.api.openstack.test_wsgi.RequestTest.test_from_request

Please see the logs:
http://logs.openstack.org/53/518653/1/check/openstack-tox-py27/76866e9/testr_results.html.gz

This patch is a copy of change:
I2034d30cc8d9354be80d39e05b8488cb99c32ecf which fixes similar
test cases in nova.

This patch also changes the `lower-constraints.txt` to make
the WebOb version same as other services.

Change-Id: Ic5234735267530f3b347126e1f0afa3e25f9e1fe
2018-05-20 21:56:28 -07:00
Doug Hellmann 1bcde21460 add lower-constraints job
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.

Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.

Add openstack-tox-lower-constraints job to the zuul configuration.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

Change-Id: Iff00524bc3eb0fe1070aee7584885465cacd2393
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-20 16:23:35 -04:00
OpenStack Proposal Bot 11d4337c18 Updated from global requirements
Change-Id: I84daad538a5eea78a087cf760b88ff858fc2b68a
2018-03-23 20:25:03 +00:00
OpenStack Proposal Bot 83b394185e Updated from global requirements
Change-Id: I9c4af231a4c63ad2d9deadaca06acf3fbef76520
2018-03-13 06:59:29 +00:00
OpenStack Proposal Bot 38937a46f1 Updated from global requirements
Change-Id: Ia3bd9abe422c6ea83d295e992601e28a4801a438
2018-02-01 07:13:52 +00:00
OpenStack Proposal Bot c75a4d5bf4 Updated from global requirements
Change-Id: Idfaf27e09059eeefeafa6420cca067535e140909
2017-12-10 07:12:41 +00:00
OpenStack Proposal Bot 42e4807626 Updated from global requirements
Change-Id: I1f879d0595b991ca6c06593bc33dc67689941155
2017-11-15 11:47:47 +00:00
OpenStack Proposal Bot d6578d572e Updated from global requirements
Change-Id: Ibc65156c494b2132dcad2feff0fc2ec9e0634e7d
I1f879d0595b991ca6c06593bc33dc67689941155
2017-11-14 16:45:13 +09:00
Rikimaru Honjo bdafc3ef32 Modify unit testcases according to oslo.context
oslo.context>=2.19.1 outputs 'project' key in context's to_dict
function.
The value of 'project' key is same as 'project_id' key.

So this patch modifies unit testcases according to the above changs.

And, this patch adds oslo.context to requirements.txt.
oslo.context had been installed related to oslo.versioned object
until now.
But, it is better to describe it explicitly because Masakari uses
the library.

Change-Id: Ibebed8a4e5bfd49f192b1cf876b7538f9c057f97
2017-11-14 04:06:23 +00:00
Yaguo Zhou db67c44897 Upgrade oslo.db and Replace DbMigrationError with DBMigrationError
DbMigrationError is deprecated and will NOT be thrown in oslo.db
since oslo.db >=4.27.0, DBMigrationError will be thrown instead.
Consumers should catch DBMigrationError instead of DbMigrationError

Depends-On: Iab0566cf9f4552e91fa417e64472fa106e8bc86d
Depends-On: I0ebd69c3d778acb5bec9e136627e345e7fcf2bd3

Change-Id: I8e4968d2f2ed90edc22161db60712896f6e9f024
2017-09-22 21:56:31 +08:00
OpenStack Proposal Bot bf4d82bf99 Updated from global requirements
Change-Id: Ib61928aa9845060cc5c01960093d80051df547d8
2017-06-20 11:45:10 +00:00
OpenStack Proposal Bot e24ceff47a Updated from global requirements
Change-Id: I5a8b676a4a636fb8c925da1a8a24d8185d9f6d5b
2017-04-12 04:13:53 +00:00
OpenStack Proposal Bot 2007372aed Updated from global requirements
Change-Id: Icdc1a4cc8339af37a91e3eb7fc943c2c0a4be0a1
2017-04-02 01:04:58 +00:00
poojajadhav 6ad7c90a1b 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``. Now the support is
added for ``HostAddressOpt`` type and became available for
use with osloversion 3.22.

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

Change-Id: Id007b22bb0c43c8a0b4a4e3b9a4da6cc866f0563
2017-03-15 14:43:51 +05:30
Dinesh Bhor 12ed4c37bd Set access_policy for messaging's dispatcher
oslo.messaging allow dispatcher to restrict endpoint methods since
5.11.0 in d3a8f280ebd6fd12865fd20c4d772774e39aefa2, set with
DefaultRPCAccessPolicy to fix FutureWarning like:

FutureWarning: The access_policy argument is changing its default
value to <class 'oslo_messaging.rpc.dispatcher.DefaultRPCAccessPolicy'>
in version '?', please update the code to explicitly set None as the
value: access_policy defaults to LegacyRPCAccessPolicy which exposes
private methods. Explicitly set access_policy to DefaultRPCAccessPolicy
or ExplicitRPCAccessPolicy.

Closes-Bug: 1662540
Change-Id: I36fdf6f568dc2a10891c9d89f8488038af6c2d00
2017-02-09 12:17:15 +05:30
Dinesh Bhor 8ac42712cd Bump taskflow version to minimum 2.7.0
Global requirements are set to minimum 2.7.0 [1].

[1] https://github.com/openstack/requirements/blob/master/global-requirements.txt#L280

Change-Id: I271dbb1f2d387e5f8925e74c65fbd5adb908ebde
Closes-Bug: #1659495
2017-01-31 09:46:25 +05:30
avnish 53c1660166 Update to match latest global-requirements
Update requirements to the levels defined in OpenStack
global-requirements on 2016-1-10.

Change-Id: I1a33c62ba2b329e30d197906ce24c77a72d2fff4
2017-01-19 14:48:15 +05:30
dineshbhor 484da30293 Add nova support in masakari
This patch allows masakari to communicate with nova using
novaclient.

Change-Id: Ia7a2c8e91811500301d5cc44dfebc9f7ca2026e9
2016-11-04 15:39:21 +05:30
dineshbhor c3a58e4988 Add TaskFlowDriver support to process notifications
Added base NotificationDriver and TaskFlowDriver which will implement
NotificationDriver for procesing the notification workflows such as
host-failure, instance-failure and process-failure.

Change-Id: I2d12681bd26b5b1fb2535732d9f3c08ec2409d7a
2016-11-04 15:28:06 +05:30
Rikimaru Honjo a88118c08f Add authentication libraries to requirements.txt
Add following libraries to requirements.txt because these are
necessary for masakari-api.

* keystoneauth1
* keystonemiddleware

Change-Id: Ib28fbcceabce12dea0d3eeeb2096354ccaa2bb8d
Closes-Bug: #1631732
2016-10-11 14:21:08 +09:00
dineshbhor 834c1ae050 Add RPC layer for masakari
This patch will add RPC framework to send notification from
masakari-api to masakari-engine service.

Change-Id: I3c514db1a652834a56efb187b754e336580ca7fc
2016-10-07 13:16:26 +05:30
dineshbhor 726a3937d2 Added masakari objects
Added hosts and failover segment related objects including
their respective test cases.

Change-Id: I6beaf38f23aa7d053303ef4b333a30f0c5416f4d
2016-09-07 15:57:17 +05:30
dineshbhor 2b149192aa Add schema framework for masakari
This patch adds a schema layer for validation.
Schemas for failover segment and hosts will be added in their
respective patches.

Change-Id: I9440fb53d6594e5c984be3c94a3681a0e747da15
2016-08-23 17:48:35 +05:30
Abhishek Kekane d4f055262e Add support for wsgi framework
Added wsgi framework support to create masakari-api
service using oslo_service framework. Similar to core
openstack projects, config items will be kept at centralized
location.

Refer README.rst to cofigure and run masakari-api service.

Change-Id: Idb0120b8cf3b10642c51b286d82cd0944cad5ca3
2016-07-12 13:10:10 +05:30
sampathP b59503d7aa Initial Cookiecutter Commit.
Change-Id: I42dea4c1d43a041cfd948703355ce7456c8850e1
2016-06-28 13:28:27 +09:00