Commit Graph

110 Commits

Author SHA1 Message Date
Takashi Kajinami f17dd7a04b Add optional healthcheck middleware
This change introduces a new option, [healthcheck] enabled, which
enables the healthcheck middleware in mistral-api pipeline.

This middleware allows status check at /healthcheck path, which is
useful for load balancers or any monitoring services to validate health
of its backend services.

This change is created based on the same change proposed to ironic[1].

[1] 6f439414bdcef9fc02f844f475ec798d48d42558

Co-Authored-By: Jim Rollenhagen <jim@jimrollenhagen.com>
Change-Id: I9bf3de8a5ae6a8c9346285147732b773a3667f7e
2023-02-03 04:09:13 +00:00
songwenping 22e822dde2 Remove references to sys.version_info
We support Python 3.6 as a minimum now, making these checks no-ops.

Change-Id: Ia4b1eec7a788cb1ede3dc338f7be7e5d8a84069d
2021-07-10 06:20:08 +00:00
Daniel Pawlik 85b9b525fb Change get-pip url
The path for get-pip.py script in version 3.2 has been changed
with this commit [1].

[1] 2360f025eb

Change-Id: I3986238b0a65fb652b30a8a47448a1d02212166e
2021-03-08 15:06:51 +01:00
zhufl 2cd4455873 [doc]Fix invalid url link
This is to fix the invalid url link in docs.

Change-Id: I670bd7a2446b76d1c271e4d63babd2f505371169
2020-10-29 10:52:57 +08:00
Ghanshyam Mann b55cc013c1 [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#1885825
Fix user creation with GRANT in MySQL 8.0(Ubuntu Focal)
Ubuntu Focal (20.04) has mysql 8.0 and with mysql 8.0 there
is no implicit user creation with GRANT. We need to
create the user first before using GRANT command.

Story: #2007865
Task: #40196

Closes-Bug: #1885825

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

Change-Id: Idb053c8b1bfde9870eea80f66e5aef156422a668
2020-09-17 14:46:27 +00:00
Hervé Beraud 986277d607 Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: Icaf1922963f4bc2fd2c4138aa3fe15cce5d3f1f7
2020-06-02 20:23:39 +02:00
Renat Akhmerov 6c0f3f470d Delete an obsolete namespace from oslo-config-generator config
* The entry point "periodic.config" does not exist anymore so
  we need to exclude it.

Change-Id: I83de11784da3f41ee3b8c0e64dcd9e0f960b2d3f
2020-05-21 12:43:43 +07:00
Eyal 8bdf341af7 Remove OpenStack actions from mistral
Depends-on: https://review.opendev.org/#/c/703296/
Depends-On: https://review.opendev.org/#/c/704280/
Change-Id: Id62fdabe7699e7c3b2977166e253cfc77779e467
2020-02-26 10:12:01 +02:00
Eyal d21cf4a7e7 Designate uses only v2
Was fixed in https://review.opendev.org/#/c/682785/
just fix the comment and the tools

Change-Id: I29acc5c0e50faed1456c8f46fddb835e01bcc0a8
2020-01-06 14:44:25 +02:00
Renat Akhmerov 0224b1eeeb Add a script that generates a test workflow with needed paralellism
Change-Id: I6b1087f95b88a881e074a0af4f6f8be6d9413bc7
2019-11-08 14:52:00 +07:00
Eyal 0b8dd84b18 Add a cookiecutter template to generate custom stuff
* Custom actions and yaql expressions

Change-Id: I5843135fb8adbeb73d1e205cf81f4c60e8b5b306
2019-09-11 16:39:35 +03:00
Zuul d5d258e552 Merge "Docs improvements: task timeout, global context, Docker and jinja" 2019-05-03 18:35:02 +00:00
Vitalii Solodilov 09cd21d561 Docs improvements: task timeout, global context, Docker and jinja
A not obvious point for users is the task does not retry after a
timeout is triggered. Added clarification in the retry section.

The documentation contains enough example with Jinja usage. Improved
only the create_vm workflow definition.

Added global publishing to the doc. It is brash copy-paste from
https://specs.openstack.org/openstack/mistral-specs/specs/pike/approved/advanced_publishing.html without mention of atomic publish.

Move Docker guides to the installation section.

Change-Id: I149b2e1dff7f86bd356f4dd2f758659469e6a4a8
Closes-Bug: #1789384
Closes-Bug: #1690156
Closes-Bug: #1779244
Signed-off-by: Vitalii Solodilov <mcdkr@yandex.ru>
2019-05-03 17:26:57 +00:00
zhulingjie 46fd1b8a75 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I52d44a333d2eaa4a2e65c150e3640a4a84e291aa
2019-04-24 15:44:25 +08:00
Renat Akhmerov 1fce28c1ce Add a script to generate a report about profile traces
* It allows to convert a profiler log into a convenient report
  that has a general statistics about profile traces: total time,
  maximum time, average time and number of occurrences.

Change-Id: I68ff2a6eb74f1f8b11cd7568dc27bcbc9430e8e1
2019-04-08 11:00:09 +07:00
Vlad Gusev ca1acb656c Add http_proxy_to_wsgi middleware
This sets up the HTTPProxyToWSGI middleware in front of Mistral API. The
purpose of this middleware is to set up the request URL correctly in
the case there is a proxy (for instance, a loadbalancer such as HAProxy)
in front of the Mistral API.

The HTTPProxyToWSGI is off by default and needs to be enabled via a
configuration value.

It can be enabled with the option in mistral.conf:
[oslo_middleware]
enable_proxy_headers_parsing=True

Closes-Bug: #1590608
Closes-Bug: #1816364
Change-Id: I04ba85488b27cb05c3b81ad8c973c3cc3fe56d36
2019-03-09 01:51:59 +03:00
Pierre Gaxatte e4694009d9 Fix docker image not building
Also adds a line in the readme to use the mistral client inside the
mistral container.

Change-Id: Ie09b06f682679b9a90d18b8796c47b69e91d14cf
Closes-Bug: 1782531
2018-08-01 05:08:48 +00:00
Vitalii Solodilov 214828ace2 Keycloak and Docker
* Added Keycloak to the infrastructure yaml which uses a
h2 not to complicate the installation.
* Updated the docker-compose docs.
* Move Cloud Flow image to the infrastructure yaml.

Change-Id: I2a69ca91c1638e5fd070c77ca63c8d5586887231
Signed-off-by: Vitalii Solodilov <mcdkr@yandex.ru>
2018-07-31 14:07:42 +00:00
Jose Castro Leon a2756a34c2 Support Manila actions in Mistral
Adds manila actions into the available list of actions for mistral

Change-Id: Ic0a3c24f72d91a8a87ffcf81db763058bcbf8566
Closes-Bug: #1783291
2018-07-24 15:11:08 +02:00
jacky06 f11ddeb6eb Pin get-pip.py to 3.2
As get-pip.py evolves based on pip 10, while we're still using
pip 9, changes in the way it can be used are causing problems.

For example, the ability to use --download is no longer there.

As such, let's pin to a known good version and leave it at that
until we no longer need to use this script. Version 3.2 maps to
pip 7.1.2 which fulfills our needs.

Change-Id: Ic9210c3389776385286f6215e6673d75fa2d01d9
2018-07-09 10:48:13 +00:00
Bob Haddleton a8abfae0f5 Update default Docker configuration and documentation
Updated the default Docker configuration so it works with
the default sqlite condfiguration.  Also updated the README
file.

Updated .gitignore and .dockerignore to ignore .coverage.* files

Change-Id: I698f8d0c97e2c5dc202af714470b6e055c74eea2
2018-06-10 19:21:18 -05:00
Brad P. Crochet 9883814cdc Switch to using stestr
When the TC merged I2637dd714cbb6d38ef8b8dc1083e359207118284 we're
supposed to invoke stestr rather than testr so lets do that

Change-Id: Icd303c37d2371d44726d55c947bbc8b9e99f2a1c
2018-05-30 14:46:25 -04:00
Vitalii Solodilov 5f89e2e71f Added JavaScript evaluator which doesn't require a compilation
* Added new JavaScript evaluator py_mini_racer. Advantages:
    * is distributed as wheel package
    * supports differences platforms
    * live project
* BUILD_V8EVAL was removed because it was replaced by py_mini_racer in
Mistral Docker image
* Added stevedore integration to javascript evaluators
* Refreshed javascript tests. Add test for py_mini_racer evaluator
* Install py_mini_racer library in during mistral test
* Refreshed javascript action doc

Change-Id: Id9d558b9b8374a2c2639e10cb1868f4e67f96e86
Implements: blueprint mistral-add-py-mini-racer-javascript-evaluator
Signed-off-by: Vitalii Solodilov <mcdkr@yandex.ru>
2018-04-23 17:04:18 +00:00
Vitalii Solodilov 0ec8ac3560 Improve the Docker integration
* Removed old scripts
* Added docker-compose files
* Added .dockerignore
* Updated Docker docs
* Added cloud-flow container to docker-compose
* PostgreSQL and MySQL were supported

Change-Id: Ia7b6d7faaff6d9aa0f02d64d569250f6a9ee59ea
Signed-off-by: Vitalii Solodilov <mcdkr@yandex.ru>
2018-03-18 00:45:02 +04:00
Pradeep Kilambi 16de7e004f Remove ceilometer actions from mistral
ceilometer api and client have been deprecated for over
two releases and now removed completely. Lets drop these
actions and update the requirements.

Change-Id: Ica2b835a885b9b4705996f91080afc12587bd314
2018-01-11 14:28:16 -05:00
Andreas Jaeger d018cd7788
Avoid tox_install.sh for constraints support
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.

This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.

Change-Id: I9298add1f77b56f19f355b19da89f9799d2415c9
2017-12-02 10:43:11 -06:00
Dai Dang Van 49ed570cfe Implement policy in code (1)
This commit prepare for implementing policies in code[1].

Like oslo.config, with oslo.policy, we can define all of
default rules in code base and only change some rules
via policy file. Another thing that we should use yaml
format instead of json format.

[1] https://governance.openstack.org/tc/goals/queens/policy-in-code.html
Co-authored-By: Hieu LE <hieulq@vn.fujitsu.com>
Change-Id: I2051b6c25333c95aa9ea6786964d4ab710ea93e8
2017-11-27 02:46:32 +00:00
rajat29 d4ae172125 Fix to use . to source script files
Adhering to coding conventions. Refer to ``Code conventions`` at
https://docs.openstack.org/contributor-guide/ for details.
When you have to source a script file, for example, a credentials file
to gain access to user-only or admin-only CLI commands, use . instead of source.
https://docs.openstack.org/contributor-guide/writing-style/code-conventions.html

Change-Id: I97c0cc8b9215b0f580311b1850b13a72f9ced60a
2017-09-05 13:04:29 +05:30
Mike Fedosin fec851381d Add Glare action pack
This patch adds Glare action pack into Mistral.

Change-Id: Icf4ce5a37f555d01cf9c0b865a6816e3f6801f3a
Implements-blueprint: glare-action-pack
2017-07-31 15:08:22 +00:00
Jenkins 05711f6f33 Merge "Update docker build" 2017-07-24 15:22:46 +00:00
csatari a7cd611c78 Applying Pike document structure
This change aligns the Mistral documents folder structure to
the one specified for Pike [1].
Documents were move to thir appropriate folder, but the different
guides do not follow their cookie cutted structure yet.
Install guide is in a separate change [2], while I could not
found the cookie cutter for the rest of the guides.

test-requirements.txt updated with the missing modules.

tox_install.sh modified to do not pass $MODULE_NAME and -e parameter to
edit-constraints.

[1]: http://specs.openstack.org/openstack/docs-specs/specs/pike/os-manuals-migration.html
[2]: https://review.openstack.org/#/c/476499/
[3]: https://etherpad.openstack.org/p/doc-migration-tracking

Change-Id: Ia1101fa2eada446d8eebfefa9bd15d8facd8b3b0
Depends-On: Ia750cb049c0f53a234ea70ce1f2bbbb7a2aa9454
Signed-off-by: csatari <gergely.csatari@nokia.com>
2017-07-11 09:24:17 +02:00
Andras Kovi 3c37ef5ed5 Update docker build
Update the Mistral docker image and tooling has been updated to
significantly  ease the starting of a Mistral cluster. The setup
now supports all-in-one and multi-container deployments. Also,
the scripts were cleaned up and aligned with the Docker best
practice.

Change-Id: I803d69ee17e7f5ebc95ec2c81887c4f580d73715
2017-07-03 13:22:44 +02:00
Ryan Brady 67d9758162 Update Docker README
This patch updates the docker README file to include the --link arg
to the command for launching a Mistral container to ensure the
rabbitmq and mistral containers can communicate.

This patch also adds a new section that explains how and why to
mount the Mistral source code as a volume in a running container.

Change-Id: Iec25f7e7dfda0bc8c9b38fa37b048448d73f66e4
Co-Authored-By: Brad Crochet <brad@redhat.com>
2017-05-17 12:07:49 -04:00
Adriano Petrich 4c53234e27 Adding log to db_sync
if called by mistral-db-manage it will log info level
    to /var/log/mistral/mistral-db-manage

Included some debug level logging also for main actions.

Change-Id: I0574b38efcc0dd7485953bf3089ff0a5a3ef6394
Closes-Bug: #1689821
2017-05-16 05:17:08 +00:00
Lingxian Kong cc5782e67c Fix cinder/heat base import
Change-Id: I56bbbe9c5cc9a3366ad5f8f3a92cb554925d92da
Closes-Bug: #1674519
2017-03-21 23:15:35 +13:00
Dougal Matthews 7a929a9588 Include the missing lines in the coverage report
This should make it easier to see what files are different between the
two compared coverage reports.

Change-Id: I0367be79145ffb066c44342dcbe97e61a079d598
2017-03-07 08:31:41 +00:00
Dougal Matthews bc40d42dcb Don't use 'master' as that isn't always true
We are only comparing against master if the parent of the commit is
master. This isn't true if another patch merges after this is proposed
or it is in a series of commits and based on another review.

Change-Id: I2d0f827552fb431cf78a03f77e18b77ed406efd8
2017-03-07 08:31:21 +00:00
Dougal Matthews 5023bd4773 Add `coverage erase` to the cover report
Change-Id: I559222d3b6340c24e9b7f9249096482d6564668f
2017-03-06 09:20:53 +00:00
Istvan Imre 91237c2baa External OpenStack action mapping file support
Release note and command line parameter added.
From now it is optional to list openstack modules in mapping file which
you would not include into supported action set.

Change-Id: I5ab01395c507fc857dca7cf08ab344a07def0dcf
2017-03-03 08:00:30 +00:00
Brad P. Crochet a298d09e42 Update Dockerfile to use Xenial
The current state of Mistral no longer works on Trusty. This patch
updates to Xenial in order to fix the docker image build.

Change-Id: I2a778d43e2dca8eaa370d5a86008a170ffb98f54
Closes-Bug: #1664030
2017-02-24 10:03:21 -05:00
Jenkins 6e5cbd3b5a Merge "Remove wrong licensing" 2017-02-16 06:55:49 +00:00
Andreas Jaeger ac4d52bd4c Prepare for using standard python tests
Add simple script to setup mysql and postgresql databases, this script
can be run by users during testing and will be run by CI systems for
specific setup before running unit tests. This is exactly what is
currently done by OpenStack CI in project-config.

This allows to change in project-config the python-db jobs to
python-jobs since python-jobs will call this script initially.

See also
http://lists.openstack.org/pipermail/openstack-dev/2016-November/107784.html

Change-Id: I93265cd17899e090377cd5399b46ef5c5b86bc75
Needed-By: Ib5a91fd4e7211f4418ca1dc1bd2fa5c31b986bd5
2017-02-08 21:15:39 +01:00
Sharat Sharma c374d98526 Remove wrong licensing
This file is wrongly licensed and copyrighted. So, removing it.

Change-Id: I1fcd6837f8c3dc432f76f1457859800c23117eeb
2017-02-06 12:57:58 +05:30
Jenkins c9ef100219 Merge "Add script for unit test coverage job" 2017-01-30 14:53:53 +00:00
Sharat Sharma e36d7f8af2 Add script for unit test coverage job
This commit will add script and coverage config file that will allow to run
non voting coverage job which will detect any changes in the code coverage
for each commit on review.

Change-Id: I624d1228df0adf1f34a498e5e86b6b092e667f5f
2017-01-23 14:38:15 +05:30
Jenkins 7f0f09f410 Merge "Added gnocchi action pack" 2017-01-11 06:34:13 +00:00
gecong1973 d597dab65c Using sys.exit(main()) instead of main()
As we known, Exceptions are raised by the sys.exit() function.
When they are not handled, no stack traceback is printed in the
Python interpreter. In this patch we have known main() got return
values(eg:0, 1), but it can't specifies exit status when terminate
the main thread by unusing sys.exit(). So when using sys.exit(main())
instead of main() may be more readable and reasonable.

Change-Id: Ie69b3a22dd1ddcd5586fc72f452cd162787f2f6f
2017-01-04 09:18:24 +08:00
fengchaoyang 6d9b53ef3d Added gnocchi action pack
This patch adds gnocchi action pack into mistral.

Change-Id: I1438b554356ad8ea6b86744eea1402e1f5526739
Depends-On: I99915d9ad5d1ccfa7ff326adab89937cf64a07ce
Implements: blueprint mistral-gnocchi-actions
2017-01-03 12:27:38 +08:00
Pradeep Kilambi 44768730a7 Add aodh actions to mistral
Depends-on: I52df197c0e22f0814f7339601a7291fc057463f8

Implements: blueprint aodh-action-pack

Change-Id: I30d0a2e87ec97a49d81ada4f2ee34c7934935ab3
2016-12-22 11:12:22 +00:00
Renat Akhmerov 4e2e46a07a Revert "Remove unused scripts in tools"
This reverts commit 1bf9ca58ef.

Change-Id: I005abaeb941fdbf182b2c9d991404be0dae89f32
Note: we need this because some of our gates use them, look at http://logs.openstack.org/23/400123/1/check/gate-mistral-tox-db-unit-postgresql-ubuntu-xenial/b9dfcef/console.html
2016-11-22 06:24:39 +00:00