3704 Commits

Author SHA1 Message Date
Nguyen Hai
fdca8f89cd add python 3.6 unit test job
This is a mechanically generated patch to add a unit test job running
under Python 3.6 as part of the python3-first goal.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: Ic6c6b2f7fee6ed8195852866538c7fccc7cc48ee
Story: #2002586
Task: #24311
2018-08-30 11:42:18 +00:00
Nguyen Hai
4a9ceaf47d switch documentation job to new PTI
This is a mechanically generated patch to switch the documentation
jobs to use the new PTI versions of the jobs as part of the
python3-first goal.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: I2e2c68678b50ba214fc0b520cd079c8922d540ce
Story: #2002586
Task: #24311
2018-08-30 11:42:08 +00:00
Zuul
0090a14a20 Merge "Add py36 to tox and default to python3 for pep8 and venv" 2018-08-29 09:18:36 +00:00
Zuul
981bef206f Merge "Use mock to patch lookup_utils._ACTION_DEF_CACHE" 2018-08-29 09:18:36 +00:00
Zuul
ff8b0cae58 Merge "Remove -u root as mysql is executed with root user" 2018-08-28 07:57:26 +00:00
Zuul
1b81b43c91 Merge "Fix some format errors in installation guide." 2018-08-28 07:51:43 +00:00
Zuul
2fff7da1cc Merge "import zuul job settings from project-config" 2018-08-23 16:21:39 +00:00
Bob Haddleton
aa60f7c194 Add py36 to tox and default to python3 for pep8 and venv
Change-Id: I3fa2748162b67363b62ca445dc1122ce7bf2bb94
2018-08-23 08:31:50 -05:00
Dougal Matthews
5c9aad655b Use mock to patch lookup_utils._ACTION_DEF_CACHE
We currently manually patch this, but mock is better suited to the task.

Change-Id: Ia33d677c5caabc0565b20aa74be666394b504ba4
2018-08-22 13:22:20 +01:00
wanghao
ea40339d05 Fix some format errors in installation guide.
There are some format errors in installation guide,
fix them for better docs.

Change-Id: I351d0d3d0c74ae1fa187aacc44fadc3adf04de15
2018-08-22 17:24:05 +08:00
Dougal Matthews
b16a4ce465 Explicitly convert X-Target-Insecure to a boolean
We will now only accept the string values "False" or "True". Previously
any given value was interpreted as a string and thus True.

Closes-Bug: #1666565
Change-Id: Ibd105c881dbe16cd4516bfb775c8f5f43c961b45
2018-08-22 09:48:30 +01:00
zhang.lei
1ea5cf8299 Remove -u root as mysql is executed with root user
As openstack installation guides suggest to run mysql with root shell
user, mysql will not ask for password, so the "-u root -p" is useless.

Change-Id: I525a3fdb77f1dfc93d87cc5fe619315d36e7004d
Related-Bug: #1785025
2018-08-21 11:47:29 +00:00
Nguyen Hai
1c249f02c6 import zuul job settings from project-config
This is a mechanically generated patch to complete step 1 of moving
the zuul job settings out of project-config and into each project
repository.

Because there will be a separate patch on each branch, the branch
specifiers for branch-specific jobs have been removed.

Because this patch is generated by a script, there may be some
cosmetic changes to the layout of the YAML file(s) as the contents are
normalized.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: I42c7a05b20ad93450f59939902d4aae53512c1b7
Story: #2002586
Task: #24311
2018-08-21 11:45:46 +00:00
Zuul
632e4bda67 Merge "New experimental scheduler: the first working version" 2018-08-20 13:08:35 +00:00
Zuul
2c88f4f713 Merge "Add tripleo-ci-centos-7-undercloud-containers job" 2018-08-19 11:19:19 +00:00
Chandan Kumar
72f5f77ad3 Add tripleo-ci-centos-7-undercloud-containers job
* Since mistral is heavily used in TripleO deployment.
  tripleo-ci-centos-7-undercloud-containers deploys containerized
  undercloud and run mistral tempest plugin tests. It will help to
  discovers issues early.

Depends-On: https://review.openstack.org/#/c/565642/
Depends-On: https://review.openstack.org/589849
Change-Id: Iebdd6476fc4f914644490b18a3dc1f3462666c89
2018-08-14 10:47:11 +00:00
Renat Akhmerov
7b71f096b9 New experimental scheduler: the first working version
This patch delivers the first working version of a distributed
scheduler implementation based on local and persistent job
queues. The idea is inspired by the parallel computing pattern
known as "Work stealing" although it doesn't fully repeat it
due to a nature of Mistral.
See https://en.wikipedia.org/wiki/Work_stealing for details.

Advantages of this scheduler implementation:

* It doesn't have job processing delays when a cluster topology'
  is stable caused by DB polling intervals. A job gets scheduled
  in memory and also saved into the persistent storage for
  reliability. A persistent job can be picked up only after a
  configured allowed period of time so that it happens effectively
  after a node responsible for local processing crashed.
* Low DB load. DB polling still exists but it's not a primary
  scheduling mechamisn now but rather a protection from node crash
  situations. That means that a polling interval can now be made
  large like 30 seconds, instead of 1-2 seconds. Less DB load
  leads to less DB deadlocks between scheduler instances and less
  retries on MySQL.
* Since DB load is now less it gives better scalability properties.
  A bigger number of engines won't now lead to much bigger
  contention because of a big DB polling intervals.
* Protection from having jobs forever hanging in processing state.
  In the existing implementation, if a scheduler captured a job
  for processing (set its "processing" flag to True) and then
  crashed then a job will be in processing state forever in the DB.
  Instead of a boolean "processing" flag, the new implementation
  uses a timestamp showing when a job was captured. That gives us
  the opportunity to make such jobs eligible for recapturing and
  further processing after a certain configured timeout.

TODO:

* More testing
* DB migration for the new scheduled jobs table
* Benchmarks and testing under load
* Standardize the scheduler interface and write an adapter for the
  existing scheduler so that we could choose between scheduler
  implementations. It's highly desired to make transition to the
  new scheduler smooth in production: we always need to be able
  to roll back to the existing scheduler.

Partial blueprint: mistral-redesign-scheduler
Partial blueprint: mistral-eliminate-scheduler-delays

Change-Id: If7d06b64ac14d01e80d31242e1640cb93f2aa6fe
2018-08-14 14:02:19 +07:00
Jose Castro Leon
6b4cc9a4a6 Removes non needed parameter passed in magnum client creation
Magnum client instantiation does not need the user_id parameter
coming from the context to do the operations.

Change-Id: I70070aee03671bf04ba4b933039b2c3fbf07c16f
Closes-Bug: #1786480
2018-08-10 15:59:26 +02:00
7b5bffe7c0 Update reno for stable/rocky
Change-Id: Ic8776b1a940da5379f9663964af1015385000949
2018-08-09 12:11:31 +00:00
Zuul
ca84455a92 Merge "Update workbook namespace to '' on migration" 7.0.0.0rc1 2018-08-08 14:36:47 +00:00
Thomas Herve
6ce51e36bd Update workbook namespace to '' on migration
Namespaces for workbooks have been recently introduced by
I2c66b3961915f0f35a9c468eb6dd0c0c70995234. It adds the new column but
leave the default as NULL in the database, and doesn't update the old
workbooks. This makes old workbooks undeletable. This patch adds a new
migration updating the workbooks.

Change-Id: I91d272d65b7be29303372f93c0811c484795efbb
Closes-Bug: #1785833
2018-08-08 11:21:50 +02:00
Zuul
6c42ff99d8 Merge "Add a debug log for the webhook publisher" 2018-08-07 18:46:42 +00:00
Zuul
df16c941fc Merge "Clarify what an exception from an action means" 2018-08-06 06:34:32 +00:00
Zuul
952967a019 Merge "Remove hardcoded usage of v2 authentication in Barbican actions" 7.0.0.0b3 2018-08-03 11:03:26 +00:00
Eyal
2c644bdb05 expose the user info url as a configuration
Change-Id: Ia19c00b04a380fe862b7a67061d9ece2b34ad1ab
2018-08-02 15:57:41 +03:00
Zuul
4625c85aca Merge "Fix docker image not building" 2018-08-01 09:46:54 +00:00
Zuul
12081eb94a Merge "Add namespace parameter to Workbook API doc" 2018-08-01 06:45:16 +00: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
Zuul
0ec011a54f Merge "Keycloak and Docker" 2018-07-31 20:45:58 +00:00
Zuul
bef9aa5bc3 Merge "Improve std.email action" 2018-07-31 14:32:33 +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
Dougal Matthews
df46ec72b9 Clarify what an exception from an action means
When Python actions raise an exception they may not have failed to run.
This may not even be an issue. For example, the OpenStack action
`swift.head_container` will raise an exception is the container doesn't
exist.

This change lowers the exception to a warning but keeps the exception
traceback in the logs. It also changes the wording in the message. We
didn't fail to run the action, rather the action raise an exception.

Change-Id: If9a6a3b98999acae8b80ad4ddeb9d197a628c280
2018-07-31 15:00:11 +01:00
Zuul
443cd6fc11 Merge "Support Manila actions in Mistral" 2018-07-31 11:30:40 +00:00
Zuul
08a61b6f10 Merge "Add a policy to control the right to publish resources" 2018-07-31 08:51:12 +00:00
Zuul
fc11871b86 Merge "Remove extra a specification validation" 2018-07-31 08:27:18 +00:00
Jose Castro Leon
3c430ef0a2 Improve std.email action
Adds support for cc and bcc addresses to send mails as copy to
administrators and also html formatting. If the html body is specified
the mail will be sent as multipart.

Closes-Bug: #1783349

Change-Id: I2b90354c33052c4b7ae3a98a08e7df1055524a25
2018-07-31 08:43:03 +02:00
Zuul
33bcd64679 Merge "remove invalid todo comment" 2018-07-31 06:33:01 +00:00
Zuul
259bce454d Merge "Fix flaky cron trigger test" 2018-07-31 06:05:10 +00:00
Zuul
c54c35c82d Merge "Allow engine commands as task name" 2018-07-30 15:39:01 +00:00
PrivateRookie
36050224ee remove invalid todo comment
remove invalid todo comment in std_actions.py, since there is no
need to implement this feature.

Change-Id: I500312bb039260853a4d96a54c3395992947b9d5
Related-Bug:#1676411
2018-07-30 22:37:16 +08:00
Andras Kovi
66f6c90f66 Fix flaky cron trigger test
Checking for equality of times is flaky because if the
samplig happens around the boundady of a second, then
it can cause an off by 1 error. The test is modified
to tolerate these errors.

Change-Id: Ib341b0ae4bff6f74c412f62678a5a663a99b0b0b
2018-07-30 14:03:09 +02:00
hardikj
9e2074d1eb Add namespace parameter to Workbook API doc
Update API documentation to include namespace parameter details.
Update quickstart guide to latest client outputs.
And minor typo fixes.

Change-Id: I0a2324d0386d5543387ea4bff1d2569b50ad22dd
Implements: blueprint mistral-namespace-for-actions-workbooks
2018-07-30 15:28:34 +05:30
Dougal Matthews
9f03835d0b Add a debug log for the webhook publisher
Without this, it is hard to tell from the logging if the notifier was
ever called.

Change-Id: I76c0259aee3ad65c1009730636da6d06e719548c
2018-07-30 10:05:47 +01:00
Vitalii Solodilov
4bf03d8e7d Remove extra a specification validation
Currently when we get a specification using the instantiate_spec function,
we always validate their schema and semantics over and over again.
To prevent it we add new validate parameter to a Spec class.
The validate parameter must be True when we create a workflow, workbook
or action using a mistral-api. In all other cases, it must be False.

Change-Id: Ia450ea9635bc75c204fe031cfeeab154f1d03862
Closes-Bug: #1738769
Signed-off-by: Vitalii Solodilov <mcdkr@yandex.ru>
2018-07-30 11:55:35 +04:00
Zuul
b01d6c6642 Merge "Add namespace support for workbooks" 2018-07-27 10:56:57 +00:00
Zuul
663ce80fa8 Merge "Enable mutable config in mistral" 2018-07-26 16:55:21 +00:00
hardikj
834747b5d9 Add namespace support for workbooks
This patch brings namespace support to workbooks.
Namespace of the workbook is inherited by workflows.

Implements: blueprint mistral-namespace-for-actions-workbooks
Change-Id: I2c66b3961915f0f35a9c468eb6dd0c0c70995234
2018-07-26 17:13:58 +05:30
Anusree
d2f03bc7b0 Enable mutable config in mistral
New releases of oslo.config support a 'mutable' parameter to Opts.
oslo.service provides an option here Icec3e664f3fe72614e373b2938e8dee53cf8bc5e
allows services to tell oslo.service they want mutate_config_files to be
called by passing a parameter.

This commit is to use the same. This allows mistral to benefit from
I1e7a69de169cc85f4c09954b2f46ce2da7106d90, where the 'debug' option
(owned by oslo.log) is made mutable. we should be able to turn debug
logging on and off by changing the config.

tc goal:
https://governance.openstack.org/tc/goals/rocky/enable-mutable-configuration.html

Change-Id: I8ea7085b9343b07f5fe419d30a68c00caec1b745
2018-07-25 03:40:34 +05:30
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
Jose Castro Leon
36f28dec45 Remove hardcoded usage of v2 authentication in Barbican actions
There are still some hardcoded v2 authentication in barbican actions.
This api has been deprecated and removed, so we can change it to use
instead v3. It also removes the version number from some helper methods.

Change-Id: I0390daf841463d11cb7c61653897949989b6e6eb
Closes-bug: #1783316
2018-07-24 13:32:07 +02:00